Doug Hughes wrote: > Matthias Birkner wrote: >> At $work we've been having a discussion about what the right amount of swap >> is for a given amount of RAM in our standard linux image and I'm looking >> for additional input. >> >> The "old school" conventional wisdom says "swap = 2x RAM". The more modern >> conventional wisdom seems to vary from "swap = 1x RAM + 4G" to "swap = 4G >> regardless of RAM". >> >> >> So if you're running/managing a Linux HPC cluster, or you have strong >> opinions on the subject, or you just want to comment :), I love to hear >> you're thoughts. >> >> Some info about our environment... We have several HPC clusters scattered >> around the globe with anywhere >> from 100 to somewhat over 1000 systems in each cluster. Workload in >> the clusters is managed using LSF and typically they are configured to >> have one job-slot per cpu. The memory configs in each system ranges >> from 4G RAM up to 512G. Not sure if the OS version matters but in case >> it does, we're primarily running RHEL4u5 and starting a migration to >> RHEL5u3. >> > If HPC speed is important, and it sounds like it is, you never want to > swap because it will kill you. So, to some extent, it doesn't matter, > it's kind of like asking what color the deck chairs should be on the > titanic; you know it's going to sink, so whether they are blue or green > seems picayune. >
Yes ! I used to spend hours justifying to other sysadmins why I did not believe in the 2 x amount of memory, and why I'd run my server with very little swap. When disk, and memory, was expensive, I would work out how much memory was needed by the server (which typically would be as much as we can afford !), and then add some swap in case a process went wrong in order to be able to login at the console (although if something goes really wrong, it will up all available swap anyway). This is true for a server that runs a specific workload. For "generic" server, the only valid approach I have found is "monitor and adapt". The only place I have found where a rule make sense so far, is the case of laptop that can hybernate (swap has to be >= ram). -- Yves. http://www.sollers.ca/ _______________________________________________ Tech mailing list [email protected] http://lopsa.org/cgi-bin/mailman/listinfo/tech This list provided by the League of Professional System Administrators http://lopsa.org/
