-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Low priority for preview generation #17966
Comments
Hey ;) Sounds like a duplicate of #1732 to me. From a technical point it's not possible to decrease or increase the priority for a single php request. |
I'am not 100% sure. But the previews should be generated by the cron script. So you should run it from cron (crontab setting and not per ajax or request) and then control either the nice level or cpulimit and/or place it in a cgroup handling it. |
@go2sh it depends ;) By default previews are requested via http and generated on demand. Some people are using the previewgenerator app to generate the previews by cron. Please have a look at https://ownyourbits.com/2019/06/29/understanding-and-improving-nextcloud-previews/. Probably some of the recommendations can improve the situation for you. |
See this PR, related to the above link. |
@kesselb I'm using the previewgenerator app from cron at night and it works pretty well. But when we upload images, the previews are generated immediately (due to on demand) which make the server unresponsive. I already did the recommendations from ownyourbits which improved the situation but I think it can still be improved. if I'm not mistaken the php request start a few ffmpeg processes to generate thoses previews. Isn't it possible to decrease the priority of thoses processes ? |
In my opinion this is the wrong way to go forwards, as a systems engineer I can see that when a process (even if it's "low" priority) is going to attempt to read all the data from the disk file to generate a set of thumbnails. Most NAS/storage systems that nextcloud run on contain spinning disks, you cannot make a spinning disk any faster, you cannot say 'oh well its on low CPU priority', that disk header is doing stuff, it's busy, it's going to affect the whole system no matter what you need to look at
|
Afaik ffmpeg is only involved for movie thumbnails. If you decrease ffmpeg priority I would expect even more lag because with lower priority generation takes more time and the process will block. |
Ok, so ultimalty this is a feature request for a preview generation architecture, that can be constrained by cgroups. |
@PaulLereverend okay with you to close this issue? feature: previews and thumbnails we have plenty of issues tagged for preview generation. I'm not sure if we need another one ;) |
please close this issue, it only exists as someone's guess as to the symptoms of existing problems |
Hi !
I would like to share a feature request.
Is your feature request related to a problem? Please describe.
Low hardware like raspberry pi or other ARM based cpu become unresponsive when generating previews. When we upload multiple images in a folder, the server has to generate the previews. This uses all the CPU power so the web interface becomes very slow and unresponsive. It is a bigger issue when you have 2 users on the same server.
Describe the solution you'd like
The idea would be to generate previews with a low priority on the CPU, so the interface remains usable.
The text was updated successfully, but these errors were encountered: