Skip to content

Managing the inode count

Learn what an inode count is, how to check it for your account, and how to reduce it if needed.

An inode is an internal data structure that Linux uses to store information about a filesystem object (file or directory). The inode count equals the total number of files and directories in a user account or on a disk. Each file or directory increases the count by 1.

To ensure server reliability and performance, Ruachost.com imposes inode limits on shared hosting accounts. If your account reaches the limit, you need to reduce it by removing files or directories.

  • High inode counts can cause long filesystem checks, impacting server uptime.
  • Large numbers of files slow down backups and restores; many small files take longer to recover than fewer large files.

The method depends on your hosting package:

  • Shared or reseller hosting: Use cPanel or the command line.
  • Managed VPS, managed dedicated, or unmanaged packages: Use the command line.
  1. Log in to cPanel.

  2. In the STATISTICS sidebar, locate File Usage.

    • The first number shows the inodes used.
    • The second number shows the maximum allowed.
  1. Log in to your account via SSH.
  2. Navigate to your home directory:
cd ~
  1. To see the total inode count:
find . | wc -l
  1. To see inode usage for each top-level directory:
echo "Inode usage for $(pwd)" ; for d in `find -maxdepth 1 -type d | cut -d\/ -f2 | grep -xv . | sort`; do c=$(find $d | wc -l) ; printf "$c\t\t- $d\n" ; done ; printf "Total: \t\t$(find $(pwd) | wc -l)\n"

Tip: Change to a subdirectory (e.g., cd public_html) and rerun the command to find which folders are using the most inodes.

If your inode usage is too high, identify the cause and take action. Common causes include:

  • Cron jobs or automated processes: These may create many files quickly. Modify or disable the process, or delete unnecessary files.
  • Email messages: Old emails in Trash or Sent folders accumulate. Download if needed, then delete them on the server.