• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Ways to save ram usage  (Read 971 times)
UnaClocker
Full Member
***

Karma: 0
Posts: 130



View Profile
« on: January 01, 2010, 11:27:15 AM »

I could have sworn I read something on here about each thread defaulting to using too much ram, and there being a way to turn it down a touch. But I can't seem to find that thread now, I spent quite a bit of time trying different search terms last night, never did find it. I did find some good info though. Anyways, here's my TOP command list:

Sorry that's a bit large.. It's all of the processes running on my machine. Note how at the top it says I only have 4megs free, it seems to be hanging out around there, the buffers change from 2 to 6mb free. I see a lot of my processes list a large amount of virtual memory.. Especially the php-cgi processes (why are there so many of them?), is that virtual memory free to be given to other processes, or do they actually have it locked down?
It's amazing, it wasn't all that long ago that I felt 512mb ram in a Linux machine was very very generous, now.. It feels kinda tight. I'm hoping it's just imaginary, and there's actually plenty of free ram left.. Smiley
Logged

SheevaPlug - 8gb class 4 SDHC primary drive, 1tb 3.5" media drive, Debian Lenny, Lighttpd w/ PHP, Samba, MediaTomb

dattaway
Jr. Member
**

Karma: 5
Posts: 91



View Profile WWW
« Reply #1 on: January 01, 2010, 05:35:03 PM »

Most of that is cached and shared anyway.

And a lot of it has to do with what libraries your applications are compiled for. Glibc is a massive, bloated hog.  Most people could use the trimmed down uclibc.  Everything you see there could get away with using 64MB very well and have plenty left over.

Also, protected mode memory allows more memory than exists to be mapped.  Applications need to tell the kernel how much memory they need before its used, otherwise currently used areas could be clobbered.  Its easy to ask for more than you need now  than to go over budget later.
Logged

UnaClocker
Full Member
***

Karma: 0
Posts: 130



View Profile
« Reply #2 on: January 01, 2010, 06:52:11 PM »

Ok, I'm starting to catch on.. Sad to say, I used to know this sort of stuff 10 years ago, back when this was how you used Linux.. Several years of Ubuntu has made me soft.. Smiley It's all slowly starting to come back to me though. Thanks. You're right, this thing is hardly touching the ram, that's awesome. Smiley
Logged

SheevaPlug - 8gb class 4 SDHC primary drive, 1tb 3.5" media drive, Debian Lenny, Lighttpd w/ PHP, Samba, MediaTomb

Pages: [1]
Print
Jump to: