LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Is it practical to mount swap /var and /tmp on a fast SD card to save the SSD? (https://www.linuxquestions.org/questions/linux-desktop-74/is-it-practical-to-mount-swap-var-and-tmp-on-a-fast-sd-card-to-save-the-ssd-928418/)

FiftyOneFifty 02-08-2012 11:48 PM

Is it practical to mount swap /var and /tmp on a fast SD card to save the SSD?
 
I bought a compact 1Ghz Core Two Duo laptop on which I plan to install Arch, max RAM size in the specs is 2Gb. To enhanced speed, battery life, and durability, I replaced the 80Gb spinning drive it came with with a new 120Gb OCZ Vertex 2 (not the latest version I realize). The concensus seems to be that 2Gb RAM is not enought to run w/o swap, though I am more than willing to forgo suspend/resume. The system also has a build in SD card reader. If I put swap /var and /tmp on a quality brand class 10 eight gig SD card, would it be fast enough or would I be counteracting all the gains from the SSD in the first place. I realize I might be setting myself up for a hassle the day the SD fails, as I'm guessing even an identically prepared SD wouldn't just be pop in pop out as the device ID's would be different. Also, I would expect to lose the function of the SD slot (would ejecting the volumes containing swap /var and /tmp bring everything to a halt or could one quickly swap to another card to access files?).

malekmustaq 02-09-2012 03:43 AM

Quote:

The concensus seems to be that 2Gb RAM is not enought to run w/o swap, though I am more than willing to forgo suspend/resume.
It is not true, I have been running linux distros below 1.5Gb RAM. Rule of thumb: It depends. If you are working with plenty of images and/or video authoring yes 2Gb is good but uncomfortable if running other apps. But with 512Mb RAM I was able to become very productive with Absolute Linux doing .odt files and networking. As is said: It depends on how you employ your laptop.


Quote:

Also, I would expect to lose the function of the SD slot (would ejecting the volumes containing swap /var and /tmp bring everything to a halt or could one quickly swap to another card to access files?).

To some system processes /var and /tmp are critical directories that you should avoid undermining its access by the system. You'd better install them into the main partitions in your hard drive. Anyway you have 120Gb HD, that is more than enough for the system. Indeed I have once moved a /tmp into my data partition (out of tightening free space) by making a link into it, but it was a hard drive partition.

If you must play with / directories, you can play with /home. This one eats plenty of space, but the system can go on even if disconnected.

Hope it helps. Goodluck.

mm

qlue 02-09-2012 05:43 AM

On 1.5GB ram, I've never gone into swapping. (although I don't do any video editing either!)
When I was using an SSD with 512MB ram, My system used to freeze whenever it began swapping as the write speed of that SSD was very slow. I wouldn't recommend putting a swap partition on an SSD or even an SD for this very reason.

TobiSGD 02-09-2012 11:44 AM

The OCZ Vertex 2, despite being a little bit older, is faster than any spinning HDD. I personally think that the "wear out thing" on SSDs is a part of the past, on modern SSDs it is said that you have a lifetime of about 35TB writing (example from Intel), which means if it should last 5 years you have to write about 20GB every day. So I personally don't care about the lifetime, I would just put it on the SSD.

FiftyOneFifty 02-09-2012 01:03 PM

Thanks everyone, now I have a better idea of what my options are. I have a more powerful system for video editing, this is indended to be my portable work system. What I may do is create a swap on the SSD but not enable it in the install until I see if it is needed. This will replace my 5" UMPC, I decided I either needed a bigger screen or a better optomitrist :)

jefro 02-10-2012 09:20 PM

Easy enough to run it without a swap partition. If you need it later you can add in swap file.


All times are GMT -5. The time now is 06:01 PM.