LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-07-2005, 12:47 PM   #1
phatboyz
Member
 
Registered: Feb 2004
Location: Mooresville NC
Distribution: CentOS 4,Free BSD,
Posts: 358

Rep: Reputation: 30
Why is so much memory being used.


Here is a screen print from TOP. I have no gui running. I have squid and lotus domino running and thats about it. Why is this hoging up all the memory?


top - 13:48:13 up 3 days, 1:26, 1 user, load average: 0.00, 0.00, 0.00
Tasks: 72 total, 2 running, 70 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.9% us, 0.3% sy, 0.2% ni, 98.1% id, 0.6% wa, 0.0% hi, 0.0% si
Mem: 256136k total, 240112k used, 16024k free, 41744k buffers
Swap: 262136k total, 49704k used, 212432k free, 124484k cached
 
Old 02-07-2005, 01:14 PM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
If you post the rest of the top output we can tell you what is doing this.
 
Old 02-07-2005, 01:20 PM   #3
phatboyz
Member
 
Registered: Feb 2004
Location: Mooresville NC
Distribution: CentOS 4,Free BSD,
Posts: 358

Original Poster
Rep: Reputation: 30
I cant right now as I had to ssh to get that. I am not at the site. I'll be by there later today so I check then. Nothing was really running. Domino was using about 10% mem and other than that everything was a sleep.
 
Old 02-07-2005, 01:41 PM   #4
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
This kind of question gets asked a lot.

The quick and easy answer is to tell you not to worry about it because nothing is really hogging up all your memory.

The more in depth answer has to do with the way Linux does memory management.

When a program executes it gets allocated a certain amount of memory (based on a verity of things calculated at compile time). The kernel typically actually allocates it more then it asks for (never less). As time goes on programs tend to grow (aka dynamically allocated memory). When the use up the extra that was originally given to them they get more memory (pretty much always in increments of 2 pages or 8k, but getting only 4k is possible, everything will be in increments of the page size). When a program exits the OS consciously marks those pages as free, but it doesn't actually go through the long process of freeing them. It only actually goes back and reclaims the memory once somebody asks for a chunk of memory and there isn't enough room to give it to them.

Anyway, as a result once a system has been running long enough you typically see about 80-90% of the memory marked as used at all times. You only really need to be concerned about memory usage stats if your swap usage goes up significantly over a period of time. ~49MB of swap usage isn't a big deal at all for a machine that has only 256MB of memory. On my machines (which all have 1 or 2 GB) I never see any usage on swap though after a long amount of time my memory usage still reaches nearly 80% of the systems total memory.
 
Old 02-07-2005, 01:54 PM   #5
phatboyz
Member
 
Registered: Feb 2004
Location: Mooresville NC
Distribution: CentOS 4,Free BSD,
Posts: 358

Original Poster
Rep: Reputation: 30
Thanks, the reason that I was asking was my proxy server on here was running real slow so I thought that the memory was the cuplret. Thanks for the help. I understand better.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tool to detect number of memory slots, memory module type, speed, and size stefanwolf Linux - Hardware 8 04-22-2013 09:48 AM
Missing memory in USB stick, flash memory, removable hd etc bamboo_spider Linux - Newbie 3 06-14-2006 05:39 PM
Memory Leak when using memory debugging C program on SuSE SLES8 babalina Linux - Distributions 0 10-06-2003 09:39 AM
Help!?! RH 8 Memory Mapping -High Memory-Virtural Memory issues.. Merlin53 Linux - Hardware 2 06-18-2003 04:48 PM
RH 8.0 Mapping Virtual Memory to get access to VMIC Reflective Memory PCI card. Merlin53 Linux - Hardware 0 05-05-2003 12:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration