Skip to content
Back to Blog
Performance11 min read

Advanced CloudLinux LVE Checklist: 12 Steps Before Go-Live

Deep LVE tuning for experienced admins—edge-case limits, CageFS overlays, MySQL Governor profiles, and real-world performance traps that break production launches.

Written by Abdul AbrorTechnical Hosting Support Engineer
Advanced CloudLinux LVE Checklist: 12 Steps Before Go-Live
On this page

You've installed CloudLinux and created a few packages. That's table stakes. The twelve steps below assume you already know what an LVE is and why MySQL Governor exists—this is the pre-flight checklist I run before moving a high-density shared host or reseller node into production, covering the edge cases and tuning knobs that separate a stable launch from three A.M. pages.

1. Baseline resource usage without LVE enforcement

Before you cage anything, measure normal load. Disable LVE limits temporarily on a representative test account (set CPU/memory/IO to zero in the package), let it run typical workload for twenty-four hours, and log lveps or lvetop output every five minutes. You need the 95th percentile, not the average—WordPress cron spikes, backup jobs, and plugin updates all create short bursts that will hit your faults counter if limits are too tight.

In support tickets I handled, the usual culprit was setting PMEM at 1 GB when the account's legitimate PHP processes peaked at 1.2 GB during nightly backups. The account looked fine during business hours, then faulted every night at two A.M.

2. Separate LVE packages for application profiles

Don't use one-size-fits-all limits. A Magento store, a static brochure site, and a forum have completely different resource fingerprints. Create at least three package tiers:

  • Static/low-PHP: high NPROC (50+), moderate CPU (100%), low PMEM (512 MB), minimal IOPS.
  • Standard CMS: NPROC 30-40, CPU 150-200%, PMEM 1-2 GB, IOPS 2048.
  • Heavy apps (WooCommerce, Moodle): NPROC 60, CPU 250%+, PMEM 3-4 GB, IOPS 4096, and consider IO limits in bytes/sec not just operations.

The SPEED limit (CPU in percent-seconds) needs headroom above your NPROC × average script runtime or you'll throttle before hitting entry-process limits.

3. Enable IO limits in both dimensions

Most admins set IOPS and stop. Add throughput caps (lvectl set IO_WRITE_BPS and IO_READ_BPS) or one user running dd will saturate your SAN while staying under the IOPS fence. I typically start at 20-30 MB/sec write, 40 MB/sec read for standard packages and adjust after a week of iostat logs.

Check your storage backend first—NVMe can handle tighter IOPS limits than spinning rust, and network-attached storage adds latency that makes small IOPS caps feel even smaller.

4. Tune MySQL Governor mode and user-mapped queries

Governor ships in abusers mode (restrict only the top consumers). That's fine for migration but terrible for production SLA. Switch to single mode so every LVE gets its own MySQL resource slice:

dbctl set single
dbctl reload

Then map database users to LVE IDs. If your app uses a shared database user across accounts (bad practice but common in legacy setups), Governor can't isolate them—one user's slow query punishes everyone. Fix it by creating per-account DB users or accept that Governor will be less effective.

Set db-governor-lve.xml limits conservatively: start with CPU 70%, read/write 50 MB/sec per LVE. A single SELECT joining four large tables without indexes can peg a core for thirty seconds.

CageFS skeletons break in subtle ways. After enabling CageFS, log into a test account via SSH and check:

ls -la /usr/bin/php
which composer
echo $PATH

If /usr/selector/php binaries aren't visible or /usr/local/bin is empty, your skeleton is incomplete. Run cagefsctl --force-update and confirm /usr/share/cagefs-skeleton contains mounts for every interpreter and CLI tool your users expect. I've seen production launches delayed because Node.js or git were missing from the cage.

For custom binaries (say, a reseller installed ffmpeg in /opt), add a mount point:

cagefsctl --add-dir /opt/ffmpeg
cagefsctl --force-update

6. Set realistic EP (entry processes) separate from NPROC

NPROC is the hard process limit inside the LVE. EP is the Apache/LiteSpeed connection cap. A user can hit EP without touching NPROC if they open twenty slow-loading pages simultaneously—each connection waits in the web server queue. Set EP at 60-80% of NPROC so you have room for background cron, SSH sessions, and CLI PHP without blocking web traffic.

If you run LiteSpeed, EP maps to LSAPI_CHILDREN. For Apache with mod_lsapi, check /etc/sysconfig/httpd and align lsapi_backend_children with your EP values.

7. Enable faulting notifications but filter the noise

LVE faults are diagnostic gold if you route them correctly. Enable per-user email notifications:

lvectl set notify-fault=1

But don't send every fault. A brief PMEM fault during a plugin update isn't worth waking anyone. Configure lve-notify.conf to alert only when an account exceeds limits for more than sixty seconds or faults on CPU twenty times in ten minutes—that's a real problem, not a transient spike.

