lkml.org 
[lkml]   [2004]   [May]   [23]   [last100]   RSS Feed
Views: [more markup]   [less markup]   [headers]   [forward]  
 
Messages in this thread
/
FromChristian Borntraeger <>
SubjectRe: Linux 2.4 VS 2.6 fork VS thread creation time test
DateSun, 23 May 2004 11:39:41 +0200
Gergely Czuczy wrote:
> failed. As I told it above all the processes are teminated right after
> creation, but there were a lot of defunct processes in the system, and
> they were only gone when the parent termineted.

Have you heard of wait, waitpid and pthread_join?

> With a few number of processes I wasn't able to go over 255 threads,
> after the 255th every creation attempt simply failed.

Your 255 thread limit is propably because you have a stack size of 8192 
kbytes. (see ulimit). As all threads share the same address space, this 
address space is the limiting factor. Try ulimit -s 1024 for example.

> It's easy to notice that in case of 2.4 the ratios of the creation times
> are converges to 1, so it depends on the load, while in case of a 2.6
> kernel the ratios are mostly fix, about 9. This means that creating a new
> child process takes much more time than creating a new thread.

Well, the other way around is the correct answer. Processes didnt get 
slower. Threads are faster than processes in 2.6 because of the NPTL. If 
you want to slow down threads to process level, just do 
LD_ASSUME_KERNEL=2.2.5 before running your test program.

cheers

Christian




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:03    [from the cache]
©2003-2008