Re: many sessions waiting DataFileRead and extend

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: James Pang <jamespang886(at)gmail(dot)com>, Frits Hoogland <frits(dot)hoogland(at)gmail(dot)com>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: many sessions waiting DataFileRead and extend
Date: 2025-06-26 03:03:28
Message-ID: fa9bda2e74987d819fc99bfc8533cc349e50dc03.camel@cybertec.at
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Thu, 2025-06-26 at 10:32 +0800, James Pang wrote:
> thans for you suggestions, we have iowait from sar command too, copy here, checking with infra team not found abnormal IO activities either.  
> 02:00:01 PM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle
> 02:00:03 PM  all   15.92    0.00   43.02    0.65    0.76    2.56    0.00    0.00    0.00   37.09

Crazy high system time.

If it is not transparent hugepages, the other suspect is fork().
Turn on "log_connections" for a minute or two and see if there are lots
of connections established. That can easily use your CPU.

Other than that, I am out of guesses.

> Frits Hoogland <frits(dot)hoogland(at)gmail(dot)com> 於 2025年6月25日週三 下午10:27寫道:
> > > On 25 Jun 2025, at 07:59, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> wrote:
> > >
> > > Run "sar -P all 1" and see if "%iowait" is high.
> >
> > I would (strongly) advise against the use of iowait as an indicator.

I have heard that before, and I am sure you are right.

I grant that if it is low, it may just mean that the CPU is under load.
But if %iowait is high, my experience is that that indicates an I/O problem.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tatsuo Ishii 2025-06-26 03:25:45 Re: many sessions waiting DataFileRead and extend
Previous Message James Pang 2025-06-26 02:32:50 Re: many sessions waiting DataFileRead and extend