Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved High CPU use by onlyoffice (& a possible fix)

    OnlyOffice
    2
    5
    292
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      Robin last edited by

      Hi,

      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.

      tl;dr:

      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?

      1 Reply Last reply Reply Quote 2
      • nebulon
        nebulon Staff last edited by nebulon

        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

        1 Reply Last reply Reply Quote 0
        • nebulon
          nebulon Staff last edited by

          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.1 and let us know if this fixes your issue.

          1 Reply Last reply Reply Quote 1
          • R
            Robin last edited by

            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 com.onlyoffice.coudronapp@1.6.1), CPU use is more or less nonexistent: I no longer see it in the top consumers at all

            So I think this looks successful 🙂

            1 Reply Last reply Reply Quote 2
            • nebulon
              nebulon Staff last edited by

              Thanks for testing, I've released the new package now.

              1 Reply Last reply Reply Quote 3
              • First post
                Last post
              Powered by NodeBB