0

When being inside a CloudLinux OS Lightweight Virtual Environment (LVE) environment, it would be useful to be able to detect if having reached the system resource quota. Is that possible? Our desire is to adapt to infrequent overload by serving static error messages rather than failing to present dynamically created data.

Any links to API documentation would be most welcome, but I doubt there are any publicly available. The limits documentation suggests there should be a number of command line utilities, as well as a /proc/lve/list file. It seems however that (in the environment we have access to), there are no cli tools installed and the only file available in /proc/lve is (the seemingly also undocumented) task_sched_stat.

$ uname -r
3.10.0-962.3.2.lve1.5.64.el7.x86_64

There are a couple of files in /opt/liblve and /usr/include/lve. Can they be used as user? or are they merely intended for administration of LVE? From the function names one can guess that lve_check_fault() would be intended precisely to detect overuse from within a limited environment. However calling the lve_is_available() returns 0 suggesting no features of the library are available. Monitoring the system calls shows that the crucial failures are attempts to open the non-existent /dev/lve.

Our hosting provider's first suggestion is to use cPanel's REST API. Something which seems too heavy and too slow to be useful for mitigating an overload situation as it happens.

With our circumstances it is not relevant to scale to allow using more resources during these infrequent peaks. Gracefully handling the situation rather than dropping requests is the appropriate change.

sampi
  • 158
  • 5
  • Surely there are overload scenarios other than hosting-environment-specific types of resource exhaustion. Would it not make sense to let a proxy decide this based on exceeding response time limits, without regard for directly measurable resource consumption? – anx Aug 03 '22 at 06:42
  • 1
    I the general case, sure! For us specifically, not necessarily. The devil is in the details. We are really hoping for an answer to the question phrased. – sampi Aug 03 '22 at 07:03
  • There is now a post on [forum.cloudlinux.com](https://forum.cloudlinux.com/forum/cloudlinux-os-features/lve-limits-and-lve-manager/38775-is-it-possible-for-a-user-to-detect-having-hit-an-lve-limit) linking to this question. – sampi Aug 04 '22 at 06:30

0 Answers0