[GRLUG] Solid State Drives

Adam Tauno Williams awilliam at whitemice.org
Mon Dec 1 15:14:53 EST 2008


On Mon, 2008-12-01 at 12:14 -0500, Collin Kidder wrote:
> Adam Tauno Williams wrote:
> >
> >  I have a server with 8Gb of RAM and 8Gb of SWAP and an average of
> > something like 60% swap used - the performance is great.  I've got 4Gb
> > in my laptop and usually have ~100MB in the swap (sometimes it surges
> > upward) - performance is good.  I don't think measuring utilization of
> > swap is a meaningful performance benchmark at all;  paging is what is
> > bad.  To know your paging rate you need to watch something like dstat;
> > a tiny bit of swap with allot of paging is bad,   a large amount of used
> > swap with essentially no paging is just fine (possibly even good). 
> I still contend that swap space is good for nothing more than a safety 
> net. If you are using 60% of an 8GB swap space then why not just load 
> that nearly never used data from disk when you need it? 

Because that adds enormous complexity as the app doesn't know what part
of the dataset will be required.   Load and let the kernel sort it out;
simple and effective.    And if your paging, you are getting "data from
disk when you need it".

> After all, you 
> are effectively doing that anyhow. Virtualized memory brings many 
> advantages but swap space isn't one of the better ones. 

Yes, it is.

> You do NOT want to use a 30MB/s hard drive to supplement the storage 
> space of a 6GB/s interface.

Eh?  Theoretically swap space is approximately the same speed as reading
from a filesystem (in reality, it's faster) and it is certainly faster
than retrieving data over a network [potentially multiple times if you
discard results to conserve memory... or you write them out to disk
(same place your swap is)].  So if you have more data than you can hold
in RAM then using swap just makes sense (within some constraints, there
is a cut off at some point).

If your server or workstation's storage's maximum throughput is 30MB/s
then its crap.  For a laptop where you've only got one lousy spindle,
then yes, you really don't want to page (assuming you have a choice).
But a laptop is portable, so sometimes one just has to live with it.

>  It makes no sense. Back in the old days 
> (like in the Windows 3.1 days) it made some sense. RAM was maybe 300MB/s 
> and the harddrive 5MB/s. That's a 60:1 ratio. RAM was very expensive and 
> people didn't run too many concurrent apps anyway. Nowdays the 6GB/30MB 
> ratio is 200:1 so swapping is much more costly. 

You've presented no faster solution for managing very large datasets.



More information about the grlug mailing list