Resource Limits
CloudLinux isolates each hosting account and enforces resource limits to keep the server stable for everyone. Here's what those limits mean and how to monitor them.
What Are Resource Limits?
Every shared hosting account has a set of resource limits that control how much of the server's hardware your account can use at any given time. These limits prevent any single account from affecting the performance of others on the same server.
Types of Resource Limits
CPU (SPEED)
Measured as a percentage of a single CPU core. For example, a limit of 100% means your account can use the equivalent of one full CPU core. This affects how quickly your scripts execute and how many operations your site can process simultaneously.
Physical Memory (PMEM)
The amount of RAM your account can use at once. This covers everything running under your account, including PHP scripts, databases queries initiated by your scripts, and any applications. If your site runs out of memory, scripts will return errors.
I/O (Input/Output)
Controls how fast your account can read from and write to the server's disk. This affects file uploads, database operations, and any task that involves reading or writing data. Measured in MB/s.
Entry Processes (EP)
The number of PHP scripts or CGI processes that can run at the same time. Each visitor request that triggers a PHP page counts as one entry process while it's being handled. A limit of 20 EP means your account can process 20 simultaneous PHP requests.
Number of Processes (NPROC)
The total number of processes your account can spawn, including background tasks, cron jobs, and shell processes. This is typically higher than the entry process limit.
Inodes
The total number of files and folders your account can contain. Every file, directory, and email message counts as one inode. Accounts with hundreds of thousands of small files (such as excessive cache files or old email) may hit this limit.
What Happens When You Hit a Limit
- CPU limit reached: Your site slows down as scripts are throttled. Visitors may experience longer page load times.
- Memory limit reached: PHP scripts return "500 Internal Server Error" or "Memory Exhausted" errors.
- I/O limit reached: File operations and database queries slow down significantly.
- Entry processes maxed out: Additional visitors see "503 Service Unavailable" errors until a process slot opens up.
- Inode limit reached: You cannot create new files, upload content, or receive new emails.
How to Check Your Resource Usage
- Log into cPanel.
- Scroll down to the Metrics section.
- Click Resource Usage.
- Review the dashboard showing your current and historical usage for CPU, memory, I/O, and entry processes.
The Resource Usage page shows:
- Current Usage: A snapshot of what your account is using right now.
- Faults: The number of times your account hit a limit. Frequent faults indicate you may need to optimize your site or upgrade your plan.
- Historical graphs: Charts showing your usage over the past 24 hours, week, or month so you can identify patterns and peak times.
Tips for Staying Within Your Limits
- Use caching: Install a caching plugin (like WP Super Cache or LiteSpeed Cache for WordPress) to reduce PHP processing on every page load.
- Optimize your database: Remove post revisions, spam comments, and transient data regularly.
- Limit cron frequency: Avoid running cron jobs every minute. Set WordPress cron to run every 15 minutes or more.
- Clean up unused files: Delete old backups, unused themes and plugins, and temporary files to reduce inode usage.
- Optimize images: Compress images before uploading to reduce I/O usage when serving pages.