The HyperNews Linux KHG Discussion Pages

Increasing number of files in system

Forum: The Linux Kernel Hackers' Guide
Re: Question Tunable Kernel Parameters?
Keywords: kernel tuning, file handles, Bus error
Date: Sat, 25 Oct 1997 11:19:38 GMT
From: Simon Cooper <>

Increasing number of open file handles in kernel.

I have successfully increased the number of files on my system (Linux 2.0.30) by editing the following file:


I increased NR_OPEN to 1024, NB. Don't make it any higher than this as it will break other code in the kernel and your new kernel wont boot !

I also increased NR_INODE to 5000, and NR_FILE to 4096.

I then rebuilt the Kernel (and modules for good measure) and installed the new image.

Note: Its always a good idea to have your original Kernel image available. I installed a boot block in my MBR using lilo, and added an entry for my original kernel I named

For my root system on /dev/hda2 I added the following lines to my existing /etc/lilo.conf

image=/ image=linuxS root=/dev/hda2


1. None: Increasing number of open files parameter by Simon Cooper newest