1

This question is for my Raspberry pi A+ (256MB RAM) which is on Raspbian Linux.
I have no qualms about using a flash drive and using up its read and write cycles if need be.

I'm just curious on what minimum read/write speeds I would need in order to see a performance improvement by using a swap partition on an external drive.

I tested a WD 1TB hard drive on a USB 2.0 port and it has around 70 MB/s for both read and write.
A flash drive on a USB 2.0 port I tested has around 15 MB/s.
EDIT: Tested a Sandisk Ultra Class 10 16GB micro SD. Labeled speed: 48 MB/s. On a USB 2.0 card reader I see only a 15MB/s read/write speed.

Are there other factors do I need to take into account in deciding whether to place a swap partition there? If so what are they?

  • A Class 10 SD card is about 50% faster than USB 2 (90MB/s vs 60MB/s). You're going to be best off if you just use that. – krowe Mar 12 '15 at 12:20
  • @krowe Only if the SD card reader supports these speeds. – Peter Mar 12 '15 at 14:27
0

Just see which is faster: test the Raspberry Pi A+'s internal SD card speed and compare it against the other drives:

To test the write speed:

dd if=/dev/zero of=~/tempfile.dd bs=1M count=100

To test the read speed:

dd if=~/tempfile.dd of=/dev/null

To remove the temporary file:

rm ~/tempfile.dd

But keep in mind that SD cards, microSD cards, usb flash drives and any NAND-based memory device will suffer from a limited number of possible program/erase cycles before wearing out, and that swap partitions are prone to receive a fairly high amount of writes, so the best bet might be the external HDD beside any speed difference, furthermore considering that 70 MB/s it's a definetly decent speed already

|improve this answer|||||

Not the answer you're looking for? Browse other questions tagged or ask your own question.