Re: A costing analysis tool
От | Tom Lane |
---|---|
Тема | Re: A costing analysis tool |
Дата | |
Msg-id | 3238.1129416505@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: A costing analysis tool (Martijn van Oosterhout <kleptog@svana.org>) |
Ответы |
Re: A costing analysis tool
|
Список | pgsql-hackers |
Martijn van Oosterhout <kleptog@svana.org> writes: > Interestingly, I notice the windows port of PostgreSQL uses the > QueryPerformanceCounter() function. I tried playing with it under linux > and found that Linux suspends the CPU while waiting for things to > happen. So: > sleep(1) ~ 20 million cycles > busy loop for 1 second ~ 800 million cycles (CPU speed) > So, what's good for battery and power usage is bad for accurate > timings. Basically, on Linux it would seriously underestimate the time > for blocking system calls on an otherwise idle system. So, it works for > Windows because they don't do this... Hmm ... are we *sure* they don't do that? The QueryPerformanceCounter implementation was added just recently, and I'm not sure it's been tested under any wide range of scenarios. Maybe we will find that it doesn't work :-( regards, tom lane
В списке pgsql-hackers по дате отправления: