What are Inodes?
Inodes (also known as index nodes) are data structures which define files and directories in Linux-based system. They store the information needed to read files but not file names nor the data itself.
Each inode has a unique number identifying it. The number contains information such as file type and size, creation or modification timestamp, disk location, and metadata.
Operations performed by you can result in inodes behaving in a number of ways. For example, if you were to copy a file, it would need to have a new name and inode number even though the associated data is identical.
Glossary of Inode Related Terms
- Inode Numbers are unique numbers assigned to each file in the system. Each time a file is created a new number is assigned to it.
- Data Structures are formats for handling (organize, process, store, retrieve) data.
- Files store actual information. The type of information stored often depends on the type of file it is. There are many file types, from data files to executable files.
- Directories are locations where files can be stored in hierarchical format. They provide a means to group files – or from another point of view, separate them.
How Inodes Are Related to Web Hosting
For those who have used web hosting accounts, you will know that using web hosting accounts is similar in some ways to local devices. You create files which are then used by the system.
Each file or directory which is created has both a name and an inode number. This is the reason why we can say that typically, inodes represent how many files and directories there are on a web hosting account.
To better understand the context of this to web hosting, you need to know that a fundamental in Linux is that the system recognizes everything as files. This includes hardware devices and file directories.
Each of these ‘files’ count towards the inode limit on your web hosting account. Each web host often offers different inode limits. The lower your inode limit, the fewer files and directories you can create and manage.
The Problem Isn’t Your Website Files
In most cases, however you decide to create your website isn’t a problem with regard to inode count. WordPress, for example, consists of less than 3,000 files and directories in a default installation setting.
No matter who designed your website or what application you’re using to power it you are not very likely to hit your inode limit. These are mostly quite high and if your file count really reaches that number – you have serious problems.
However, each time a visitor comes to your site a session file will be created. This session file of course takes up an inode. If your site has a significant number of visitors, you could find your inode count climbing faster than the session files are being destroyed.
When you reach your inode limit your site will start to fail – in the sense that visitors will begin to encounter errors.
How Many Inodes Do You Actually Get?
This isn’t an easy question to answer since it really does depend very much on the web host you choose. To give you a rough idea, here’s a list of some of the top web hosts and what they offer for their shared hosting plans.
Do note though that these limits often increase with the plan you buy in to. Consider them sort of a resource – the better a plan you get, the more files your account can support. This isn’t a hard rule though, so make sure to check your terms of service.
As you can see, the single word inode may simply refer to files, but it can have quite a significant impact on your site. There are also other contributing factors to inode count aside from your core website files.
While you may not have to keep monitoring your inode use, it is important to remember that there are limits. Don’t panic if you hit those, and simply follow some of the guidelines I’ve shared above.