Re: Performance monitor signal handler
От | Tom Lane |
---|---|
Тема | Re: Performance monitor signal handler |
Дата | |
Msg-id | 19724.985019304@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Performance monitor signal handler (Bruce Momjian <pgman@candle.pha.pa.us>) |
Ответы |
Re: Performance monitor signal handler
|
Список | pgsql-hackers |
Bruce Momjian <pgman@candle.pha.pa.us> writes: > Only shared memory gives us near-zero cost for write/read. 99% of > backends will not be using stats, so it has to be cheap. Not with a circular buffer it's not cheap, because you need interlocking on writes. Your claim that you can get away without that is simply false. You won't just get lost messages, you'll get corrupted messages. > The collector program can read the shared memory stats and keep hashed > values of accumulated stats. It uses the "Loops" variable to know if it > has read the current information in the buffer. And how does it sleep until the counter has been advanced? Seems to me it has to busy-wait (bad) or sleep (worse; if the minimum sleep delay is 10 ms then it's guaranteed to miss a lot of data under load). regards, tom lane
В списке pgsql-hackers по дате отправления: