Re: Track the amount of time waiting due to cost_delay
От | Jan Wieck |
---|---|
Тема | Re: Track the amount of time waiting due to cost_delay |
Дата | |
Msg-id | f7676970-1cfb-4524-b7b9-a5e8e66e22f5@wi3ck.info обсуждение исходный текст |
Ответ на | Re: Track the amount of time waiting due to cost_delay (Robert Haas <robertmhaas@gmail.com>) |
Список | pgsql-hackers |
On 6/11/24 13:13, Robert Haas wrote: > On Tue, Jun 11, 2024 at 5:49 AM Bertrand Drouvot > <bertranddrouvot.pg@gmail.com> wrote: >> As we can see the actual wait time is 30ms less than the intended wait time with >> this simple test. So I still think we should go with 1) actual wait time and 2) >> report the number of waits (as mentioned in [1]). Does that make sense to you? > > I like the idea of reporting the actual wait time better, provided > that we verify that doing so isn't too expensive. I think it probably > isn't, because in a long-running VACUUM there is likely to be disk > I/O, so the CPU overhead of a few extra gettimeofday() calls should be > fairly low by comparison. I wonder if there's a noticeable hit when > everything is in-memory. I guess probably not, because with any sort > of normal configuration, we shouldn't be delaying after every block we > process, so the cost of those gettimeofday() calls should still be > getting spread across quite a bit of real work. Does it even require a call to gettimeofday()? The code in vacuum calculates an msec value and calls pg_usleep(msec * 1000). I don't think it is necessary to measure how long that nap was. Regards, Jan
В списке pgsql-hackers по дате отправления: