Issue
What processes and/or resource usage are being limited with physical memory (PMEM) LVE limit?
Does it limit the PHP ram too?
Environment
- CloudLinux Manager
Solution
The cumulative usage of all the physical memory usage of a particular LVE unit (here it's a user, for instance) is supposed to be restricted, and here I'd recommend you get acquainted with the PMEM LVE limit docs in the article below:
Physical Memory Limit
Physical memory limit corresponds to the amount of memory actually used by end customer's processes. You can see individual process physical memory usage by monitoring RES column in top output for the process. Because similar processes (like PHP) share a lot of their memory, physical memory usage is often much lower then virtual memory usage.
Additionally physical memory includes shared memory used by the customer, as well as disk cache (disk cache may not be accounted in the statistics, see Disable Page Cache accounting below). In case of disk cache – if a user is starting to lack physical memory, the memory used for disk cache will be freed up, without causing any memory faults.
When LVE goes over physical memory limit, CloudLinux OS will first free up memory used for disk cache, and if that is not enough, it will kill some of the processes within that LVE, and increment fPMEM counter. This will usually cause web server to serve 500 and 503 errors. Physical memory limit is a much better way to limit memory for shared hosting.
Comments
0 comments
Please sign in to leave a comment.