Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I had a smallish (4gb) SD card laying around and I was wondering if it's possible or advisable to use it as swap space. Ideally, I'd like to free up some hard drive space by removing the swap on it and solely using the SD card but if that's not possible/advisable I'd be just fine with having a little extra.

share|improve this question
add comment

2 Answers 2

up vote 7 down vote accepted

All the stuff that can't or shouldn't stay in your RAM is written out to swap and read back in when needed. This means that the swap medium needs to be fast and resilient to lots of writes.

Your SD card fails on both counts. It is slower at reading/writing than a hard drive, and each of its constituent sectors can only be written to a limited number of times before they wear out and can no longer reliably store data.

If you really want to use it to free hard drive space and will be keeping it in your reader at all times, my recommendation would be to consider moving any media files you might have to the card. Media files are usually written once but read many times, and don't need the full transfer speed of a hard drive to play back smoothly in real-time. They are thus the perfect candidates to offload to an SD card.

share|improve this answer
    
Thanks. I guess I'll have to find another use for it. I thought about media but my music and ebook collections are too large to fit and I wouldn't want to split them up. On the flip side, my photo and video collections are practically non-existent and it wouldn't help much. C'est la vie. –  jimirings Jun 12 '12 at 5:21
    
@izx - Would the same be valid for a flash drive too?? I mean it has comparatively better read/write rates than SD cards. I have an 8 GB flash drive. Can I use it as SWAP (I didn't create any SWAP partition)?? –  Akshit Baunthiyal Aug 1 '12 at 4:12
    
Yes it's the same while they would be faster it's still NAND flash memory so it wears out. –  Uri Herrera Aug 1 '12 at 7:02
add comment

It does actually help a little if you are getting I/O bottlenecks when swapping since its on a separate device from the hard drive you are running your system on. Although it will drastically reduce the life of your SD card.

share|improve this answer
1  
Welcome to AskUbuntu! You may want to add references as to where you got your information from or back it up with your personal experience, as it stand this answer isn't helpful enough for the original poster. –  Oyibo Oct 3 '12 at 7:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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