sscheib 11 Posted February 3, 2019 Posted February 3, 2019 Dear developers, I just noticed a massive load while updating the Emby server and trying to work simultaneously via SSH on the server. Curious as I am I took a look at top and saw a running command, which caught my attention: chown -R emby:emby Apparently this command is issued during the installation of the Emby server package (at least on Debian). You might want to consider using find with the exec flag. See below for the possible performance boost. root@hostname:/tmp# time chown -R emby:emby /var/lib/emby real 3m47.318s user 0m0.632s sys 0m1.816s root@hostname:/tmp# touch /var/lib/emby/bla root@hostname:/tmp# time find /var/lib/emby/ ! \( -uid 999 -o -gid 999 \) -exec chown emby:emby {} \; real 1m19.791s user 0m1.012s sys 0m1.868s root@hostname:/tmp# Roughly estimated 1/3 of time needed to perform the action with the same outcome by preferring find over chown. Of course I did not run find before (so no cache involved). Cheers, Steffen
Luke 40072 Posted February 3, 2019 Posted February 3, 2019 Thanks for the info, we'll investigate this.
sscheib 11 Posted February 18, 2019 Author Posted February 18, 2019 Just wanted to bump this one more time, as this issue is still persistent. I have a large database (~80TB) and therefore a lot within the path /var/lib/emby (metadata), so the command will run a good while and increase the load of the server for no reason.
Luke 40072 Posted February 18, 2019 Posted February 18, 2019 Hi, thanks, it's on our internal issue tracker for issues related to build and packaging. It just has other things waiting in line ahead of it right now. Thanks.
Luke 40072 Posted May 20, 2019 Posted May 20, 2019 @@sscheib, We are looking into resolving this for the next release. Thanks.
Q-Droid 880 Posted May 20, 2019 Posted May 20, 2019 @@sscheib, We are looking into resolving this for the next release. Thanks. Please make sure it's tested properly. Both commands would have to access the dir tree therefore it is possible for caching to be in play and skewing the results. Giving the false impression of better performance.
sscheib 11 Posted June 6, 2019 Author Posted June 6, 2019 Dear developers, I just noticed a massive load while updating the Emby server and trying to work simultaneously via SSH on the server. Curious as I am I took a look at top and saw a running command, which caught my attention: chown -R emby:emby Apparently this command is issued during the installation of the Emby server package (at least on Debian). You might want to consider using find with the exec flag. See below for the possible performance boost. root@hostname:/tmp# time chown -R emby:emby /var/lib/emby real 3m47.318s user 0m0.632s sys 0m1.816s root@hostname:/tmp# touch /var/lib/emby/bla root@hostname:/tmp# time find /var/lib/emby/ ! \( -uid 999 -o -gid 999 \) -exec chown emby:emby {} \; real 1m19.791s user 0m1.012s sys 0m1.868s root@hostname:/tmp# Roughly estimated 1/3 of time needed to perform the action with the same outcome by preferring find over chown. Of course I did not run find before (so no cache involved). Cheers, Steffen
Q-Droid 880 Posted June 6, 2019 Posted June 6, 2019 You ran a recursive chown on the same dir tree. Unless you rebooted in between and not a nas volume it is possible there was cache involved. I'm not saying that I'm 100% certain, just possible. I haven't tested it myself.
katbyte 27 Posted October 19, 2021 Posted October 19, 2021 (edited) I'm hitting this in 2021 - was a solution ever found/posted? it would be nice to have a flag to just skip this as its a 100TB network volume where chown would fail to update any permissions anyways.... this causes the server to often take 10+ min to start as the docker container sits there spinning on trying to verify permissions that are all, always, correct. Edited October 19, 2021 by katbyte
Luke 40072 Posted October 19, 2021 Posted October 19, 2021 1 hour ago, katbyte said: I'm hitting this in 2021 - was a solution ever found/posted? it would be nice to have a flag to just skip this as its a 100TB network volume where chown would fail to update any permissions anyways.... this causes the server to often take 10+ min to start as the docker container sits there spinning on trying to verify permissions that are all, always, correct. We'll respond in your topic. Thanks. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now