• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Using RAM effectively in Linux.

RyanGreener

Senior member
Hey everyone. I've been using Ubuntu 10.10 for awhile and I love it. My laptop has a LOT of RAM (well, for Linux anyways). I barely use past 500mb of my RAM, so I'm wondering if there are any ways I can utilize all the extra RAM I have. Any tips/tricks/"code" that I can use to help utilize the excess stuff?

EDIT:

I've already done the fix to sysctrl:
"vm.swappiness=0
vm.vfs_cache_pressure=1"

and I've installed "preload".

Any other ideas or is that it?
 
Last edited:
Linux is so memory efficient that it's hard to do what you're trying to do. I have 12gb of ram and I've never come close to using all of it under Linux.

If you really want to, you could run some virtual machines along with Gimp. *shrug*
 
Yeah I'm glad it's memory efficient, but it would still be nice to utilize as much memory as I can since I've got a lot of spare RAM going to "waste".
 
Do more? It should get used by the filesystem cache eventually, but there's no real way to force things into memory that you're not using for no reason.
 
memory is always used. Very little is left free.


To check how much memory do you have left type:

free -m


in console.
 
One thing that makes good use of large amounts of ram is if you have a task that's disk intensive you can mount a ramdisk and make your processes use it instead of your HDD. Installing VMs to and running them from a ramdisk for example will read/write faster than if it were actually from HDD. Keep in mind that you'll need to save it to disk eventually if you want to keep it. You would need to use the vm quite a bit to actually enjoy any net benefit though.
 
I found a Windoze VM had a better HDD score (in Windblows experience index) on my machine than the actual instal. I think we know why though: HDD caching on Linux sped up the virtual HDD, whereas the actual instal would have tested the actual HDD.
 
Ahh, I have no experience with Virtual Machines but sometimes I wish I could try to run them so I could run Windows programs. Maybe i'll do some research on them in the future
 
I don't get the desire here. If you're not doing demanding enough tasks to utilize 100% of the ram, then don't worry about it. Linux/preload will use the ram as efficiently as you'll let it. No sense in forcing things just for the sake of it.

...I mean unless you just want to play around with it as an exercise. I can understand that.
 
I was guessing op meant like caching programs yo ram, ramdisk, etc? Correct?

Sent from my PC36100 using Tapatalk

Yes, that was what I was wondering. I did a vague google search back when I started this thread about ramdisks in Linux, and it looked way more complicated. I was hoping it would more like windows where they just had a program that did all of that for you 😛
 
Yes, that was what I was wondering. I did a vague google search back when I started this thread about ramdisks in Linux, and it looked way more complicated. I was hoping it would more like windows where they just had a program that did all of that for you 😛

It's a lot simpler in Linux because the driver is already there. You just mount a ramfs or tmpfs filesytem somewhere and there it is.
 
It's a lot simpler in Linux because the driver is already there. You just mount a ramfs or tmpfs filesytem somewhere and there it is.

Ohh....I'll read up more about it. Stuff like that intimidates me so I haven't really tried it because I need my system to be stable and running.
 
Ohh....I'll read up more about it. Stuff like that intimidates me so I haven't really tried it because I need my system to be stable and running.

You can reliably mount tmpfs anywhere because it's backed by swap as well, I believe there's a size option to set an upper limit but that's about it. Now you have to be more careful with ramfs as it doesn't have any disk backing so everything on it is locked into memory.
 
Oh, well it turns out Firefox 4 already supports using RAM as cache (without the disk involved) so I allowed Firefox 4 to use up to 1GB of RAM for cache. As long as I keep one Firefox window open and don't close it, it stores everything and takes advantage of it.
 
Back
Top