On some Unix file systems (for example, ext * fs) that actually correspond to the system administrator who sets the relative parameter when creating the file system.
If the file system will contain many small files (a typical example is news and mail servers), you need a large number of inodes, since for each object (file or directory) you need an inode.
If, on the other hand, the file system will host larger files (for example, a video server), you do not need so many inodes.
Since inodes take up space, it is important to strike a balance between efficiency and effectiveness and have enough descriptors for your purpose. A simple method is to calculate the average file size in an active file system with similar usage patterns and use this number as the base value for the byte / index ratio on the new FS. This would allow FS to function while the volume is being filled, until usage patterns change dramatically.
If you are actually developing a new file system, and not just creating a volume, you should consider the idea of dynamically allocating inodes dynamically, like some other common Unix file systems (e.g. JFS, XFS, Reiserfs). This would make your file system a little more flexible, although it is generally believed that the FS dynamic structures greatly complicate the recovery process due to corruption issues.
source share