![](https://seccdn.libravatar.org/avatar/99bbf0e2807d0c1a81e021665cc9e09f.jpg?s=120&d=mm&r=g)
On Monday 25 September 2006 15:40, Gaël Lams wrote:
I think that those numbers can be changed in sysctl.conf to change them permanently but I was wondering whether these numbers were some kind of hard limit (i.e I thought that you could have more inodes on one partition but it should be no more than the limit I saw in /proc ). From your answer I understand that it's not the case
i wasn't aware of sysctl.conf, to be honest. It may be i who is misunderstanding, and not you.
Kind of curiosity: do you know how these numbers are estimated? Because I had a look on both a virtual machine and physical machines, both with SuSE 9.3 (i.e same kernel) and the numbers (file-max and inode-nr) are really differents.
As an abstract example: let's say we have 1000 blocks of space, and we allocate 1 inode/block. We will then have a max of 1000 inodes (1000/1). If we allocate 4 blocks/inode, we then have a limit of 250 (1000/4) inodes. Each file inode can point to, at most, one file, so we would have a hard limit of 250 files in that case. When formatting a partition there are tradeoffs to be made in selecting the block sizes. If you know you'll need lots of small files, select a small bytes/inode ratio (e.g., 1k-4k/inode). OTOH, if you know you're only going to store lots of large files, selecting a large ratio, e.g. 32k/inode, can be more performant. However, on such a system you would use 32k of space even for files which are 1 byte in size. On today's drives, this normally poses little problem, though. -- ----- stephan@s11n.net http://s11n.net "...pleasure is a grace and is not obedient to the commands of the will." -- Alan W. Watts