News for hackers. Stuff that matters.
Re:What's wrong with 1975 programming by gruseom on Wednesday July 28, 2010 @12:39PM (#1554785)
Now that's interesting. I've been asking around for a while to find out what other systems programming experts think of this article, specifically the first point about not fighting with VM, which is the most prominent one (including in phk's provocative recent ACM article). I'd also like to know what other things, besides these, Varnish does to achieve its performance. I'm sold on the idea that most of us have been doing this kind of thing wrong. Let's hear more about how to do it right.
Re:What's wrong with 1975 programming by tptacek on Wednesday July 28, 2010 @12:46PM (#1554813)
For what it's worth, I've been in and out of the FreeBSD kernel since 1995 and am an unabashed PHK fan.
Re:What's wrong with 1975 programming by dedward on Wednesday July 28, 2010 @09:56PM (#1556325)
IT's not so much that it's "wrong" - it's just ignored.

What if you are designing for a system that won't ever have a swapfile/pagefile? What if your application is designed so your working set fits in ram? Then you can use other methods and not worry about fighting as much with the VM.

I love this article - because a reverse proxy is a great example of this.

(You want to cache transitory data to disk - You plan to roll your own caching system to keep data locally so you don't go back and query source nodes. You want some legroom to work with working-sets that may be larger than your physical ram, and you may want that ram cache to survive reboots intact.

So memory-map the file and let the OS take care of the rest - makes sense to me.

EDIT: What I meant to say was "It's not so much not fighting with the VM - it's realizing that the VM is more than something to ignore, and that it can be used to your large advantage by treating it like what it really is - a system that deals with shuttling data between different levels of storage (disk/ram).