Archives

Categories

Swapping to a Floppy Disk

In the mid 90’s I was part-owner of a small ISP. We had given out Trumpet Winsock [1] to a large number of customers and couldn’t convert them to anything else. Unfortunately a new release of the Linux kernel (from memory I think it was 2.0) happened to not work with Trumpet Winsock. Not wanting to stick to the old kernel I decided to install a Linux machine running a 1.2.x kernel for the sole purpose of proxying connections for the Winsock users. I had a 386 machine with 8M of RAM that was suitable for the purpose.

At that time hard disks were moderately expensive, and the servers were stored in a hot place which tended to make drives die more rapidly than they might otherwise. So I didn’t want to use a hard disk for that purpose.

I configured the machine to boot from a floppy disk (CD-ROM drives also weren’t cheap then) and use an NFS root filesystem. The problem was that it needed slightly more than 8M of RAM and swapping to NFS was not supported. My solution was to mount the floppy disk read-write and use a swap file on the floppy. The performance difference between floppy disks and hard disks was probably about a factor of 10 or 20 – but they were both glacially slow when compared to main memory. After running for about half an hour the machine achieved a state where about 400K of unused data was paged out and the floppy drive would then hardly ever be used.

I had initially expected that the floppy disk would get a lot of use and wear out, I had prepared a few spare disks so that they could be swapped in case of read errors. But in about a year of service I don’t recall having a bad sector on a floppy (I replaced the floppy whenever I upgraded the kernel or rebooted for any other reason as a routine precaution).

Does anyone have an anecdote to beat that?

4 comments to Swapping to a Floppy Disk

  • Very funny !

    This one is not exactly an anecdote, but the story of these two guys who developed an emulator during the Bosnian war is not bad either ;)

    http://www.worldofspectrum.org/warajevo/Story.html

  • Umh… Nowadays, it would even be more trustable to swap to /dev/urandom. Floppy disks have achieved zero reliability.

  • I wonder how an iSCSI device would work. Its not NFS, so it could work.

  • etbe

    Gunnar: My experience is that floppy disk reliability problems are mostly related to transportation. Keep a disk in a drive and the reliability is reasonably good.

    Albert: There is a risk of a kernel deadlock if the kernel code related to iSCSI (which includes the TCP stack, netfilter, and more) tries to allocate memory – I believe this is why swap over NFS is not supported.