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: AANLkTikCR-eoL3CR-Lg5HYEzzZrzdWdBJ5Yi4OUQF6Bu@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

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