[ntp:questions] Re: Locking memory in ntp
davids at webmaster.com
Fri Sep 26 20:40:51 UTC 2003
"Michael Sierchio" <kudzu at tenebras.com> wrote in message
news:peGdnSIEpemHyemiRVn-iw at speakeasy.net...
> Maarten Wiltink wrote:
> > Gopal wrote in message ...
> >>Ntpd has a mlockall() function call which locks all the current and
> >>future memory. Why do we need to lock the memory.
> > To prevent page faults, which can cause unnecessary variation in
> > the response time to receiving timestamps.
> Does it help to point out that mlockall() is a wish and a prayer?
> There are per-process and per-machine limits on how many pages
> may be locked in memory...
> IOW the only guaranteed way of locking all pages in physmem is
> to run without swap.
Running without swap doesn't guarantee that. In fact, it increases the
chances that pages will be discarded because rarely-used modified pages from
other programs can't be swapped out.
More information about the questions