How to Modify CloudLinux LVE Limit

I’m using CloudLinux as server OS in OnApp Cloud Platform. Although I’m the only user in the server, I like CloudLinux for system stability as my website regularly under DOS/DDOS attack. However, I would like to use the resource as much as possible & not the default setting.

The best way to control LVE limits is using LVE Manager or lvectl command line tool. The limits are saved in /etc/container/ve.cfg. In other word, we can modify this file directly to modify limit.

Below is the sample of ve.cfg

<?xml version="1.0" ?>
		<cpu limit="25"/>
		<ncpu limit="1"/>
		<io limit="1024"/>
		<mem limit="262144"/>
		<other maxentryprocs="20"/>
		<pmem limit="262144"/>
		<nproc limit="0"/>
	<lve id="501">
		<cpu limit="95"/>
		<ncpu limit="4"/>
		<io limit="102400"/>
		<mem limit="524288"/>
		<other maxentryprocs="100"/>
		<pmem limit="524288"/>
		<nproc limit="100"/>

For the user id, 501 the resource allocated is as follow

<cpu limit="95"/>			-> CPU usage limit is 95%
<ncpu limit="4"/>			-> Number of CPU limit is 4
<io limit="102400"/>			-> IO limit is 102400 kB/s
<mem limit="524288"/>			-> Virtual memory limit is 524288 kB
<other maxentryprocs="100"/>		-> Number of Entry Processes limit is 100
<pmem limit="524288"/>			-> Physical Memory limit is 524288 kB
<nproc limit="100"/>			-> Number of Processes limit is 100

Install CloudLinux cPanel Module (LVE Manager) in OnApp Cloud VPS

Recently, I bought Cloud VPS in OnApp platform. The best thing about OnApp platform is they provide CloudLinux and Windows OS without additional cost (at least my OnApp Cloud VPS provider).

After the system provision CloudLinux OS for my VPS, I went straight away to install cPanel/WHM.

Unfortunately, CloudLinux cPanel module or plugin not installed together. This module is very useful to modify CloudLinux setting such allocating CPU & Memory resources for individual cPanel user. You can should be able to see user statistics too.

To install CloudLinux cPanel Module or plugin run the following command in SSH with root login.

yum -y install cpanel-lvemanager

Once finish, login to WHM, you will see an option to modify CloudLinux setting in “Server Configuration” under “CloudLinux LVE Manager”. In the screen, you should be able to allocate server resources such as CPU, RAM, IO to each user or group of user. You can let the user to see their statistic too.