Article View: be.comp.programming
Article #16412Re: open filepointers
From: Lieven Marchand
Date: Sat, 06 May 2000 00:00
Date: Sat, 06 May 2000 00:00
55 lines
2606 bytes
2606 bytes
carl@weirdhenge.org (Carl Declerck) writes: > On 04 May 2000 23:06:25 +0200, Lieven Marchand <mal@bewoner.dma.be> wrote: > > >> 'makkelijk' is ff de kernel hercompilen neem ik aan? > > > >Ja. > > Hmmm: > > # echo 16384 > /proc/sys/fs/file-max > # ulimit -n 16384 Hmmm to you too ;-) From ~linux/Documentation/filesystems/proc.txt: file-nr and file-max -------------------- The kernel allocates file handles dynamically, but doesn't free them again at this time. The value in file-max denotes the maximum number of file handles that the Linux kernel will allocate. When you get a lot of error messages about running out of file handles, you might want to raise this limit. The default value is 4096. To change it, just write the new number into the file: # cat /proc/sys/fs/file-max 4096 # echo 8192 > /proc/sys/fs/file-max # cat /proc/sys/fs/file-max 8192 This method of revision is useful for all customizable parameters of the kernel - simply echo the new value to the corresponding file. The three values in file-nr denote the number of allocated file handles, the number of used file handles, and the maximum number of file handles. When the allocated file handles come close to the maximum, but the number of actually used ones is far behind, you've encountered a peak in your usage of file handles and you don't need to increase the maximum. However, there is still a per process limit of open files, which unfortunately can't be changed that easily. It is set to 1024 by default. To change this you have to edit the files limits.h and fs.h in the kernel source tree. Finally, change the definition of NR_OPEN and recompile the kernel. Dus je eerste operatie is wel nuttig maar ulimit gaat weinig uithalen. -- Lieven Marchand <mal@bewoner.dma.be> If there are aliens, they play Go. -- Lasker
Technical Details
Message-ID:
<39144013$0$11457@bru5-newsr1.be.uu.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<LCZP4.115265$uF1.251648@afrodite.telenet-ops.be> <39108237$0$12148@bru5-newsr2.be.uu.net> <3911b908$0$12150@bru5-newsr2.be.uu.net> <CqjQ4.130740$uF1.283256@afrodite.telenet-ops.be> <3912ecaf$0$12153@bru5-newsr2.be.uu.net> <slrn8h6api.im7.carl@porphyria.iguana.be>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fcea4,c83c8b73fef218dc X-Google-Attributes: gidfcea4,public From: Lieven Marchand <mal@bewoner.dma.be> Subject: Re: open filepointers Date: 2000/05/06 Message-ID: <39144013$0$11457@bru5-newsr1.be.uu.net> X-Deja-AN: 619997423 Sender: mal@localhost.localdomain References: <LCZP4.115265$uF1.251648@afrodite.telenet-ops.be> <39108237$0$12148@bru5-newsr2.be.uu.net> <3911b908$0$12150@bru5-newsr2.be.uu.net> <CqjQ4.130740$uF1.283256@afrodite.telenet-ops.be> <3912ecaf$0$12153@bru5-newsr2.be.uu.net> <slrn8h6api.im7.carl@porphyria.iguana.be> X-Trace: bru5-newsr1.be.uu.net 957628435 11457 212.190.2.239 Newsgroups: be.comp.programming