Messages in this thread | | | From | (Miquel van Smoorenburg) | Subject | Re: More FD's in 2.0.33 | Date | 24 Mar 1998 21:54:16 +0100 |
| |
In article <199803242010.OAA08464@home.infrasol.com>, Shane Anderson <shane.anderson@infrasol.com> wrote: >I'm looking for the *RIGHT* way to get more open files in 2.0.33. >I've downloaded Michael O'Reilly's patch, but it had problems with >portmapper (on RedHat 5.0 w/ all the latest updates) crapping >out--apparently due to bad file descriptors, which I think was due to >the dynamic allocation done in this patch.
I believe it's the portmapper or the library RPC calls that fail if you have too many file descriptors. To be precise, more than 1024. And a fd_set has 1024 bits .. surprised? :)
3000 fd's is too much. 1024 is usually enough and won't break anything. So just fix the patch to give you 1024 fd's instead of 3000.
Alternatively install an /etc/initscript like this (mode 755!) and reboot:
====================================== #! /bin/bash
if [ `ulimit -S -n` -gt 1024 ] then ulimit -S -n 1024 fi
eval exec "$4" ======================================
It will set the soft limit systemwide to 1024 fd's. An application can still rise it to the hardlimit (3000) if needed.
Even better would be to put this in the kernel; by default a softlimit of 1024 fd's and a hardlimit of 3000, but oh well...
Mike. -- Miquel van Smoorenburg | Our vision is to speed up time, miquels@cistron.nl | eventually eliminating it.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |