linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Brian Twichell <tbrian@us.ibm.com>
To: Ray Bryant <raybry@mpdtxmail.amd.com>
Cc: Dave McCracken <dmccr@us.ibm.com>,
	Hugh Dickins <hugh@veritas.com>, Andrew Morton <akpm@osdl.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Linux Memory Management <linux-mm@kvack.org>,
	slpratt@us.ibm.com
Subject: Re: [PATCH/RFC] Shared page tables
Date: Mon, 16 Jan 2006 22:50:30 -0600	[thread overview]
Message-ID: <43CC7796.10707@us.ibm.com> (raw)
In-Reply-To: <200601131634.24913.raybry@mpdtxmail.amd.com>

Ray Bryant wrote:

>On Thursday 12 January 2006 23:15, Brian Twichell wrote:
>
>  
>
>>Hi,
>>
>>We evaluated page table sharing on x86_64 and ppc64 setups, using a
>>database OLTP workload.  In both cases, 4-way systems with 64 GB of memory
>>were used.
>>
>>On the x86_64 setup, page table sharing provided a 25% increase in
>>performance,
>>when the database buffers were in small (4 KB) pages.  In this case,
>>over 14 GB
>>of memory was freed, that had previously been taken up by page tables.
>>In the
>>case that the database buffers were in huge (2 MB) pages, page table
>>sharing provided a 4% increase in performance.
>>
>>    
>>
>
>Brian,
>
>Is that 25%-50% percent of overall performance (e. g. transaction throughput), 
>or is this a measurement of, say, DB process startup times, or what?   It 
>seems to me that the impact of the shared page table patch would mostly be 
>noticed at address space construction/destruction times, and for a big OLTP 
>workload, the processes are probably built once and stay around forever, no?
>
>If the performance improvement is in overall throughput, do you understand why 
>the impact would be so large?   TLB reloads?   I don't understand why one 
>would see that kind of overall performance improvement, but I could be 
>overlooking something.   (Could very likely be overlooking something...:-) )
>
>Oh, and yeah, was this an AMD x86_64 box or what?
>  
>
Ray,

The percentage improvement I quoted is of overall transaction throughput.

A full detailed characterization of the improvements hasn't been done,
especially since we just got the x86_64 setup up and running, but I can
share with you what I know.

In the case that the database buffers were in small pages, sharing page 
tables
freed up a large amount of memory, which was subsequently devoted to 
enlarging
the database buffer cache and/or increasing the number of connections to the
database.  The arithmetic of the memory savings works as follows:  The
database systems we used are structured as multiple processes which map a
large shared memory buffer for caching application data.  In the case of
unshared page tables, each database process requires its own Linux page
table entry for each 4 KB page in the buffer.  A Linux page table entry
consumes eight bytes.  So, if there are 100 database processes, there are
100 * 8 = 800 bytes of Linux page table entries per 4 KB page in the 
buffer --
equating to a 20% overhead for page table entries.  With shared page tables,
there is only one page table entry per buffer cache page, no matter how many
database processes there are, thus reducing the page table overhead down
to 8 / 4 KB = ~ 0.2%.

I suspect that, in the small page case, sharing page tables is also 
giving us a
significant benefit from reduced thrashing in the ppc64 hardware page 
tables,
although I haven't confirmed that.

For the hugepage case on ppc64, the performance improvement appears to
stem mainly from a CPI decrease due to reduced TLB and cache miss rates.

Our x86_64 setup is based on Intel processors.

Cheers,
Brian

--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2006-01-17  4:50 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-05 16:19 Dave McCracken
2006-01-07 12:25 ` Heiko Carstens
2006-01-07 18:09   ` Dave McCracken
2006-01-08 12:09     ` Heiko Carstens
2006-01-08 14:04       ` Dave McCracken
2006-01-13  5:15 ` Brian Twichell
2006-01-13 22:34   ` Ray Bryant
2006-01-17  4:50     ` Brian Twichell [this message]
2006-01-25  4:14   ` Brian Twichell
2006-01-13 15:18 ` Phillip Susi
2006-01-14 20:45   ` Brian Twichell
2006-01-17 23:53 ` Robin Holt
2006-01-18  0:17   ` Dave Hansen
2006-01-18  6:11     ` Dave McCracken
2006-01-18  1:27   ` Chen, Kenneth W
2006-01-18  3:32     ` Robin Holt
2006-01-23 23:58   ` Ray Bryant
2006-01-24  0:16     ` Ray Bryant
2006-01-24  0:39       ` Andi Kleen
2006-01-24  0:51         ` Dave McCracken
2006-01-24  1:11           ` Andi Kleen
2006-01-24  1:26             ` Dave McCracken
2006-01-24  0:53         ` Ray Bryant
2006-01-24  1:00           ` Dave McCracken
2006-01-24  1:10           ` Andi Kleen
2006-01-24  1:23             ` Benjamin LaHaise
2006-01-24  1:38               ` Andi Kleen
2006-01-24  7:08                 ` Arjan van de Ven
2006-01-24  7:06             ` Arjan van de Ven
2006-01-24  7:18               ` Andi Kleen
2006-01-27 18:16                 ` Martin Bligh
2006-02-01  9:49                 ` Nick Piggin
2006-01-24 14:48               ` Dave McCracken
2006-01-24 14:56                 ` Arjan van de Ven
2006-01-24  0:19     ` Dave McCracken
2006-01-24  0:46       ` Ray Bryant
2006-01-24 23:43       ` Ray Bryant
2006-01-24 23:50         ` Dave McCracken
2006-01-25  0:21           ` Ray Bryant
2006-01-25 22:48           ` Ray Bryant
2006-01-25 22:52             ` Dave McCracken
2006-01-26  0:16               ` Ray Bryant
2006-01-26  0:58               ` Ray Bryant
2006-01-26  4:06                 ` Robin Holt
2006-01-20 21:24 ` Hugh Dickins
2006-01-20 21:54   ` Chen, Kenneth W
2006-01-23 17:39   ` Dave McCracken
2006-01-23 20:19     ` Benjamin LaHaise
2006-01-24 17:50     ` Hugh Dickins
2006-01-24 18:07       ` Dave McCracken
2006-01-24 18:20         ` Hugh Dickins
2006-01-27 22:50   ` Brian Twichell
2006-01-30 18:46     ` Ray Bryant
2006-01-31 18:47       ` Brian Twichell
2006-01-31 19:18         ` Dave McCracken

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=43CC7796.10707@us.ibm.com \
    --to=tbrian@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=dmccr@us.ibm.com \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=raybry@mpdtxmail.amd.com \
    --cc=slpratt@us.ibm.com \
    /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