Re: Just-in-time Background Writer Patch+Test Results
От | Gregory Stark |
---|---|
Тема | Re: Just-in-time Background Writer Patch+Test Results |
Дата | |
Msg-id | 87abrxx87r.fsf@oxford.xeocode.com обсуждение исходный текст |
Ответ на | Re: Just-in-time Background Writer Patch+Test Results (Greg Smith <gsmith@gregsmith.com>) |
Список | pgsql-hackers |
"Greg Smith" <gsmith@gregsmith.com> writes: > On Sat, 8 Sep 2007, Tom Lane wrote: > >> I've already gotten flak about the current default of 200ms: >> https://bugzilla.redhat.com/show_bug.cgi?id=252129 >> I can't imagine that folk with those types of goals will tolerate an >> un-tunable 10ms cycle. > > That's the counter-example for why lowering the default is unacceptable I was > looking for. Scratch bgwriter_delay off the list of things that might be fixed > to a specific value. Ok, time for the obligatory contrarian voice here. It's all well and good to aim to eliminate GUC variables but I don't think it's productive to do so by simply hard-wiring them. Firstly that doesn't really make life any easier than simply finding good defaults and documenting that DBAs probably shouldn't be bothering to tweak them. Secondly it's unlikely to work. The variables under consideration may have reasonable defaults but they're not likely to have defaults will work in every case. This example is pretty typical. There aren't many variables that will have a reasonable default which will work for both an interactive desktop where Postgres is running in the background and Sun's 1000+ process benchmarks. What I think is more likely to work is looking for ways to make these variables auto-tuning. That eliminates the knob not by just hiding it away and declaring it doesn't exist but by architecting the system so that there really is no knob that might need tweaking. Perhaps what would work better here is having a semaphore which bgwriter sleeps on which backends wake up whenever the clock sweep hand completes a cycle. Or gets within a certain fraction of a cycle of catching up. Or perhaps bgwriter shouldn't be adjusting the number of pages it processes at all and instead it should only be adjusting the sleep time. So it would always process a full cycle for example but adjust the sleep time based on what percentage of the cycle the backends used up in the last sleep time. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: