pg_test_fsync performance - Mailing list pgsql-hackers

From Bruce Momjian
Subject pg_test_fsync performance
Date
Msg-id 20120214004253.GA454@momjian.us
Whole thread Raw
Responses Re: pg_test_fsync performance  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
I have heard complaints that /contrib/pg_test_fsync is too slow.  I
thought it was impossible to speed up pg_test_fsync without reducing its
accuracy.

However, now that I some consumer-grade SATA 2 drives, I noticed that
the slowness is really in the open_sync test:

    Compare open_sync with different write sizes:
    (This is designed to compare the cost of writing 16kB
    in different write open_sync sizes.)
             1 * 16kB open_sync write          76.421 ops/sec
             2 *  8kB open_sync writes         38.689 ops/sec
             4 *  4kB open_sync writes         19.140 ops/sec
             8 *  2kB open_sync writes          4.938 ops/sec
            16 *  1kB open_sync writes          2.480 ops/sec

These last few lines can take very long, so I developed the attached
patch that scales down the number of tests.  This makes it more
reasonable to run pg_test_fsync.

I would like to apply this for PG 9.2.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pl/python long-lived allocations in datum->dict transformation
Next
From: Robert Haas
Date:
Subject: Re: pg_test_fsync performance