-   Slackware (
-   -   Running Slackware off of flash with < 1GB of RAM (

dimm0k 01-09-2013 09:42 AM

Running Slackware off of flash with < 1GB of RAM
So I've got a spare notebook with 768MB of RAM, possibly upping it to 1GB if needed and would like to run Slackware on this machine. Only there is no hard drive so I'm going to use a 8GB USB flash drive to accomplish this. I've applied the noatime option to /etc/fstab and am wondering what else do I need to worry about in terms of too many writes and which directories I can throw into memory the help alleviate that.

business_kid 01-09-2013 10:46 AM


/dev/sda3 / ext4 noatime,diratime,discard
Those, I believe, are the recommended options. My suggestion is don't work too much. The usb bit will slow access to 12MB/S or thereabouts. I presume it's a 32 bit. Keep away from bloatware - all megalithic and monolithic stuff. I ran a box with 1G until recently and while it didn't excel, it was sufficient for most tasks.

TobiSGD 01-09-2013 11:50 AM

The discard option is only useful on SSDs, not on pendrives.
Anyways, i would recommend to look out for a fast pendrive (I use a Corsair Voyager GT , it comes close to maximum USB 2.0 speed).
Don't use a journailing file system (ext2, or better ext4 without journal). Possibly a good idea is to use a separate pendrive for swap, if necessary.
You will want to use lightweight applications to minimize load times and memory usage.
With only 1GB of RAM I would not recommend to mount directories to RAM.

dimm0k 01-09-2013 03:05 PM

Would ext4 be better than ext2 for this purpose if journaling is turned off? I should have stated originally that this won't really be a full desktop in that it'll do SSH connections mainly and light GUI work here and there. What of /var/log?

TobiSGD 01-09-2013 03:39 PM

From what I have seen ext4 is usually faster than ext2 on Flash medium (for example here: Turning off the journal should not affect the speed, but will reduce the number of writes.
Putting /var/log into RAM will effectively stop you from troubleshooting if the machine reboots, so I wouldn't do that. If you run any servers that write logs there usually have options to finetune the verbosity of the logs, so that you get only messages when errors occur.

storkus 01-11-2013 08:12 PM

While I haven't used one for running off of, USB sticks (except for the really expensive ones that are really SSDs) are notoriously slow and some settings make a *HUGE* difference! To wit: I bought an el-cheapo 64 GB USB stick around Christmas for a (seeming to me) ridiculously cheap price from Fry's Electronics. To my surprise, it wasn't fake flash and the full 64GB was present! Also to my surprise, however, it was BY FAR the slowest USB flash drive I have ever owned.

I don't remember if I read something here or what, but something prompted me to turn mount with "noatime" (I think I already had journalling turned off, but don't remember): the improvement was DRAMATIC! It still was the slowest of everything (even seemingly my microSDHC cards), but it no longer took more than half a day to fill or empty the device! It would seem that this may only have a single flash chip in it with, perhaps, a suboptimal driver chip, and definitely NO CACHE: once I configured the file system with "noatime" and (I think?) a long commit, performance just jumped huge. This could definitely work for you, especially with these el-cheapo devices. Remember, write amplification is your enemy on ANY flash: with the possible exception of SSD, you just can't afford journals and atime.

One more thought: some of the newest flash file systems, such as Samsung's, possibly seem to be intended for even devices like USB sticks, SD, CF, or anything but SSD, instead of just "Memory Technology Devices" with no intermediate layer like eMMC that older FFS's were designed for. I'm not sure how it could make a difference, and I think further investigation is absolutely warranted, although--to my knowledge--no non-MTD describes itself beyond the interface level, so I don't see how it could make much of a difference.

storkus 01-11-2013 08:20 PM

dimm0k, I forgot that your post referenced the whole machine, not just the stick. I run Slackware on an older P4 with only 392MB of RAM just fine, though you need swap in that case; however, running swap on USB sticks, even those "Ready Boost" ones, is stupid because they're so slow; the only exceptions, as I mentioned earlier, are the new USB-3 SSD "pen drives", and they cost so much it's far better to just plug in an external "spinning platter of rust", as Linus says.

Software wise, I prefer to stay away from KDE and Gnome even on my newer machines: I use XFCE mostly, have tried some others and didn't like them, and want to try (but haven't yet) the not-included-with-Slackware Enlightenment on my faster machines and lxde on all of my machines. Remember: not counting your graphics, your drive (secondary storage) speed and amount of RAM are your biggest determinants of performance on a day-to-day basis; only when gaming or doing other very intensive work will you face becoming processor limited, though admittedly this happens on Firefox on certain pages no matter what you do. Speaking of FF and other Gecko browsers: remember they are single-threaded--this becomes a big problem on multi-core Atom, Fusion, and non-x86 platforms.

All times are GMT -5. The time now is 12:48 PM.