On May 13, 2005, at 12:05 PM, Brian Chee wrote:

Actually I have a question...why would you want to run a machine without swap? There are good reasons if you're running an embedded linux machine, but for normal machines I've seen folks setup unix boxes that boot from the network but ONLY do swap to the local hard disk. Those old xterms did this
alot just so that you don't swap over the network.

A good example of a linux machine that didn't use swap were those old N!C (New Internet Computers) that Larry Ellison of Oracle pushed for a while.

A somewhat better and more recent example is a cluster. Cluster applications that process large amounts of data, such as parallel scientific or multimedia applications, are likely to cause swapping on individual cluster nodes, for reasons we've already discussed on-list. These applications will perform better on clusters with network swapping support.

Network swapping allows any cluster node with over-committed memory to use idle memory of a remote node as its backing store and to “swap” its pages over the network. As the disparity between network speeds and disk speeds continues to grow, network swapping will be faster than traditional swapping to local disk.

A UDMA-133 disk has a theoretic throughput of 133MBps, or just a tad over 1Gbps, which is fairly cheap Ethernet gear these days. Course, your HDD won't actually supply data at 1Gbps, while zero-copy networking is a reality on linux, and thus, it might actually be faster these days to hit the wire or fiber rather than the rotating glass covered in oxide.

These ran from the internal cdrom and had no swap...while a good concept, they were pigs...very slow and they were cheap only for a very short amount of time. Once you tossed in a small laptop drive for swap, boy did they run
great...but once you did that you lost the cost advantage.

The only embedded machines I've seen nowdays that regularlly don't run any
swap at all, are those tiny little CPM or DOS machines.

Take a look in your lab Brian. Does any of that gear run linux without a HDD?

Since those don't even have virtual memory, swap isn't necessary.

Once again, swap != virtual memory. (paging == virtual memory!!) Way back in 1970 or so you could run unix on a PDP-7 with no virtual memory support. (Hack, even 32/V from AT&T didn't support virtual memory on the Vax!). You could (and likely *would*), swap, however.

UC Berkley managed to make a VM system for (BSD) Unix, and the world changed. :-) Course, putting TCP/IP in there might have had something to do with it too.

But on a multithreaded/multiuser machine swap just makes sense.

Only to serve as a place to stuff otherwise cold dirty pages. Disk is *so* slow compared to memory these days that even the database people like to keep the DB in-core, if at all possible.

Anyway, forgive me if I missed the point...but at the super low cost of
drives nowdays, even a tiny drive for swap makes sense.

My disk drives cost more than my 802.11 APs, which run linux, and don't have a swap area. What am I doing wrong?

jim

Reply via email to