On 4/20/2011 10:02 AM, Yves Dorfsman wrote:
>> its not like we don't have the disk;
>> these systems have 11TB of SAN/NAS and 600GB of in-the-box RAID
>> serving / and /tmp.
> This makes a big difference, a lot of my machines have only 1 TB to 4 TB of
> local disk, and I do want a lot of space for /tmp and /var.
>
>
>> williams note of 75% of main memory sounds reasonable.
> I disagree, nothing is reasonable. It completely depends on your workload.
> If you have a server which runs a whole bunch of services that are very rarely
> used, and for which you don't care about performance, then swap should be as
> large as the total amount of memory used by all processes together, whatever
> value that is.
>
> If performance is important, then, in most cases, swapping means bad news. You
> should monitor how much swap space is used, and start analysing what's going
> on when it's used.
>
> The only times I use a large swap value are:
>
> -laptops, you need the swap>= memory if you want to be able suspend.
>
> -if your OSes crashes a lot and you want to capture a dump.
>
> -debugging an apps that end up using amount of memory larger than it should.
>
I mostly agree with Yves with the caveat that there are legitimate uses 
for swapping that do not require memory. Think of large databases where 
the DB may reserve many GB of space, but not actually use them. Having 
that in swap so you can use your memory for real stuff is an advantage. 
But, databases are not along, CAD applications share the same behavior. 
In fact, any application that has a tendency to reserve large amounts of 
ram in anticipation of using it, may end up never using it. Having this 
reservation against disk takes no extra time and preserves the RAM for 
real purposes.

But, yes, know the workload. Our HPC machines we don't want ever to 
swap, but at the same time, it's still useful to have swap = ram for 
things like core dumps, so that's what we do, mostly. Disk is relatively 
cheap. Caveat: if you server has flash/SSD disks, then I'd tend to scale 
back the physical swap since the price per GB goes up dramatically.


_______________________________________________
Tech mailing list
[email protected]
https://lists.lopsa.org/cgi-bin/mailman/listinfo/tech
This list provided by the League of Professional System Administrators
 http://lopsa.org/

Reply via email to