There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Linux and Unix
Tag Cloud
access acer asus bios bsod computer crash driver drivers error ethernet excel freeze gaming google hard drive hardware hdmi internet laptop malware memory monitor motherboard mouse network operating system printer problem ram random registry repair router security slow software sound trojan usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
Buffer help?

Reply  
Thread Tools
njovin's Avatar
Junior Member with 3 posts.
 
Join Date: Jun 2003
30-Jun-2003, 10:33 AM #1
Buffer help?
I am running Debian Linux Stable (with no GUI, just console) as a mail server (exim and qpopper) with some minor apache work to run webmail, as well as Vexira Mailarmor scanning incoming and outgoing emails for viruses.

My system seems to slow over time, that is, until it is rebooted. When I run top, I see that the "Buffers" are using a little over 300MB of my 500MB of physical memory (0MB of the 500MB swap file are in use).

If someone could help me understand what this memory is used for, if there is any way to release it from it's "Buffeed" state (I've tried running sync - no go), and if there's any way to track down WHY so much mem is buffered.

Of course this may be perfectly normal behavior, and if that's the case, knowing that would put me at ease too

Thanks in advance for any replies.
codejockey's Avatar
Senior Member with 1,410 posts.
 
Join Date: Feb 2002
30-Jun-2003, 08:47 PM #2
Often, gradual system slowdowns are the result of memory leaks -- memory that is allocated but not freed. Linux uses lots of memory for buffers (this improves I/O and overall throughput) but these are typically allocated once and remain allocated until the machine is shutdown. It's not unusual to have a significant portion of memory allocated to system buffers. However, 300 Mbytes out of 500 Mbytes seems high, although it's hard to know without knowing the memory requirements/management of the applications you are running (as a point of comparison: on my 384 Mbyte slackware system, 40K is allocated to system buffers -- as far as I know, this is a default value, since I haven't messed with it). A gradual slowdown does indicate a problem (in all likelihood).

What you want to look for is one or more processes whose memory requirements increase over time. One way to do this is to use the command: ps -ale and monitor the column headed SZ. Over time, a program with a memory leak will show an increase in the value in this column. The top command provides much the same information, but because top reports in real-time, it can be hard to track changes (ps takes a snapshot).

These sorts of problems can be the devil to track down. Hope this helps, and additional info appreciated.
__________________
The slowest component still sits at the keyboard.
njovin's Avatar
Junior Member with 3 posts.
 
Join Date: Jun 2003
07-Jul-2003, 10:28 AM #3
Thanks so much for the reply. This is very helpful info. I think what I'll do is set a cron to run ps -ale every 30 minutes or so and just keep appending it to a log file. That way I can tail what might be causing the problem. As soon as I get more info I will definitely let you know.

Thanks again.
njovin's Avatar
Junior Member with 3 posts.
 
Join Date: Jun 2003
07-Jul-2003, 02:08 PM #4
OK, I restarted the server at around 7am. When it came up only 1mb or so of memory was buffered. Now, at 10am, I am up to 176mb of buffers.

I set a cron job to log the results of ps -ale every minute the whole time. After looking at it, the only thing using any kind of memory is apache. It looks like everytime someone logs onto webmail, apache starts a new instance which takes between 5kb and 20kb of memory. When the user logs off of webmail, the apache process goes away, but the buffers stay.

Does anyone have any idea how to keep apache from buffering and/or clear buffers at regular intervals?
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 12:42 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.