swap file

Empty plug at emptiedout.com
Sun Dec 24 19:37:06 MST 2006


Michael Havens wrote:
> I had a stroke of genius! (you are going to be proud of me for thinking of 
> this). This idea has been mulling around in my head for a while now. Wouldn't 
> it be lightning quick to put a swap file on a pendrive? No disk activity 
> would be needed at all! It would all have to do with the bus's speed.

If you really wanted to do this, the thing to do would be a solid-state
hard drive. Basically these are memory boards controlled by a hardware
SCSI emulator, so the computer thinks they are an actual hard drive.
They are expensive, and many are a pain to get working under Linux, but
they can be very very very fast. I had 5 SMTP servers once that we added
these to... After switching the qmail queue dir to a reiserfs fs on the
drives the things totally hauled ass and 2 ended up pulling the load 5
were previously.

The problem, though, is you lose the FS on reboot or power outage. Ours
had a secondary power supply that we plugged into dedicate UPS's- just
keeping data in RAM alive is pretty cheap, juice-wise, so the UPS could
keep it alive even after an hour of no power.

The only reason I can think of to do that is if you have a single server
you cannot upgrade any further in terms of RAM and it is bound on swap I/O.

> what are the drawbacks to doing this? how could I automate this?

It will eventually die a nasty death, and you really don't want that to
happen to swap.

> man! why do most computers even have hard drives! Unless you are running a 
> business.....

Solid-state storage simply is not ready to rely on in such a capacity.
Jon Hansen hit the nail on the head with the flash storage problems, and
especially in a swap capacity (eg lots of writes) the limited lifespan
is a real problem. Great advances are being made in this area, but it
will be some time before spinning platters go the way of the 5.25" floppy...

~Ben

-- 
---
"Confession only helps if you actually feel bad for your actions.
For you, it would just be a really long boast."
	-Tara
http://www.emptiedout.com


More information about the PLUG-discuss mailing list