Re: pg_test_fsync performance - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: pg_test_fsync performance
Date
Msg-id 20120215151428.GA13011@momjian.us
Whole thread Raw
In response to Re: pg_test_fsync performance  (Magnus Hagander <magnus@hagander.net>)
Responses Re: pg_test_fsync performance  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
On Wed, Feb 15, 2012 at 09:54:04AM +0100, Magnus Hagander wrote:
> On Wed, Feb 15, 2012 at 02:23, Bruce Momjian <bruce@momjian.us> wrote:
> > On Wed, Feb 15, 2012 at 01:35:05AM +0200, Marko Kreen wrote:
> >> On Tue, Feb 14, 2012 at 05:59:06PM -0500, Tom Lane wrote:
> >> > Bruce Momjian <bruce@momjian.us> writes:
> >> > > On Mon, Feb 13, 2012 at 08:28:03PM -0500, Tom Lane wrote:
> >> > >> +1, I was about to suggest the same thing.  Running any of these tests
> >> > >> for a fixed number of iterations will result in drastic degradation of
> >> > >> accuracy as soon as the machine's behavior changes noticeably from what
> >> > >> you were expecting.  Run them for a fixed time period instead.  Or maybe
> >> > >> do a few, then check elapsed time and estimate a number of iterations to
> >> > >> use, if you're worried about the cost of doing gettimeofday after each
> >> > >> write.
> >> >
> >> > > Good idea, and it worked out very well.  I changed the -o loops
> >> > > parameter to -s seconds which calls alarm() after (default) 2 seconds,
> >> > > and then once the operation completes, computes a duration per
> >> > > operation.
> >> >
> >> > I was kind of wondering how portable alarm() is, and the answer
> >> > according to the buildfarm is that it isn't.
> >>
> >> I'm using following simplistic alarm() implementation for win32:
> >>
> >>   https://github.com/markokr/libusual/blob/master/usual/signal.c#L21
> >>
> >> this works with fake sigaction()/SIGALARM hack below - to remember
> >> function to call.
> >>
> >> Good enough for simple stats printing, and avoids win32-specific
> >> code spreading around.
> >
> > Wow, I wasn't even aware this compiled in Win32;  I thought it was
> > ifdef'ed out.  Anyway, I am looking at SetTimer as a way of making this
> > work.  (Me wonders if the GoGrid Windows images have compilers.)
> 
> They don't, since most of the compilers people would ask for don't
> allow that kind of redistribution.

Shame.

> Ping me on im if you need one preconfigured, though...

How do you do that?  Also, once you create a Windows VM on a public
cloud, how do you connect to it?  SSH?

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +


pgsql-hackers by date:

Previous
From: Kohei KaiGai
Date:
Subject: Re: pgsql_fdw, FDW for PostgreSQL server
Next
From: Christoph Berg
Date:
Subject: Re: [trivial patch] typo in doc/src/sgml/sepgsql.sgml