Getting started with CloudLinux OS Shared
Allocating limits to each tenant using CLI
CloudLinux’s Lightweight Virtualized Environments – LVEs – are created with user IDs and are managed with lvectl command.
You can view the list of LVE’s using the following syntax:
lvectl list
Let’s check current limits for a single user cltest3, as an example.
First, let’s find out its id by running
id cltest3
Then, let’s list personal limits according to the displayed id
lvectl limits 504
The columns displayed are CPU speed limit, physical memory limit, virtual memory limit, entry processes, the number of processes, input-output and input-output per second.
Each limit can be modified using “lvectl set” command.
In this case, let’s change CPU limit to one and a half core:
lvectl set 504 --speed=150%
lvectl limits 504
We can use a number of different limits in one line. For example, we can set the speed limit to 1 full core, change physical memory limit to one gigabyte and io limit to two thousand forty eight.
lvectl set 504 --speed=100% --pmem=1G --io=2048
lvectl limits 504
Also, we can remove all limits for LVE, setting them to “unlimited”:
lvectl set 504 --unlimited
lvectl limits 504
Let’s set some limits for the same user again.
lvectl set 504 --speed=100% --pmem=1G --io=2048
Current usage by LVE could be seen with ‘lvetop’ command.
lvetop
If you want to get more advanced information about the user processes inside LVE, then use ‘lveps’ with “p” key. It will list all processes and threads that belong to LVE.
lveps -p
For more information regarding limits management, visit this documentation page.