CPU Limit per app
-
@ekevu123 yeah CPU stuff changed in version 8, see e.g. https://forum.cloudron.io/post/86976
-
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.
-
@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)
-
@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...
-