mmap vs alloc
Jaap Akkerhuis
jaap at sidn.nl
Wed Sep 24 20:45:47 UTC 2003
Jakob Schlyter writes:
> I'd like to second this - do not rely on overcommit.
>
> is performance worse with mmap?
Performance should be the same, but there's a different problem: if you
edit the file while nsd has it mapped, fun ensues.
I agree, though. It's better to mmap() and pray that the file isn't
changed, than to read() and pray that overcommit won't explode.
Seeing this discussion and being agnostic, it seems to me that this
has more to do with the operating environment (amount of data served,
operating system used etc.) then with nsd itself, praying is not
an option.
My suggestions is, that a proper thing to do is to document that
nsd has specific memory requirements (lots) and how the various
system might deal with it or not. For the known cases, there will
be some defaults, however, there should be some hooks to the
configure/makefiles to allow for tuning to the environment.
jaap
More information about the nsd-users
mailing list