[lkml]   [2005]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: process creation time increases linearly with shmem
Nick Piggin wrote:
> How does the following look? (I changed the comment a bit). Andrew, please
> apply if nobody objects.

Nick, I applied this latest patch to a 2.6.12 kernel and found that it
does resolve the problem. Prior to the patch on this machine, I was
seeing about 23ms spent in fork for ever 100MB of shared memory segment.
After applying the patch, fork is taking about 1ms regardless of the
shared memory size.

Many thanks to everyone for your help on this.

FWIW, an interesting side effect of this occurs when I run the database
with this patch internally on a Linux server that uses NIS. Its an
unrelated problem and not a kernel problem. Its due to the children
calling initgroups()... apparently when you have many processes making
simultaneous initgroups() calls something starts imposing very long
waits in increments of 3 seconds, so some processes return from
initgroups() in a few ms and other processes complete in 3, 6, 9, up to
21 seconds (plus a few ms). I'm not sure what the story is with that,
though its clearly not a kernel issue. If someone happens to have the
answer or a suggestion, great, otherwise I'll persue that elsewhere as
necessary. (I can reproduce this by simply adding a call to
initgroups() call in the child of the forktest program that I sent earlier)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-08-30 01:38    [W:0.042 / U:83.792 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site