Re: measuring lwlock-related latency spikes

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Simon Riggs <simon@2ndquadrant.com>, Greg Stark <stark@mit.edu>, pgsql-hackers@postgresql.org
Date: 2012-04-02T19:04:14Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add new files to NLS file lists

Robert Haas <robertmhaas@gmail.com> writes:
> Long story short, when a CLOG-related stall happens,
> essentially all the time is being spent in this here section of code:

>     /*
>      * If not part of Flush, need to fsync now.  We assume this happens
>      * infrequently enough that it's not a performance issue.
>      */
>     if (!fdata) // fsync and close the file

Seems like basically what you've proven is that this code path *is* a
performance issue, and that we need to think a bit harder about how to
avoid doing the fsync while holding locks.

			regards, tom lane