inode Limits in Hosting: What Consumes Them and How to Count Them

Ran out of inodes and don't know which files filled them up? Here's the exact counting method, high-usage directories, and practical solutions for shared hosting and dedicated servers.

6 min Updated 13 Sep 2026

"No space left on device" Error While the Disk Is Empty

Your website is down, the application log is full of No space left on device errors, but df -h shows 60 percent of the disk is free. This is the classic scenario of running out of inodes. Before taking any action, run a command to make sure:

df -i /

Look at the IUse% column. If the number is above 90, the problem is inodes. Now the main question: what has consumed so many inodes, and how should you find it?

What Is an inode and What Exactly Consumes One Unit of It

Every file, directory, symlink, socket, and pipe in the Linux filesystem has one inode. Empty files also consume inodes. A 0-byte file consumes exactly the same number of inodes as a 10-gigabyte file. This is a point that surprises many people.

When we say "number of files," we are in practice referring to the number of used inodes. Every time you create a new file, one inode is deducted from the free pool. Deleting a file also returns it. So the inode limit in shared hosting means the cap on the number of files you can have, not their size.

Four things that burn the most inodes on shared hosting:

  • Framework caches — Laravel creates one file in storage/framework/views for each compiled view. WordPress with page builder caches like Elementor does the same.
  • Email mailboxes — Each email is a separate file in the filesystem. A mailbox with 50,000 old emails has consumed 50,000 inodes.
  • Session files — In /tmp or session.save_path, each open session creates a file. Unexpired sessions on a high-traffic site accumulate quickly.
  • Fragmented backups — A backup process that dumps each database table into a separate file instead of a single compressed archive.

Where People Go Wrong: Deleting Large Files

When you see an inode error, the first reaction is to go after the largest files. This has no effect. Deleting a 2-gigabyte file only frees one inode. The problem is about count, not size. The sign of this mistake: df -h shows 10 GB of space freed, but df -i is still 99 percent full and the site still throws errors.

The Exact Method for Counting inodes on Shared Hosting

On shared hosting with cPanel or DirectAdmin, there is usually a "File Usage" or "inode Usage" section in the panel itself that shows the statistics. But if you need the exact number and a breakdown by directory, use SSH. If your hosting does not have SSH, use the panel's File Manager and open directories one by one — a slow but effective method.

The main command for counting inodes in a directory:

find /home/username -xdev -printf '%h\n' | sort | uniq -c | sort -rn | head -20

This command shows the 20 directories with the highest number of files. The -xdev flag prevents crossing filesystem boundaries so that virtual directories like /proc and /sys do not appear in the results. Look at the output; usually one or two directories account for 80 percent of the usage.

To count all files in a specific directory:

find /home/username/public_html -type f | wc -l

And to see the number of files in a directory along with its immediate subdirectories:

for d in /home/username/public_html/*/; do echo "$(find "$d" -type f | wc -l) $d"; done | sort -rn | head

Directories That Usually Have the Largest Share

Based on experience with customer hosting accounts, these five items are almost always at the top of the list:

DirectoryReason for UsageSolution
mail/ or etc/Accumulation of old emailsDelete old emails from webmail or set up automatic cleanup
public_html/wp-content/cache/Unexpired cachesClear cache with a plugin or manually
public_html/wp-content/uploads/Images resized by WordPressRemove extra sizes with a plugin
tmp/ or session/Unexpired sessionsSet session.gc_maxlifetime to a lower value
logs/Logs that are not rotatedEnable logrotate

After identifying the issue, delete the extra files and run df -i again. If the number does not go down, a process such as cron or a queue worker is probably creating new files continuously. In that case, run lsof +L1 to see deleted but still open files — these are holding inodes locked and will not be freed until the process is closed.

When the Number of Files Is Inherently High

Sometimes the problem is not disorganization; the project structure inherently requires tens of thousands of files. Online stores with tens of thousands of product images, email services with high message volumes, or projects that keep node_modules and vendor on the hosting — all of these quickly hit the ceiling.

In this case, you have two options. First: remove unnecessary files from the hosting and keep them in a separate storage service. Move product images to a CDN and keep only resized versions on the hosting. Second: if the number of files is truly part of the nature of your work, migrate to a dedicated server. On a dedicated server, you decide during disk partitioning what percentage of space is allocated to inodes. The ext4 format by default creates one inode per 16 kilobytes of space; with the -i flag in mkfs.ext4, you can change this ratio:

mkfs.ext4 -i 8192 /dev/sdb1

This command creates one inode per 8 kilobytes — twice the default. The cost is that the usable disk space decreases slightly because you are storing more metadata. For today's NVMe disks, this cost is usually negligible, but if you have large files and a low count, the default ratio is more optimal.

Prevention: Know the Numbers in Advance

On shared hosting, ask for the inode cap from the service specification page or from support. This number is usually between 50,000 and 500,000. Then set up a cron job that checks the status weekly and emails you if it exceeds 80 percent:

df -i / | awk 'NR==2 {if ($5+0 > 80) print "inode usage: " $5}' | mail -s "inode Alert" you@example.com

If you are on Linux hosting and do not have SSH access, use the tools available in the panel or the report files. The important point is not to wait for the error; when the error occurs, the site is already out of service, and every minute of downtime costs money.

Also, if you use WordPress, configure caching plugins to automatically clean up old files. Plugins like WP Rocket have a "Clear cache after…" option. And if you use page builders, keep CSS and JS caching in compressed mode rather than separate file mode.

Frequently Asked Questions

What is the inode limit on shared hosting?

The exact number depends on your hosting company and plan, and it usually ranges between 50,000 and 500,000 inodes. You can find this number on the service specification page or by asking support. On a dedicated server, you determine this number yourself during partitioning.

How do I find out which directory has consumed the most inodes?

If you have SSH, run the command find /home/username -xdev -printf '%h\n' | sort | uniq -c | sort -rn | head -20. The output shows directories in order of file count. Without SSH, use the panel's File Manager and check main directories such as mail, public_html, and tmp.

Does deleting large files free up inodes?

Only one inode is freed per deleted file, regardless of the file size. If the problem is the number of small files, deleting large files has a negligible effect. First identify directories with a high file count, not directories with high volume.

What is the difference between inodes and disk usage?

Disk usage is measured in bytes or gigabytes and relates to the volume of data. inodes count the number of files and directories. A 10-gigabyte file consumes one inode, and 10,000 empty files also consume 10,000 inodes — while the disk usage is almost zero. Both limits operate independently of each other.

Was this page helpful?