Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
i have a laptop with 3 gigs of (admittedly very slow) Ram and i partitioned in 6 gigs of Swap space to my hard disk.
my question is that my laptop rarely gets above 50% RAM and i have yet to see it with anything in swap so is it possible to manually make linux load certain programs into ram/swap on startup? is there something useful i should be doing with all that swap? (i am not exactly pushed for harddrive space
Why do you want to load programs from RAM (fast) to disk (slow)? That makes no sense to me.
Also I think that 6GB is far to large, what applications do you run on that system? If you hardly ever use swap, and your RAM is almost always at 50% I would reduce that to 1GB and use the rest for other purposes.
You've got plenty of RAM, more than plenty of swap, and hard disk space to spare. So... where's the problem?
If you think your RAM is slow, wait until you start running things out of swap. The purpose of swap space is to be an overflow area if you start maxing out your RAM, but you take a severe performance hit to use it. RAM is accessed at CPU clock speed, and disk access has to wait for head seek, and be clocked across a slower interface. Rejoice that your swap is going unused.
If anything, the tuning opportunity presented here is to reduce swap and reclaim some disk space... but since you're not constrained for disk space, I wouldn't worry about it.
I simply allocate 1.5 times as much swap-space as my system has RAM, and leave the swap-tendency values at their default values.
I want the system to have somewhere to go, if it starts running short of available space in RAM, because the only alternative that the system has is to start killing processes. But under ordinary circumstances, these days, the system should not have to resort to swapping at all. To my way of thinking, "dirty pages" can stick around in RAM as long as they care to, until and unless some actual memory pressure moves them aside.
That would be cool, bad sadly we don't have RAM at this speed yet.
what i want to know is if i can tell my computer to load programs like firefox into RAM, in a sort of ready state, and if the swap could be used to speed things up
This can be done, but you don't need swap for it. Would be useless with swap, why should a loding from swap (disk) should be faster than from filesystem (disk)?
Have a look at the programs preload and prelink, I think they do what you want to achieve.
and B) that Linux "aggressively swaps to disk" which it never seems to
Actually, it's the opposite-- Windows swaps aggressively to "save" system resources, although I've yet to understand exactly for what. Linux, on the other hand, uses system resources for faster, smoother program flow, and swaps as a last resort.