All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave McCracken <dmccr@us.ibm.com>
To: Andrew Morton <akpm@digeo.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
	Linux Memory Management <linux-mm@kvack.org>
Subject: Fork timing numbers for shared page tables
Date: Thu, 10 Oct 2002 14:59:07 -0500	[thread overview]
Message-ID: <175360000.1034279947@baldur.austin.ibm.com> (raw)
In-Reply-To: <3DA5D893.CDD2407C@digeo.com>


--On Thursday, October 10, 2002 12:44:19 -0700 Andrew Morton
<akpm@digeo.com> wrote:

> Be nice to get some compelling benchmark figures onto the
> mailing lists to help push these.  They're pretty late...

I've done some basic timing tests for shared page tables using a simple
fork test I wrote.  It has three modes:

The first mode forks as fast as it can, then calculates how long each fork
took.  This measures the time the fork() system call took.

The second mode adds a wait() for the child after the fork.  The child just
calls exit(0).  This measures how long the child ran.

The third mode adds an exec() in the child of a very small executable,
which just exits.  This adds the exec() time to the mix.

The program also optionally allocates a shared memory object and touches
all the pages in it before the start of the test.  This adds extra pages to
be dealt with by fork/exec/exit.  None of the pages are touched after the
test starts.

I ran this test in three cases, 2.5.41, 2.5.41-mm2 without share, and
2.5.41-mm2 with share.

Now for the results (all times are in ms):

		2.5.41	mm2-unshared	mm2-shared
		------	------------	----------
fork
----

400K		 1.7	 1.6		 0.5
4M		 5.0	 5.0		 3.4
40M		28.4	29.5		 3.4

fork/exit
---------

400K		 1.7	 1.6		 1.6
4M		 4.9	 5.3		 4.1
40M		44.2	45.1		 4.1

fork/exec/exit
--------------

400K		 6.5	 7.5		 7.7
4M		10.3	11.9		10.7
40M		49.3	51.4		10.7


I don't know why exec introduces a small penalty for small tasks. I'm
working on some optimizations that might help.

Dave McCracken

======================================================================
Dave McCracken          IBM Linux Base Kernel Team      1-512-838-3059
dmccr@us.ibm.com                                        T/L   678-3059


WARNING: multiple messages have this Message-ID (diff)
From: Dave McCracken <dmccr@us.ibm.com>
To: Andrew Morton <akpm@digeo.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
	Linux Memory Management <linux-mm@kvack.org>
Subject: Fork timing numbers for shared page tables
Date: Thu, 10 Oct 2002 14:59:07 -0500	[thread overview]
Message-ID: <175360000.1034279947@baldur.austin.ibm.com> (raw)
In-Reply-To: <3DA5D893.CDD2407C@digeo.com>

--On Thursday, October 10, 2002 12:44:19 -0700 Andrew Morton
<akpm@digeo.com> wrote:

> Be nice to get some compelling benchmark figures onto the
> mailing lists to help push these.  They're pretty late...

I've done some basic timing tests for shared page tables using a simple
fork test I wrote.  It has three modes:

The first mode forks as fast as it can, then calculates how long each fork
took.  This measures the time the fork() system call took.

The second mode adds a wait() for the child after the fork.  The child just
calls exit(0).  This measures how long the child ran.

The third mode adds an exec() in the child of a very small executable,
which just exits.  This adds the exec() time to the mix.

The program also optionally allocates a shared memory object and touches
all the pages in it before the start of the test.  This adds extra pages to
be dealt with by fork/exec/exit.  None of the pages are touched after the
test starts.

I ran this test in three cases, 2.5.41, 2.5.41-mm2 without share, and
2.5.41-mm2 with share.

Now for the results (all times are in ms):

		2.5.41	mm2-unshared	mm2-shared
		------	------------	----------
fork
----

400K		 1.7	 1.6		 0.5
4M		 5.0	 5.0		 3.4
40M		28.4	29.5		 3.4

fork/exit
---------

400K		 1.7	 1.6		 1.6
4M		 4.9	 5.3		 4.1
40M		44.2	45.1		 4.1

fork/exec/exit
--------------

400K		 6.5	 7.5		 7.7
4M		10.3	11.9		10.7
40M		49.3	51.4		10.7


I don't know why exec introduces a small penalty for small tasks. I'm
working on some optimizations that might help.

Dave McCracken

======================================================================
Dave McCracken          IBM Linux Base Kernel Team      1-512-838-3059
dmccr@us.ibm.com                                        T/L   678-3059

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/

  parent reply	other threads:[~2002-10-10 19:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-10 19:32 [PATCH 2.5.41-mm2+] Shared page table bugfix for mprotect Dave McCracken
     [not found] ` <3DA5D893.CDD2407C@digeo.com>
2002-10-10 19:59   ` Dave McCracken [this message]
2002-10-10 19:59     ` Fork timing numbers for shared page tables Dave McCracken
2002-10-10 20:02     ` William Lee Irwin III
2002-10-10 20:02       ` William Lee Irwin III
2002-10-10 21:21     ` Benjamin LaHaise
2002-10-10 21:21       ` Benjamin LaHaise

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=175360000.1034279947@baldur.austin.ibm.com \
    --to=dmccr@us.ibm.com \
    --cc=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.