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


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. CPU Limit per app

CPU Limit per app

Scheduled Pinned Locked Moved Solved Support
cpuresources
5 Posts 3 Posters 443 Views 3 Watching
  • 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.
  • E Offline
    E Offline
    ekevu123
    wrote on last edited by girish
    #1

    The default CPU limit per app is 100% upon installation. However, isn't the point that the default should be less than that so that one app cannot take down the whole server?

    Or did I misunderstand something here?

    jdaviescoatesJ 1 Reply Last reply
    1
    • E ekevu123

      The default CPU limit per app is 100% upon installation. However, isn't the point that the default should be less than that so that one app cannot take down the whole server?

      Or did I misunderstand something here?

      jdaviescoatesJ Offline
      jdaviescoatesJ Offline
      jdaviescoates
      wrote on last edited by
      #2

      @ekevu123 yeah CPU stuff changed in version 8, see e.g. https://forum.cloudron.io/post/86976

      I use Cloudron with Gandi & Hetzner

      1 Reply Last reply
      1
      • E Offline
        E Offline
        ekevu123
        wrote on last edited by
        #3

        Hmh, this doesn't answer fully my question. So, if I set it to 100%, then it will use all cores, which is actually fine. But is there a security built in that it won't use literally all CPU on the computer? Otherwise, I don't understand why 100% is the default.

        jdaviescoatesJ 1 Reply Last reply
        0
        • E ekevu123

          Hmh, this doesn't answer fully my question. So, if I set it to 100%, then it will use all cores, which is actually fine. But is there a security built in that it won't use literally all CPU on the computer? Otherwise, I don't understand why 100% is the default.

          jdaviescoatesJ Offline
          jdaviescoatesJ Offline
          jdaviescoates
          wrote on last edited by
          #4

          @ekevu123 said in CPU Limit per app:

          But is there a security built in that it won't use literally all CPU on the computer?

          Yes, I believe so, but I don't fully understand either 🙂

          Perhaps @staff could elaborate (and then update the docs with the elaboration)

          I use Cloudron with Gandi & Hetzner

          1 Reply Last reply
          0
          • girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #5

            @ekevu123 Previously, we used something called "CPU Shares" (--cpu-shares in docker) . This option was a bit hard to understand since it comes to picture only when there is CPU contention between various apps (i.e when a server is overloaded to start with). We removed this and replaced it with an easier to explain "CPU Limit" (--cpu-quota in docker). This corresponds to how many cycles your app should be given. Like, you can say, give only 2 cores max to this app (in any situation). By default, apps have access to all your CPUs.

            However, isn't the point that the default should be less than that so that one app cannot take down the whole server?

            We couldn't think of a good default. Otherwise, apps will start out "crippled" and we thought it's better this way. I think if you have apps that are causing problems, only then should you look into tweaking this. This would be a stop gap measure before you try to report the issue and get the app fixed...

            1 Reply Last reply
            2
            • girishG girish marked this topic as a question on
            • girishG girish has marked this topic as solved on
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Bookmarks
            • Search