News for hackers. Stuff that matters.
Re:What's wrong with 1975 programming by nostrademons on Wednesday July 28, 2010 @08:34PM (#1556142)
I suspect you're thinking "desktop" and btilly is thinking "server", and you're going to end up talking past each other. Or, if you are thinking servers, then you're thinking "one server" and he is thinking "one million servers".

In a highly-scalable webapp, that infrequently-used functionality lives on another server, called via RPC. Instead of paging it out, you simply provision fewer machines for it, and then only make calls to it as necessary. Paging out one component of a large distributed system is dumb: you're potentially slowing everything else down because you couldn't spare one machine to keep the whole binary in RAM.

Re:What's wrong with 1975 programming by btilly on Wednesday July 28, 2010 @09:46PM (#1556297)
Shhh...don't give away any secrets. ;-)

However my comment applies to much smaller websites as well. If you have a website running on a number of webservers, and the working set exceeds RAM, then the website slows to a crawl, requests pile up, RAM gets even more overloaded, and you have a very bad failure mode which can be hard to sort out. By contrast if you have no swap and lots of RAM, you could have kept humming. If you hit the limits of RAM, you stay fast but get OOM messages in the error logs, which is much easier to debug. Furthermore it now obviously makes sense to monitor how much RAM is really in use, so you can head off problems before you run out of RAM. This gives you early warning of issues before they happen.

Yes, it is true that this approach creates a potential problem when you wouldn't necessarily have had one before. But creating an avoidable potential problem frequently results in fewer actual outages than having a problem which can sneak up on you in a non-obvious way.

This was pointed out to me by a very competent sysadmin several years ago when she explained why she had set up the servers with no swap. And she proved her point when she told us, before anything went wrong, that we needed to buy more RAM for the servers.

Re:What's wrong with 1975 programming by jasonwatkinspdx on Thursday July 29, 2010 @01:29AM (#1556725)
I ran a mid sized website that way briefly. Put simply: oom behavior can be far worse than a swap storm depending on how coupled your app servers are.
Re:What's wrong with 1975 programming by btilly on Thursday July 29, 2010 @11:59AM (#1557999)
It sounds like you didn't monitor RAM in use and proactively make sure you had enough. In 5 years of working with the sysadmin I am talking about, we never once ran out of RAM. Nor was any performance problem ever caused by the webservers.