public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christian Borntraeger <linux-kernel@borntraeger.net>
To: linux-kernel@vger.kernel.org
Cc: Gergely Czuczy <phoemix@harmless.hu>, itk-sysadm@ppke.hu
Subject: Re: Linux 2.4 VS 2.6 fork VS thread creation time test
Date: Sun, 23 May 2004 11:39:41 +0200	[thread overview]
Message-ID: <200405231139.44096.linux-kernel@borntraeger.net> (raw)
In-Reply-To: <Pine.LNX.4.60.0405230914330.15840@localhost>

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





  parent reply	other threads:[~2004-05-23  9:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-23  7:57 Linux 2.4 VS 2.6 fork VS thread creation time test Gergely Czuczy
2004-05-23  8:55 ` Nick Piggin
2004-05-23  9:03   ` Gergely Czuczy
2004-05-23  9:38     ` Nick Piggin
2004-05-23 15:08     ` Anton Blanchard
2004-05-23  9:39 ` Christian Borntraeger [this message]
2004-05-23 10:00   ` David Lang
2004-05-23 19:47     ` Christian Borntraeger
2004-05-24  0:06       ` David Lang
     [not found]     ` <1085325156.622.0.camel@boxen>
     [not found]       ` <D53BF43BC70DD511A22500508BB3C0070A73CE83@wlvexc00.diginsite.com>
2004-05-24  7:15         ` David Lang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200405231139.44096.linux-kernel@borntraeger.net \
    --to=linux-kernel@borntraeger.net \
    --cc=itk-sysadm@ppke.hu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phoemix@harmless.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox