Slightly off-topic:
Has anyone here had much experience with linux v2.5.x/v2.6.0 and running
*lots* of threads-per-process? (Assuming a fairly recent version of glibc and
the pthreads library)

I ask because of some testing I was doing for an old project I still keep my
fingers in. Due to API issues beyond our control, it tends to run into
thousands of threads per process. (Which are mainly waiting and thus the
switching overhead isn't too bad)
Now, under v2.4 linux your memory usage goes up by about your stack size + a
little bit more, for each thread you create. Given a good stack of memory, you
can run a LOT of threads. So we do, and it all works fine.

Under the new pre-v2.6.0 kernels, each thread creation seems to use about 8Mb
more in VM - although the resident size is still about what i'd expect.

Unfortunately, these poor 32bit machines I'm using don't really like
addressing multiple-gigabytes of VM for a single process, and so I'm
effectively limited to approx 250 threads - even in simple 'sleep(30);' kind
of test routines.

Has anyone else hit this, or heard about what is causing it?
I've been hunting around for about a week on this one, without finding the
cause. (Not having net access at home doesn't help though)

-Toby

-- 
Turning and turning in the widening gyre
The falcon cannot hear the falconer;
Things fall apart, the centre cannot hold;
Mere anarchy is loosed upon the world.

Reply via email to