LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Linux and Memory usage (https://www.linuxquestions.org/questions/linux-general-1/linux-and-memory-usage-125138/)

ganninu 12-12-2003 12:54 AM

Linux and Memory usage
 
I want to know a bit from you guys if my linux system behaves the same as yours, and possibly some possible logical reason for this.

The box has 612.48MB of RAM and I remember that the after a fresh reboot the amount of memory used is very minimal. After some uptime I can see that the amount of memory sued becomes to increment day by day. After an uptime of 3 days 12 hours 56 minutes, I have only 24.69MB of memory left, and for the first time I've had Debian, i'm realising that 4.18MB are being used from the Swap memory.. Does this mean that if i leave for some 5 weeks, my machine will be crawling like a snail due to lack of memory??

Something else related maybe to box specs, what are bogomips??

My only services running are an apache server which only me uses, so i don't think it consumes much memory, and the X-server.

thanks a lot,
ganninu.

320mb 12-12-2003 03:24 AM

do you have /var on it's own "seperate" partition??

LinuxLala 12-12-2003 03:37 AM

well the X is a real memory hog. :D

Try doing 'top' at command line to see what all services are running without your knmowledge.

You obviously dont put the quotes :)

ganninu 12-12-2003 03:50 AM

hehe i found out about the services by doing top actually :) i have those services i mentioned. As regards to my partitioning, '/var' is not on a separate partition...

LinuxLala 12-12-2003 11:44 AM

Regarding ur bogomips
http://www.magnux.org/doc/howto/en/m...ps-2.php#ss2.1

mac_phil 12-12-2003 02:16 PM

No! Your computer will not be running like a snail in five weeks.

This is how Linux works. You paid for those 600+ megs; be thankful they're getting used!

Linux approach to memory is this: if you aren't using it, you're wasting it.

Your memory is full of cached data. When an app needs more memory, data is removed from the cache.

Check out my two computers:

This one is doing nothing at all:
top - 14:45:49 up 5 days, 3:07, 2 users, load average: 0.00, 0.00, 0.00
Tasks: 48 total, 1 running, 47 sleeping, 0 stopped, 0 zombie
Cpu(s): 2.1% user, 0.5% system, 0.6% nice, 96.7% idle
Mem: 126228k total, 123324k used, 2904k free, 7020k buffers
Swap: 506008k total, 9424k used, 496584k free, 34288k cached

This one is running a mailserver, OpenOffice, Kmail, IRSSI, Pine, Evolution, XPDF, and probably a bunch of other stuff:
top - 14:42:12 up 4 days, 18:55, 7 users, load average: 0.01, 0.04, 0.00
Tasks: 98 total, 1 running, 97 sleeping, 0 stopped, 0 zombie
Cpu(s): 6.7% user, 1.8% system, 0.2% nice, 91.3% idle
Mem: 191060k total, 187332k used, 3728k free, 6560k buffers
Swap: 385520k total, 61608k used, 323912k free, 90292k cached



ac1980 12-12-2003 03:12 PM

I think mac_phil is right: here's my 'free' output (I have a loaded system):
Code:

camera:/home/ale# free
                      total      used      free    shared    buffers    cached
 Mem:                  190408    183876      6532          0      16524      78316
-/+ buffers/cache:                89036    101372
Swap:                  554168    164368    389800

This means 6.5M are unused, but 100M hold cached data, so the are eligible to be freed on demand.
If you want to access disk data that is in this cache, you'll have it in microseconds :)
Note that if an application is idle for a long time (e.g. a shell you're not using) it will be likely swapped to make your cache bigger.

Also note that (unlike winnt) linux will NEVER write to swap security-related information such as encripted fs info or passwords (unless you use badly-careless applications, of course).

ganninu 12-13-2003 01:00 AM

thanks for your response guys. now i understand why linux is faster than windows.

LinuxLala 12-15-2003 07:33 AM

I learnt a lot about Linux due to this discussion. Thanks all!


All times are GMT -5. The time now is 07:33 PM.