Understanding Cloud Linux LVE Limits

sh-admin

Active member
Registered
Joined
Sep 29, 2016
Messages
66
Points
0
Cloud linux is a well known Operating system these days due to its features that makes things easier for end users as well as the system administrators.
LVE is short for Lightweight Virtual Environment which is the driving technology behind CloudLinux (CL). it's a kernel technology which was developed by the cloud linux team which helps the shared hosting companies to achieve service quality & their uptime goals for their valuable customers.


How LVE works ?
The goal of LVE is to make sure that no single web site can bring down the web server in a shared hosting environment.
In a shared hosting environment , a single website account can consume all the server resources such as CPU, IO, Memory resources or apache processes (due to being under a DDoS attack, poorly written script, etc.) -- and bring down the server. LVE prevents such issues. With LVE a system administrator can set the limits on usages of server resources for the each website account hosted on a shared server. LVE makes sure that all the website accounts get fair share of the server's resources, and that no website account can use more than the limits set for that website account.

How the limits are set ?
In order to set the server resources limits for the website account in a shared hosting environment we will have to install LVE manager . LVE manager generally installed by default on most servers however if you found its missing , you can install it with below command.

Yum install lvemanager

OR , you can set the limits with Cpanel LVE manager plugin” which is located under Server Configuration >> Cloud Linux LVE manager on your cpanel server.
Let's see what these Limits are

a) CPU Limits –
CPU specifies the % of total CPU of the server available to each LVE ( Website Account ). NCPU specifies the number of cores available to LVE. The smallest of the two is used to define how much CPU power will be accessible to the website account.
When a website account hits CPU limit, processes within that limit are slowed down. For example, if you set your CPU limit to 20%, and processes inside LVE want to use more then 20% they will be throttled (put to sleep) to make sure they don't use more than 20%. In reality, processes don't get CPU time above the limit, and it happens much more often then 1 second interval, but the end result is that processes are slowed down so that their usage is never above the CPU limit set.

b) Virtual Memory Limit
The virtual memory limit is slightly tricky concept to explain . The virtual memory is the RAM which is actually used when you load a webpage . When you load a webpage lots of memory can be shared with other processes. For example , if your webpage requires a particular php library in memory and if that same library is needed by other user the server doesn't have to use its actual RAM ( physical RAM attached to the server ) to load that library as it will be already loaded for some one else from the Virtual memory.
The virtual memory limit restricts the maximum amount of RAM that each user can use at any point of time . With this limit each LVE ( Website account ) can use up to say an XX GB of virtual memory. If the account hits this limit, the website will show a 500 error message.

c) Physical Memory Limit

The Physical Memory limit represents the amount RAM that is being used by a website account. Every process created by a website account will use memory such as loading php library , every PHP page that is being accessed , a mail connection etc.. Unlike CPU usage where a percentage value is configured as a limit , we have to set a fixed amount of RAM limit e.g. 4 GB , 8 GB .
If this value reaches 100% or hit the set limit , the website may begin to experience PHP errors , 500 errors , 503 errors . In Very extreme cases may see a Cloud linux error page.

d) I / O Limits
The I/O Limits represents the disk activity that is being used by a website account. Any task such as editing , writing files on server , serving website pages, data gets read from the hard disk, and some temporary files may need to be written.
Most users reach these limits frequently. This is because most scripts tries to read and write as fast as possible. We can limit the maximum disk speed of each website account on the server in order to make sure that no single website account can saturate the disk drives which will cause performance issues for other websites accounts hosted on the server.
When a website account hits this limit , it will not kill or stop the website however will cause all processes to slow down and will cause delay issues. Generally you won't notice this setting ever increases unless a disk intensive operation like generating a large backup of a website. The IO limits will only affect DISK IO, and will have no effect on network.

e) Entry Process Limit
Entry Processes are the number of processes that enter a LVE ( website account ). Entry process limit control the number of processes which enters into LVE.
The process enters into LVE ( Website Account ) when there is a new HTTP connection for accessing PHP/CGI script or a page , when a new crob started or a SSH connection to the server. The Entry Processes Limit was created to actually protect the web server from DDOS attacks. In a case like when a website account is under DDOS attack , the attack ties up all the Apache connections by hitting some slow web pages on a server. Once all the Apache slots got busy serving the website , other users accessing the websites will not be able to connect the server and will start facing the website down issues. Now As we have CPU limit in place , the website will respond to request slower and slower , causing more connections to be tied up.

This is quite a worst case , in order to fix such issues the entry processes limit was created. It will actually limit the concurrent connections to the web server.
If this limit hits the web server starts throwing the 508 error page once the number concurrent requests for a particular website account goes beyond the limit.
 

LJSHost

Well-known member
Hosting Provider
Registered
Joined
Jul 5, 2016
Messages
1,031
Points
63
Nice post.

Many people often get confused about what CloudLinux is and how it works at the technical level in addition to the advantages it has to any type of shared hosting.
 
Latest Threads
Replies
1
Views
24
Replies
0
Views
176
Replies
1
Views
37
Replies
2
Views
81

Latest postsNew threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top