Re: measuring lwlock-related latency spikes - Mailing list pgsql-hackers

From Tom Lane
Subject Re: measuring lwlock-related latency spikes
Date
Msg-id 10670.1333393454@sss.pgh.pa.us
Whole thread Raw
In response to Re: measuring lwlock-related latency spikes  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: measuring lwlock-related latency spikes  (Simon Riggs <simon@2ndQuadrant.com>)
Re: measuring lwlock-related latency spikes  (Jeff Janes <jeff.janes@gmail.com>)
Re: measuring lwlock-related latency spikes  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: Finer Extension dependencies
Next
From: Simon Riggs
Date:
Subject: Re: measuring lwlock-related latency spikes