Skip site navigation (1) Skip section navigation (2)

Re: Report: Linux huge pages with Postgres

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Report: Linux huge pages with Postgres
Date: 2010-11-28 03:22:03
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Sat, Nov 27, 2010 at 2:27 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> For testing purposes, I figured that what I wanted to stress was
> postgres process swapping and shmem access.  I built current git HEAD
> with --enable-debug and no other options, and tested with these
> non-default settings:
>  shared_buffers         1GB
>  checkpoint_segments    50
>  fsync                  off
> (fsync intentionally off since I'm not trying to measure disk speed).
> The test machine has two dual-core Nehalem CPUs.  Test case is pgbench
> at -s 25; I ran several iterations of "pgbench -c 10 -T 60 bench"
> in each configuration.
> And the bottom line is: if there's any performance benefit at all,
> it's on the order of 1%.  The best result I got was about 3200 TPS
> with hugepages, and about 3160 without.  The noise in these numbers
> is more than 1% though.
> This is discouraging; it certainly doesn't make me want to expend the
> effort to develop a production patch.  However, perhaps someone else
> can try to show a greater benefit under some other test conditions.

Hmm.  Presumably in order to see a large benefit, you would need to
have shared_buffers set large enough to thrash the TLB.  I have no
idea how big TLBs on modern systems are, but it'd be interesting to
test this on a big machine with 8GB of shared buffers.

Robert Haas
The Enterprise PostgreSQL Company

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-11-28 03:28:10
Subject: Re: PLy_malloc and plperl mallocs
Previous:From: Tom LaneDate: 2010-11-28 03:02:33
Subject: Rethinking representation of sort/hash semantics in queries and plans

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group