Re: a lot of used inode in 2.1.x kernels

Bill Hawes (whawes@star.net)
Sun, 19 Jul 1998 21:38:35 -0400


Andrea Arcangeli wrote:
>
> Running a find over the whole fs in 2.0.x and in a 2.1.x show differences:
>
> 2.0.33:
>
> andrea@ark:~$ cat /proc/sys/kernel/inode-nr
> 432 337
>
> 2.1.110-pre2:
>
> andrea@dragon:~$ cat /proc/sys/fs/inode-nr
> 4112 16
> andrea@dragon:~$ cat /proc/sys/fs/inode-max
> 4096
>
> At first how can be possible that the number of allocated inodes is
> greater than the max in 2.1.110?

It's possible to increase inodes one page past the inode-max limit.

> As second is there a way to avoid the use of so many inodes in 2.1.x
> kernels? And why 2.1.x leave so many inode used?
>
> So many inode allocated should help a lot to make not happy low memory
> machines (I think this is the first cause of the find />/dev/null
> slowdown at second launch on 2.1.x with little ram)...

I think the kernel would be better off with an inode limit that scaled
with memory size. Using a simple value like

max_inodes = (num_physpages >> 1);

would probably work well over a wide range of systems. The current
default of 4096 is too big for anything much under 32M. You might want
to experiment with different limits.

Regards,
Bill

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html