V
V
Vladimir2021-05-13 14:53:38
PostgreSQL
Vladimir, 2021-05-13 14:53:38

How to catch a request floating in time?

There is a request floating on time.
Most of the time it runs in milliseconds, but occasionally there are dips of up to 6 seconds.
After, with the parameters that worked out 3-6 seconds, the request is executed at a normal speed in ms

. How can you understand what is happening?

There are no changes to the processor at this time.
On the disks, there is a very small drawdown in time.
There are no peaks in memory either.

Auto_explain is enabled, but we can't enable it on the analyze level because it will slow down the database a lot.
I still don't quite understand what to do

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Melkij, 2021-05-13
@idskill

After, with the parameters that worked out 3-6 seconds, the request is executed at a normal speed in ms

Symptoms of slow reading from disks.
Set pg_stat_statements, enable track_io_timing and look at the blk_read_time, blk_write_time of this request for the number of calls and the total time they were executed.
PS: Please note that the latency of the disk system is critical for the DBMS. Are there io latency graphs for reading and writing?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question