Re: Remove or weaken hints about "effective resolution of sleep delays is 10 ms"?

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Remove or weaken hints about "effective resolution of sleep delays is 10 ms"?
Дата
Msg-id 20160216085033.GG25464@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: Remove or weaken hints about "effective resolution of sleep delays is 10 ms"?  (Andres Freund <andres@anarazel.de>)
Ответы Re: Remove or weaken hints about "effective resolution of sleep delays is 10 ms"?  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 2016-02-16 09:13:09 +0100, Andres Freund wrote:
> What we do we think the resolution is on modern
> >systems?  I would not have guessed that to be inaccurate.
> 
> Depends in a lot of factors. The biggest being how busy you're system
> is. On an mostly idle system (i.e. workout so CPUs being
> overcommitted) you can get resolutions considerably below one
> millisecond. HPET can get you very low latencies, making OS scheduling
> latencies the dominant factor, but one that can be tuned.

To back up my claim on this, read man 7 time
(e.g. http://linux.die.net/man/7/time), especially "The software clock,
HZ, and jiffies" and "High-resolution timers". To quote the most salient
point:

> Before Linux 2.6.21, the accuracy of timer and sleep system calls (see
> below) was also limited by the size of the jiffy.
> 
> Since Linux 2.6.21, Linux supports high-resolution timers (HRTs),
> optionally configurable via CONFIG_HIGH_RES_TIMERS. On a system that
> supports HRTs, the accuracy of sleep and timer system calls is no longer
> constrained by the jiffy, but instead can be as accurate as the hardware
> allows (microsecond accuracy is typical of modern hardware).


Andres



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

Предыдущее
От: Vladimir Borodin
Дата:
Сообщение: Re: [WIP] ALTER ... OWNER TO ... CASCADE
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: extend pgbench expressions with functions