What is inode Limit & How to Reduce Them?

What is inode Limit & How to Reduce Them?

The inode (index node) is a data structure in a Unix-style file system that describes a file-system object such as a file or a directory.

An inode is a record in a disk table, which contains information about a file or folder such as its size, owner, device node, socket, pipe, etc., except data content and file name. The number of inodes on your account equals the number of files and folders you have on it.

Every time a file is opened, the file’s inode is read by the kernel of the server. The more files/folders you have, the more inodes you use. And the more inodes you use, the more system resources your account consumes. That is why it is a common and necessary practise among hosts to limit the number of inodes on a shared server, where it is not suitable for one account to use system resources and leave no power for the other accounts.

Each inode stores the attributes and disk block location(s) of the object’s data. File-system object attributes may include metadata (times of last change, access, modification), as well as owner and permission data. Directories are lists of names assigned to inodes. A directory contains an entry for itself, its parent, and each of its children.
Inode number also called index number, it consists following attributes.

  • File types ( executable, block special etc )
  • Permissions ( read, write etc )
  • UID ( Owner )
  • GID ( Group )
  • FileSize
  • Time stamps including last access, last modification and last inode number change.
  • File deletion time
  • Number of links ( soft/hard )
  • Location of ile on harddisk.
  • Some other metadata about file.

Techabyte Solutions Shared Linux customers may see the number of inodes they are using on their cPanel/ Plesk/ Direct Admin panel.

Every time a file is opened, the file’s inode is read by the kernel of the server. The more files/folders you have, the more inodes you use. And the more inodes you use, the more system resources your account consumes. That is why it is a common and necessary practice among hosts to limit the number of inodes on a shared server, where it is not suitable for one account to use system resources and leave no power for the other accounts.
In case your account reaches the maximum number of inodes, it may be excluded from the backup system, or you may experience problems with file uploading, receiving emails, and see errors when accessing your website.
Default WordPress installation has approx 1,100 files/directories, default Magento install is 10,000, you would need to consider at least 30,000 to be an inode limit for the minimal package for your customers.

 

View Inode Usage 

If you are on cPanel, you can view your inode usage by logging in to your cPanel then check the right and check on the right navigation as per the image below.


You can log in your Direct Admin on https://yourdomain.com:2222 then checking on the right

Decreasing Inode Usage

Most people will not need to be familiar with Inodes if they are using their hosting in normal circumstances such as for a basic or intermediate website and normal email use. However, to ensure that all our customers get a consistently high level of service we have implemented inode limits per account for reducing resource abusers in our Shared Hosting and Reseller hosting.

Not all inode overages are caused by abuse though. It could just be that you need to do a bit of a clean up of your hosting files. If you experience issues caused by high Inode usage then this tutorial is to help you decrease the number of inodes on your account.

Here are some steps to reduce the inode number limit.

1) Delete Unnecessary Files And Folders

Examine the files and folders manually and decide on if the file is necessary or not. In case if the file is an old backup archive or if the folder is created for testing or staging purpose, you may remove it or download it locally via FTP or cPanel >> FileManager and delete it from the server.

2) Clear Old And Spam Emails

Deleting the old emails helps a lot in decreasing the inode usage. There might be spam mails in your mailbox which are of no use and deleting those mails will hep you to reduce the inode number. You can remove spam emails from email client or webmail. You can seek help from our support department which operates 24*7 to delete the mails easily via shell.

3) Clear The Cache Files

Most of the CMSs uses cache to reduce the response time and application like Joomla / WordPress can create a lot of cache files which can increase the inode usage tremendously. So it is advised to keep an eye on the cache folders and make sure the number of cache files is the least.

Most of the CMSs now provide the facility to purge the cache and you can make use of it to control the number of cache files. Or you can setup a cronjob to automatically clear the cache files periodically.

If you have the inode limit getting hit regularly or you still have issues after you have cleared up your files, we suggest you to upgrade the package to a higher one with higher inode limit or consider a Virtual Private Server. You can contact our 24/7 support for this.

 

 

 

Related Posts