Editing Resource shortage
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 111: | Line 111: | ||
</ol> | </ol> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
{{Note|shell does not support floating-point arithmetic, i.e. you can not use expressions like <code>$(( 220000*1.5 ))</code>. To use floating point, try <code>bc</code> instead, something like this: <code><nowiki>$(echo 220000*1.5 | bc)</nowiki></code>.}} | {{Note|shell does not support floating-point arithmetic, i.e. you can not use expressions like <code>$(( 220000*1.5 ))</code>. To use floating point, try <code>bc</code> instead, something like this: <code><nowiki>$(echo 220000*1.5 | bc)</nowiki></code>.}} | ||
Line 142: | Line 135: | ||
Add the three units, 1000+2000+3000 = 6000 | Add the three units, 1000+2000+3000 = 6000 | ||
− | + | 101 gets 1000/6000 or 1/6th of the time. (16%) | |
− | + | 102 gets 2000/6000 or 1/3rd of the time. (34%) | |
− | + | 103 gets 3000/6000 or 1/2 of the time. (50%) | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== cpulimit === | === cpulimit === | ||
Line 160: | Line 147: | ||
says that container 101 cannot ever have more than 25 percent of a CPU even if the CPU is idle for the other 75% of the time. The limit is calculated as a percentage of a single CPU, not as a percentage of the server's CPU resources as a whole. In other words, if you have more than one CPU, you can set a cpulimit > 100. In a quad-core server, setting cpulimit to 100 permits a container to consume one entire core (and not 100% of the server). | says that container 101 cannot ever have more than 25 percent of a CPU even if the CPU is idle for the other 75% of the time. The limit is calculated as a percentage of a single CPU, not as a percentage of the server's CPU resources as a whole. In other words, if you have more than one CPU, you can set a cpulimit > 100. In a quad-core server, setting cpulimit to 100 permits a container to consume one entire core (and not 100% of the server). | ||
− | + | {{Warning|cpulimit is not yet implemented in kernels > 2.6.18 (i.e. development ones). Use stable kernel if you want this feature.}} | |
− | |||
− | |||
− | + | {{Stub}} | |
[[Category: Troubleshooting]] | [[Category: Troubleshooting]] |