Re: Background LRU Writer/free list
От | Tom Lane |
---|---|
Тема | Re: Background LRU Writer/free list |
Дата | |
Msg-id | 5962.1176919353@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Background LRU Writer/free list (Gregory Stark <stark@enterprisedb.com>) |
Ответы |
Re: Background LRU Writer/free list
|
Список | pgsql-hackers |
Gregory Stark <stark@enterprisedb.com> writes: > I had a thought on this. Instead of sleeping for a constant amount of time and > then estimating the number of pages needed for that constant amount of time > perhaps what bgwriter should be doing is sleeping for a variable amount of > time and estimating the length of time it needs to sleep to arrive at a > constant number of pages being needed. That's an interesting idea, but a possible problem with it is that we can't vary the granularity of a sleep time as finely as we can vary the number of buffers processed per iteration. Assuming that the system's tick rate is the typical 100Hz, we have only 10ms resolution on sleep times. > The reason I think this may be better is that "what percentage of the shared > buffers the bgwriter allows to get old between wakeups" seems more likely to > be a universal constant that people won't have to adjust than "fixed time > interval between bgwriter cleanup operations". Why? What you're really trying to determine, I think, is the I/O load imposed by the bgwriter, and pages-per-second seems a pretty natural way to think about that; percentage of shared buffers not so much. regards, tom lane
В списке pgsql-hackers по дате отправления: