SOLVED High CPU use by onlyoffice (& a possible fix)
I noticed that beam.smp is using a lot of CPU inside my cloudron instance. I tracked this down to belonging to onlyoffice, and doing some further digging, I found this post that might be interesting.
When I set the number of scheduler threads to 1 the CPU usage dropped from 23 % to 3 %.
Setting RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS="+S 1:1" apparently does the trick, and there's a linked issue on the onlyoffice github that appears to do exactly that as a part of their Dockerfile.
I'm unsure how to test this, but perhaps this may be the same issue / fix for Cloudron's case, too?
I haven't seen the high cpu usage as such, but according to the docs about the number of rabbitmq schedulers, together with probably typical Cloudron use-cases, I think it regardless makes sense to set this to 1 scheduler only until we see the need to make that dynamic or higher by default. For more context https://www.rabbitmq.com/runtime.html#scheduling
Since I am not able to verify the fix and the github issues offers not only the scheduler count solution but also some other readiness and such as possible fixes, I have uploaded a package version for testing now with the scheduler count fixed to 1.
@Robin please install via
https://my.<example.com>/#/appstore/com.onlyoffice.coudronapp?version=1.6.1and let us know if this fixes your issue.
I haven't seen the high cpu usage as such
Might be that this is due to the differences in HW config we're running on? As I understand it, this will "scale up" based on the number of cores you have. I'm running on a Threadripper, which has rather a few of them.
Trying to install the fixed version now, observations:
- Before install, beam.smp is taking up a steady 6% CPU
- After upgrading (via
cloudron update --app xxx --appstore-id email@example.com), CPU use is more or less nonexistent: I no longer see it in the top consumers at all
So I think this looks successful
Thanks for testing, I've released the new package now.