cPanel is a popular web hosting control panel that provides a graphical interface and automation tools designed to simplify the process of hosting a website. Among its many features, the STATISTICS section offers valuable insights into your server’s performance and resource usage. Two critical aspects of this section are caching and inodes usage. This guide will help you understand these components and how to manage them effectively.
Caching in cPanel
What is Caching?
Caching refers to the process of storing copies of files or data in a temporary storage location (cache) to reduce the time required to access the original files or data. This can significantly improve website performance and load times by serving cached content to users instead of generating it from scratch every time.
Types of Caching:
Browser Caching: Stores static files (like images, CSS, JavaScript) on the user’s browser for faster load times on subsequent visits.
Server Caching: Includes various types such as:
OPcache: Optimizes PHP performance by storing precompiled script bytecode in memory.
Memcached: A high-performance, distributed memory caching system that speeds up dynamic web applications.
Varnish Cache: Accelerates HTTP requests by caching content.
How to Manage Caching in cPanel:
Accessing Caching Options:
Log in to your cPanel account.
Navigate to the Software section to find caching tools like LiteSpeed Cache or Cache Manager.
Configuring Caching:
Select the caching tool you want to use.
Configure the caching settings according to your website’s needs, such as enabling browser caching, setting cache expiration times, and optimizing cache storage.
Clearing Cache:
Use the caching tool’s interface to clear or purge the cache when necessary, such as after updating your website content or changing configurations.
Inodes Usage in cPanel
What are Inodes?
Inodes are data structures on a filesystem that store information about files and directories, such as their size, owner, permissions, and disk location. Each file and directory on your server consumes one inode.
Why are inodes limited?
When a file is read, open or written by the operating system, the file inodes is checked by the server, and the more files or directories are hosted on the account, the more inodes are used. On Smartweb shared plans inodes are limited due to the number of resources the system requires to gather the data/locate the file from a large index table.
You can see the limits imposed depending on the plan
Smartweb Shared Hosting Limit
Standard 200,000
Business 250,000
Premium 300,000
Corporate 350,000
Professional 400,000 and more.
Exceeding the inodes limit
Once the inodes limit is reached, your account behaves in the same way as when the disk space limit is exceeded. Basically, you won’t be able to create/upload new files, receive emails, write data in the MySQL database, and your cPanel will show errors as no temporary files can be stored on your account anymore. You might also see your website down if the application used is doing continuous queries to the database, storing new data or if it requires to save new data in a temporary folder.
Resolving the issue
One of the ways to resolve the excessive inodes usage would be to upgrade to a higher plan to better accommodate your hosting account needs. For this, you need to get in touch with our support team.
The inode usage can also be reduced by removing website files (logs, uploads, images), emails or empty your mailbox spam folder.
In cases when the inode usage is higher due to many incoming emails or many temporary/cache/session files – we recommend an upgrade to VPS or Dedicated Servers to avoid reaching the limit again in future.
Why Inodes Usage Matters:
Resource Limits: Hosting providers often impose inode limits to prevent excessive file storage that can affect server performance.
Performance: High inode usage can slow down file system operations, impacting overall server performance and website responsiveness.
How to Check Inodes Usage in cPanel:
Accessing Inodes Statistics:
Log in to your cPanel account.
Go to the STATISTICS section on the right-hand side of the dashboard.
Look for Inodes Usage or similar indicators that show the number of used and available inodes.
Detailed Inodes Information:
Some cPanel setups include tools like Disk Usage under the Files section.
Click on Disk Usage to see a detailed breakdown of inode consumption by different directories and files.
Managing Inodes Usage:
Identify Excessive Inode Usage:
Use the Disk Usage tool to identify directories or files consuming a large number of inodes.
Look for log files, cache files, and temporary files that may be unnecessarily consuming inodes.
Clean Up Unnecessary Files:
Regularly delete old emails, unused themes and plugins, and temporary files.
Use the File Manager in cPanel to manually remove files and directories you no longer need.
Optimize Website Files:
Consolidate smaller files when possible, as each individual file consumes one inode.
Consider archiving old content or using database storage for dynamic data instead of creating numerous small files.
Monitor and Maintain:
Regularly monitor inode usage to prevent hitting the limit.
Set up automated scripts or use cPanel features to clear temporary files and caches periodically.
Understanding and managing caching and inodes usage in the cPanel STATISTICS section is crucial for maintaining optimal server performance and avoiding resource limitations. By effectively utilizing caching mechanisms, you can improve your website’s load times and user experience. Simultaneously, keeping an eye on inode usage and performing regular cleanups ensures your server remains efficient and responsive. Regular monitoring and proactive management will help you get the most out of your cPanel hosting environment.