LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-26-2007, 08:19 PM   #1
Alfar
LQ Newbie
 
Registered: Dec 2006
Posts: 15

Rep: Reputation: 0
A tricky question that keeps me awake at nights please help


Our server has a memory leak and I am trying to find out what is causing it. Its a Debian Sarge system with the following services.

mysql, apache2, named, sshd, saslauthd, imapd, couriertls, authdaemon.plain

The server has a gig of RAM which fills up in about 72 hours of uptime.

Running htop, I added the memory persentages of all processes that showed up but the result accounted for a 48% load. The memory however is full. I can only conclude that some process doesn't release the memory properly.

I would be glad with any suggestions on how to carry the investigation further. Or someone already knows the answer?
 
Old 03-26-2007, 10:35 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Are you getting out of memory errors? Or heavy swap usage that stays at high levels? Your htop (and ps) outputs might be useful as I run most of those but don't have any problems with memory.
 
Old 03-26-2007, 11:27 PM   #3
Zention
Member
 
Registered: Mar 2007
Posts: 119

Rep: Reputation: 16
Memory is often full on a Linux system.

The reason is, memory is not cleared. This allows applications to re-access memory later that includes application themselves without having to make expensive calls to the harddrive.

Now, if you are experiencing excessive swapping then something odd might be happening.

Your next question might be how can I tell what is being kept for later usage and what is currently being used and therefore has higher priority in not being booted out of memory.

It is called the cache - and this is the reason apps like firefox seem a little slow on first invoke but subsequently seem a bit faster.

free -m -s 4

have a look at the cache details.

It is a common misconception, and as I don't use htop you might actually be seeing real system memory usage in which case a memory leak is possible but if it is like top you are actually seeing total memory usage.

sar is another good sysstat tool, and yeah I looked at htop (very pretty) but it is top like and really only use those as front line analysis.

You are not the first to come across this and I am sure not the last.

Last edited by Zention; 03-26-2007 at 11:38 PM.
 
Old 03-27-2007, 08:23 AM   #4
Alfar
LQ Newbie
 
Registered: Dec 2006
Posts: 15

Original Poster
Rep: Reputation: 0
It makes perfect sence to release memory on demand rather than load programs from hd all the time. The server is using only 340k of swap space, so I guess this is not so bad.

Thank you both for your informative responces.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Tricky installation question or1onas Linux - Newbie 3 04-28-2004 04:16 PM
a tricky question archlyric Linux - Newbie 3 02-27-2004 01:06 AM
neverwinter nights question BmxFace Linux - Software 11 08-01-2003 10:07 PM
Tricky Konqueror Question gbrad Linux - General 2 03-02-2003 05:32 PM
A Tricky question in Apache!! RKris Linux - Software 1 02-20-2003 08:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:35 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