linuxserver / docker-jellyfin

GNU General Public License v3.0
607 stars 91 forks source link

Skip chown on files with correct permissions #173

Closed DavidFair closed 1 year ago

DavidFair commented 1 year ago

Skip chown on files with correct UID and GID set

linuxserver.io



Description:

Using find we can exec chown on files with permissions that do not match the set UID/GID.

Benefits of this PR and context:

Only CoW systems this can reduce the startup impact with mechanical disks from 10-25 minutes to a couple of minutes with large Jellyfin libraries.

Closes: #169

How Has This Been Tested?

Source / References:

Based on the SO answer

aptalca commented 1 year ago

Only CoW systems this can reduce the startup impact with mechanical disks from 10-25 minutes to a couple of minutes with large Jellyfin libraries.

The chown in there is not recursive. The difference between the published version and your PR would not be noticeable

LinuxServer-CI commented 1 year ago

I am a bot, here are the test results for this PR: https://ci-tests.linuxserver.io/lspipepr/jellyfin/10.8.5-1-pkg-bd7987fa-pr-173/index.html https://ci-tests.linuxserver.io/lspipepr/jellyfin/10.8.5-1-pkg-bd7987fa-pr-173/shellcheck-result.xml

DavidFair commented 1 year ago

Only CoW systems this can reduce the startup impact with mechanical disks from 10-25 minutes to a couple of minutes with large Jellyfin libraries.

The chown in there is not recursive. The difference between the published version and your PR would not be noticeable

Yeah, I misread the logs as 30-config that's slow. It's actually the 10-adduser usermod step which is slow in the base image

It takes 2 minutes 10 seconds on a machine with nothing else running and amplifies up to 10+ when there's startup contention. I'll close this PR, but I wonder why usermod is being so slow reliably