Shane Milburn wrote: > I'm doing a project for a $CLIENT who has requested that I build out a > small web farm capable of serving 1M hits an hour average and peak > traffic to 3M/hour. No problem there but when building the systems we > got into a debate about how he wants the OS built. Basically he said > DO NOT build a swap partition or swap file. I asked why and his > response was "These are cookie cutter web servers that do nothing > other than serve apache requests. They have nothing else on them so > we'll run apache up to XXX for MaxClients and MaxSpareServers (just > shy of running the box out of memory) and leave it. " > > He's the $CLIENT and I'l build it the way he requests but my questions > are... > > 1. Would/Have you run a web server without swap? (they have 500Gb > drives in them so there's room for a swap partition.) > 2. Any benefits or drawbacks to doing this? (in context of a pure > webserver that does nothing else but serve pages as part of the > pool it is a member of.) > > > Happy Friday! Pedantic Nit: Modern systems seldom swap, they page.
Tom Limoncelli addressed the "if your system swaps it's already broken" issue, and the "disk is cheap" argument. There's one reason I remember for having disk set aside for paging (misnamed , and it's not paging. It's core dumps. At least on Solaris, kernel core dumps are typically written to the "swap space". This is considered "free" because the swap space is, by definition, transient. If there's a kernel panic, the kernel doesn't try to write to a file system, since the file system drivers may be where the problem originated. Memory is written to the swap space as a byte stream. When the system boots the next time, the contents of that dump can be copied to regular disk space for access. If you don't care about ever examining a kernel dump, you don't need this either. If you do, for most systems, reserving enough disk to match the size of physical memory is relatively cheap. As always YMMV. If they're truly cookie cutter systems with sufficient memory to prevent exhaustion and good monitoring, it may be a fair trade off to skip swap. But disk is cheap. The thing I do avoid is ever using tmpfs (/tmp in a ram disk in "free" memory). I recommend that /tmp and /var/tmp always reside on physical disk. This is because tmpfs allows for memory use to conflict with disk use and when it fills from either side, the other is affected. You can't use temp space and you can't create new processes. Better to either have memory full or /tmp full but not both at the same time. - Mark > > cheers, > -shane > -- > > > ------------------------------------------------------------------------ > > _______________________________________________ > Discuss mailing list > [email protected] > http://lopsa.org/cgi-bin/mailman/listinfo/discuss > This list provided by the League of Professional System Administrators > http://lopsa.org/ > _______________________________________________ Discuss mailing list [email protected] http://lopsa.org/cgi-bin/mailman/listinfo/discuss This list provided by the League of Professional System Administrators http://lopsa.org/
