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

Re: pgbench internal contention

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pgbench internal contention
Date: 2011-07-29 21:25:54
Message-ID: 3243.1311974754@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On machines with lots of CPU cores, pgbench can start eating up a lot
> of system time.  Investigation reveals that the problem is with
> random(),

Interesting.

> I patched it to use random_r() - the patch is attached - and here are
> the (rather gratifying) results of that test:
> Since a client-limited benchmark isn't very interesting, I think this
> change makes sense.  Thoughts?  Objections?

Portability, or rather lack of it.  What about using erand48, which we
already have a dependency on (and substitute code for)?

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: davegDate: 2011-07-29 22:35:04
Subject: Re: error: could not find pg_class tuple for index 2662
Previous:From: Robert HaasDate: 2011-07-29 21:00:25
Subject: pgbench internal contention

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