<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Control WebPanel Wiki &#187; cgroups</title>
	<atom:link href="http://wiki.centos-webpanel.com/tag/cgroups/feed" rel="self" type="application/rss+xml" />
	<link>http://wiki.centos-webpanel.com</link>
	<description>CentOS WebPanel Wiki</description>
	<lastBuildDate>Wed, 12 Feb 2025 20:38:16 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.1</generator>
	<item>
		<title>Cgroups - Limits per User</title>
		<link>http://wiki.centos-webpanel.com/cgroups-limits-per-user</link>
		<comments>http://wiki.centos-webpanel.com/cgroups-limits-per-user#comments</comments>
		<pubDate>Thu, 21 May 2020 21:42:58 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[cgroups]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1378</guid>
		<description><![CDATA[This module in CWP allows you to Limit Server Resources per User using cgroups. Video instructions Example of cgroups in action on CWP servers Dedicated Servers Limits Available - CPU, Memory, Disk VPS: KVM Limits Available - CPU, Memory, Disk VPS: OpenVZ Limits Available - Memory Please note that some Cloud/VPS providers have a custom [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>This module in CWP allows you to Limit Server Resources per User using cgroups.</p>
<p><strong>Video instructions</strong></p>
<p><object width="700" height="425"><param name="movie" value="https://www.youtube.com/v/ocgRqy9whtg?version=3&amp;showinfo=0&amp;theme=light&amp;fs=1&amp;rel=0&amp;iv_load_policy=3&amp;modestbranding=1"></param><param name="allowScriptAccess" value="always"></param><param name="allowFullScreen" value="true"></param><embed src="https://www.youtube.com/v/ocgRqy9whtg?version=3&amp;showinfo=0&amp;theme=light&amp;fs=1&amp;rel=0&amp;iv_load_policy=3&amp;modestbranding=1" type="application/x-shockwave-flash" allowScriptAccess="always" allowfullscreen="true" width="700" height="425"></embed></object></p>
<p><strong>Example of cgroups in action on CWP servers</strong></p>
<p><object width="700" height="425"><param name="movie" value="https://www.youtube.com/v/g0MK061KFNI?version=3&amp;showinfo=0&amp;theme=light&amp;fs=1&amp;rel=0&amp;iv_load_policy=3&amp;modestbranding=1"></param><param name="allowScriptAccess" value="always"></param><param name="allowFullScreen" value="true"></param><embed src="https://www.youtube.com/v/g0MK061KFNI?version=3&amp;showinfo=0&amp;theme=light&amp;fs=1&amp;rel=0&amp;iv_load_policy=3&amp;modestbranding=1" type="application/x-shockwave-flash" allowScriptAccess="always" allowfullscreen="true" width="700" height="425"></embed></object></p>
<p><strong>Dedicated Servers Limits Available</strong><br />
- CPU, Memory, Disk</p>
<p><strong>VPS: KVM Limits Available</strong><br />
- CPU, Memory, Disk</p>
<p><strong>VPS: OpenVZ Limits Available</strong><br />
- Memory</p>
<p>Please note that some Cloud/VPS providers have a custom kernel that doesn't work with cgroups or some limits are no supported.</p>
<p><strong>Requirements</strong><br />
- Default CentOS 7 kernel 3.10, possible to work with some others<br />
- CloudLinux is NOT supported</p>
<hr />
<strong>CPU Limit</strong><br />
Limit 100% is one CPU core fully used, all user processes are sharing this limit.<br />
For example, two user processes will have a CPU power of 50% each.</p>
<p>Limit range: 1 ~ (Number of cores) x 100, example for 4 cores: 1~400.<br />
Result: User websites might have a slower response if the user has higher demanding scripts.</p>
<p><strong>RMEM (Real Memory RAM)</strong><br />
RAM limit in MB, the value of 1024 MB will limit shared RAM for the user to 1GB.</p>
<p><strong>VMEM (Virtual Memory = RAM + swap)</strong><br />
Swap limit in MB, the value of 2048 MB will limit swap for the user to 2GB.<br />
It's recommended to have swap (VMEM) higher than RAM (RMEM).</p>
<p>Result: When the ram limit is reached system will kill the most memory demanding process.<br />
In case of killed script webserver could return server error 5xx on the active process.</p>
<p><strong>Disk Limit (read / write)</strong><br />
Set the limit in KB per second, you can monitor this limit with iotop.</p>
<p>Result: User websites might have a slower response if the user has higher demanding scripts.</p>
<p><strong>Useful commands</strong><br />
cgdelete cpu:USERNAME <em>(delete cpu limit for USERNAME)</em><br />
cgdelete memory:USERNAME <em>(delete memory limit for USERNAME)</em><br />
cgdelete blkio:USERNAME <em>(delete disk IO limit for USERNAME)</em></p>
<hr />
<strong>Check Also: Process, Inode and Open files Limits per User</strong></p>
<p><object width="700" height="425"><param name="movie" value="https://www.youtube.com/v/w-uc6Sta9NE?version=3&amp;showinfo=0&amp;theme=light&amp;fs=1&amp;rel=0&amp;iv_load_policy=3&amp;modestbranding=1"></param><param name="allowScriptAccess" value="always"></param><param name="allowFullScreen" value="true"></param><embed src="https://www.youtube.com/v/w-uc6Sta9NE?version=3&amp;showinfo=0&amp;theme=light&amp;fs=1&amp;rel=0&amp;iv_load_policy=3&amp;modestbranding=1" type="application/x-shockwave-flash" allowScriptAccess="always" allowfullscreen="true" width="700" height="425"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://wiki.centos-webpanel.com/cgroups-limits-per-user/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
