Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

mmap is how the Varnish web cache works - the cache files is mmaped in, and the kernel does the rest.

Given the awesome performance of Varnish, I am surprised more applications haven't taken this approach.



Varnish is good because the size of a web page fits nicely with the size of memory pages... if you have very many small objects, you'll have to get a bit more clever about how you place them.


For what it's worth, I've written several projects that entirely rely on mmap()ed memory:

Localmemcache (key-value database): http://localmemcache.rubyforge.org/

clispy (Port of PNorvig's lispy to C): https://github.com/sck/clispy




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: