From: Hunt, Bryan (B.Hunt at domain emuse-tech.com)
Date: Thu 09 May 2002 - 10:27:13 IST
I temporarily changed the ulimit settings to be as so ....
[root at domain emuse6 huntb]# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 9000
pipe size (512 bytes, -p) 8
stack size (kbytes, -s) unlimited
cpu time (seconds, -t) unlimited
max user processes (-u) unlimited
virtual memory (kbytes, -v) unlimited
Ran the test again and got identical results.
The ulimit is allready at unlimited .... strange.
--B
-----Original Message-----
From: Padraig Brady [mailto:padraig at domain antefacto.com]
Sent: Wednesday, May 08, 2002 4:58 PM
To: Padraig Brady
Cc: Hunt, Bryan; Nick Murtagh; Ilug (E-mail)
Subject: Re: [ILUG] anyone have any experience of java thread problems
on linux ?
Padraig Brady wrote:
> Hunt, Bryan wrote:
>
>> Actually guys I had ZERO as in 0 ( as in 1 less than 1 ) input into the
>> design of the product so I couldn't give a toss as to whether it is bad
>
> > design or not.
>
> Why can't you change it?
>
>> I just get a request from my boss make this scale up past the 1018 thread
>> limit or else we ditch Linux and go with Windows or some other crap. I
>> prefer to
>> use Linux (for various reasons) so I try to find a solution ... So
>> thats there I
>> am coming from ... you dig ?
>> As far as I can tell the correct answer to the question was
>> cut=
>> The Solution Make the following changes:
>>
>> In /usr/include/linux/limits.h:
>> #define NR_OPEN 1024
>> should be
>> #define NR_OPEN 4096
>> In /usr/include/linux/posix_types.h:
>> #define __FD_SETSIZE 1024
>> should be
>> #define __FD_SETSIZE 4096
>> In /usr/include/bits/types.h:
>> #define __FD_SETSIZE 1024
>> should be
>> #define __FD_SET_SIZE 4096
>> =cut
>>
>> Then go and recompile glibc .... hmmm looks like a whole load of fun
>
>
> Which is only apparent when you mentioned
> each thread opens a socket, hence your're running
> out of files not processes.
>
> So all you need to do is update the number of open
> files per process. The FD_SETSIZE is bogus as this is only
> used by select which you're not using.
>
> So you shouldn't need to recompile anything,
> just ulimit -n 8192 as root? This works as
> of 2.4 I think.
Thinking a little more about it, you might run out of
local ports also?
echo "1024 32768" > /proc/sys/net/ipv4/ip_local_port_range
You may also want to increase things in /proc/sys/fs
if you have problems.
Padraig.
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:16:42 GMT