You are not logged in.

#1 2013-04-12 04:52:38

panth0r
Member
Registered: 2012-08-14
Posts: 6

Swapping to Secure Digital cards

Prologue: secure digital (hereafter, "SD") cards have only a limited number of writes before becoming paperweights for fruit flies.  Using "hdparm -tT /dev/sda /dev/mmcblk0", the internal hard drive certainly outperforms the SD card (see below).  I'm not finding myself using too much swap ever (well, under a GB) but generally just like to have it.  Answers I've encountered through such advice as "get an SSD" and "upgrade memory" and "swap, holy crap, you still use that!?"  I understand from where each of these proposed solutions is coming and, well, totally agree; however, I'm interested in others' experiences (maybe people for whom those three choices don't apply or just others who are interested as I am; also, I am looking at getting more RAM FWIW, but adding RAM and trying to swap to an SD are unrelated in my context).  Thinking perhaps about an implementation that may or may not matter, my current swap partition is made up of the lower-numbered cylinders, I did this thinking the lower numbers might not correspond to the inside of the disk; moreover, I remember back to an operating systems class that the center of the platters usually gets attention from the heads most often.

/dev/sda:
 Timing cached reads:   12706 MB in  1.99 seconds = 6382.48 MB/sec
 Timing buffered disk reads: 172 MB in  3.00 seconds =  57.31 MB/sec

/dev/mmcblk0:
 Timing cached reads:   12520 MB in  1.99 seconds = 6288.75 MB/sec
 Timing buffered disk reads:  44 MB in  3.09 seconds =  14.23 MB/sec

Do newer technologies (larger size and supposedly improved algorithms) somewhat mitigate the fast depletion caused by many write cycles?


The real money question: does having one's filesystem and swap on different physical disks (specifically, when the filesystem is on the hard disk and swap on an SD card) nontrivially improve system responsiveness; perhaps because the HDD can continue to be written to and read from without the additional burden of maintaining swap?


At the risk of sounding patronizing, please know I will be giving it a shot; so don't say something like "bad idea because your above-mentioned reasons."  I'd like to get either empirical data or anecdotes from those with experience.

Offline

#2 2013-04-12 14:55:38

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Swapping to Secure Digital cards

I suspect that reading from and writing to the sd card will be too slow for you to notice much of an improvement, specially if you are considering to add more ram which will lead you to use less swap.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

Board footer

Powered by FluxBB