Log faults to a central aggregator (syslog to a SIEM or Graylog) so you can trend which accounts grow over time.

8. Test CageFS with real user workflows

Here's where launches break. Create a test account, enable CageFS, and run the actual workflows your customers use:

  • wp cli commands.
  • Composer installs and updates.
  • Git pulls from private repos (check SSH agent forwarding and .ssh/config visibility).
  • Cron jobs that shell out to Python or Ruby.

CageFS isolates /tmp, so if an app writes a lock file to /tmp and a cron expects to read it, they'll see different temp directories. Either mount a shared /tmp (not recommended) or fix the app to use a home-directory path.

9. Pre-calculate and reserve LVE headroom for resellers

If you sell reseller accounts, each reseller's LVE is the parent of their end-user LVEs. The reseller package must have aggregate limits at least equal to the sum of all child accounts they could provision. I see this broken constantly: a reseller with ten 2 GB PMEM accounts needs at least 20 GB PMEM in their own LVE or the first nine accounts will starve the tenth.

CloudLinux doesn't enforce this automatically. You have to audit reseller child-account totals and bump the parent LVE manually.

10. Disable or tune PHP-FPM pools if you run PHP Selector

PHP Selector and PHP-FPM pools can fight. Selector uses mod_lsapi or CageFS-wrapped FastCGI; if you also run standalone PHP-FPM pools (common for custom apps), those pools run outside the LVE unless you explicitly assign them. Check /opt/alt/phpXX/etc/php-fpm.d/*.conf and add:

listen.owner = username
listen.group = username

Then restart the pool. Verify with lveps that PHP-FPM workers appear under the correct LVE ID. If they don't, the pool bypasses limits entirely.

11. Validate that kernel module and userland versions match

A version skew between the CloudLinux kernel module and lve-utils causes bizarre behavior—faults not recorded, limits ignored, or lvetop showing zero usage. After any yum update, confirm:

modinfo kmod-lve
rpm -q lve-utils

Both should share the same major version. If the kernel is 1.8.x and lve-utils is 1.7.x, update both and reboot. I once spent four hours debugging phantom faults that vanished after a reboot synced the module.

12. Load-test with realistic concurrency before DNS cutover

Synthetic tests (hitting one URL in a loop) won't reveal LVE bottlenecks. Use a tool like siege or locust to simulate twenty concurrent users per account, each navigating multi-page workflows (login, search, checkout). Watch lvetop in real time:

lvetop -p 1

Look for EP faults (user hitting connection cap) versus PMEM or CPU faults. EP faults mean your web server concurrency is too low; PMEM/CPU faults mean the app itself is the problem. The fix is different for each.

Run the load test for at least thirty minutes. PHP opcache warmup, MySQL query cache population, and disk buffer states all change the resource profile in the first few minutes.

What happens when limits are still too tight?

Even after these twelve steps, you'll adjust limits post-launch. That's normal. The key is knowing which limit to adjust. If lvetop shows high CPU usage but no faults, the user is comfortably under their cap—don't raise it. If you see frequent PMEM faults but CPU is at 30%, raise PMEM, not CPU.

Keep a changelog of limit adjustments per package and per account. After three months, you'll have enough data to create new baseline packages that reflect actual usage.

FAQ

Can I disable LVE limits for a single domain inside an account?
No. LVE limits apply to the entire UID (the cPanel account). You can't exempt one WordPress install from limits while caging another in the same account.

Why does lvetop show 0% CPU but the website is slow?
You're probably hitting IO or MySQL Governor limits, not CPU. Check lveps -o --show-io and dbtop to see disk and database throttling.

Do LVE limits apply to root or reseller SSH sessions?
No. Root and reseller logins bypass LVE. If you su - username, you enter the LVE. This is why testing as root gives misleading results.

Can I use CloudLinux on a single-tenant VPS?
Yes, but it's overkill unless you're hosting multiple isolated apps. The per-tenant overhead (CageFS, Selector) makes more sense on shared hosting.

What's the difference between SPEED and CPU limits?
SPEED is the total CPU-seconds consumed in a time window; CPU is the instantaneous percentage. A process can run at 50% CPU for ten seconds and hit the SPEED cap if the cap is set to four CPU-seconds.

Final sanity check list

Before you flip DNS:

  • Run lvectl list and confirm every active account has non-zero limits.
  • Check that CageFS is enabled globally (cagefsctl --enable-all).
  • Verify MySQL Governor is in single mode (dbctl get).
  • Review /var/log/lve-stats.log for unexpected faulting patterns in your test accounts.
  • Confirm your monitoring stack (Nagios, Zabbix, whatever you use) has alerts for LVE fault rates above your threshold.

Most pre-launch LVE problems come from assumptions—assuming the skeleton is complete, assuming reseller limits are auto-calculated, assuming PHP-FPM pools are inside the cage. Verify each assumption with a command and a real test account. That's the list.