Re: Add progressive backoff to XactLockTableWait functions

Поиск
Список
Период
Сортировка
От Xuneng Zhou
Тема Re: Add progressive backoff to XactLockTableWait functions
Дата
Msg-id CABPTF7Wqv99W5VXCBu5WE_QwRKC5SRcYnLnxTT2DE7E_QkOU1Q@mail.gmail.com
обсуждение исходный текст
Ответ на Add progressive backoff to XactLockTableWait functions  (Xuneng Zhou <xunengzhou@gmail.com>)
Список pgsql-hackers
Hi,

Although it’s clear that replacing tight 1 ms polling loops will reduce CPU usage, I'm curious about the hard numbers. To that end, I ran a 60 s logical-replication slot–creation workload on a standby using three different XactLockTableWait() variants—on an 8-core, 16 GB AMD system—and collected both profiling traces and hardware-counter metrics. 


1. Hardware‐counter results


image.png

  • CPU cycles drop by 58% moving from 1 ms to exp. backoff, and another 25% to the 1 s threshold variant.
  • Cache‐misses and context‐switches see similarly large reductions.
  • IPC remains around 0.45, dipping slightly under longer sleeps.

2. Flame‐graph 
See attached files

Best regards, 
Xuneng

Вложения

В списке pgsql-hackers по дате отправления: