[lug] mmap and NFS docroot
Bear Giles
bgiles at coyotesong.com
Tue Sep 20 11:59:00 MDT 2005
John Hernandez wrote:
> Why does mmap provide such a massive performance boost,
> and can it be used sanely with NFS in this scenario?
I often read files with mmap instead of standard reads, but that's
because of paranoia over buffer overflows more than anything else.
IIRC mmap gives you a pointer directly into the VFS cache,
standard IO gives you a buffer isolated from the underlying cache.
You get better performance since you avoid copying the data from
cache into buffer. The flip side is that anything that causes
problem to the cache is immediately propogated to the application.
... but I could be completely wrong.
Bear
More information about the LUG
mailing list