public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* dynamic linking files slow fork down significantly
@ 2007-03-03  0:53 David Lang
  2007-03-03  7:48 ` Eric Dumazet
  0 siblings, 1 reply; 4+ messages in thread
From: David Lang @ 2007-03-03  0:53 UTC (permalink / raw)
  To: linux-kernel

I have a fork-heavy workload (a proxy that forks per connection, I know it's not 
the most efficiant design) and I discovered a 2x performance difference between 
a static and dynamicly linked version of the same program (2200 connections/sec 
vs 4700 connections/sec)

I know that there is overhead on program startup, but didn't expect to find it 
on a fork with no exec. If I has been asked I would have guessed that the static 
version would have been slower due to the need to mark more memory as COW.

what is it that costs so much with dynamic libraries on a fork/clone?

according to strace, the clone call that's being made is
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, 
child_tidptr=0xb7c92c08)

David Lang

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-03-04 10:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-03  0:53 dynamic linking files slow fork down significantly David Lang
2007-03-03  7:48 ` Eric Dumazet
2007-03-04  8:22   ` David Lang
2007-03-04 10:14     ` Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox