Koozali.org: home of the SME Server

memory usage nearly full

Offline fixit

  • *
  • 216
  • +0/-0
    • http://www.fixitcomputers.com.au
memory usage nearly full
« on: October 06, 2006, 11:21:43 AM »
The problem I am having at the moment is the memory being over loaded. The used, buffers and cached memory is on the increase and is slowing down the server.

How do I find out what is using the memory or how can I clear the cache

Thanks, Russell

Screen Shot from sme7admin memory usage

.........

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: memory usage nearly full
« Reply #1 on: October 06, 2006, 11:36:05 AM »
Quote from: "fixit"
The problem I am having at the moment is the memory being over loaded. The used, buffers and cached memory is on the increase and is slowing down the server.

How do I find out what is using the memory or how can I clear the cache
Get command line access and use the following commands
Code: [Select]
topThis will show you a list of precesses with their pid and things like memory and cpu usage.
Code: [Select]
pscan show you the details of the process when you use it like this for instance:
Code: [Select]
ps ax
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
memory usage nearly full
« Reply #2 on: October 06, 2006, 11:42:38 AM »
Run htop in shell.

Are you expecting to see a lot of free memory. Memory usage in linux is 'different'.
Regards,
William

IF I give advise.. It's only if it was me....

Offline fixit

  • *
  • 216
  • +0/-0
    • http://www.fixitcomputers.com.au
memory usage nearly full
« Reply #3 on: October 06, 2006, 12:13:32 PM »
This has only happened since saturday, as you can see the increase is a big jump and it already has crashed the server and a reboot was required, it appears as it is on the rise.

will run those commands and try and find out what it is

Thanks, Russell
.........

Offline fixit

  • *
  • 216
  • +0/-0
    • http://www.fixitcomputers.com.au
memory usage nearly full
« Reply #4 on: October 06, 2006, 12:35:51 PM »
What commands do I need to clear the cache
.........

Offline raem

  • *
  • 3,972
  • +4/-0
Re: memory usage nearly full
« Reply #5 on: October 07, 2006, 02:45:59 PM »
fixit

> ... the memory being over loaded.
> The used, buffers and cached memory is on the increase and is slowing down the server.

Linux is designed to use all memory rather than leave some of it unused. ie it's a good thing to be running at 95% memory usage.
The time to be concerned is when your swap memory regularly exceeds 50% of the actual memory.
It's really a sign you need more memory for the usage pattern you have ie number of processes running, system load etc.
If your system is REALLY crashing due to memory limits, then obviously you need more memory.

If your system is crashing because there are too many processes running due to abnormal events, then you REALLY need to investigate why these additional processes are running and wanting more memory than the system can provide.

htop
top
top -i
ps -aux

will show whats going on.


> What commands do I need to clear the cache

Reboot, but I expect that will only temporarily fix the issue. As the processes all start up again the memory will get used and the system will crash again.
...

Offline raem

  • *
  • 3,972
  • +4/-0
Re: memory usage nearly full
« Reply #6 on: October 07, 2006, 03:00:54 PM »
fixit

> The used, buffers and cached memory is on the increase and is slowing down the server.

The cache being fully utilised is a good thing, it speeds up your server, not slows it down.
Data in cache memory is read much more quickly than from the hard drive.

Something else is happening to "slow your server down & crash it", possibly a virus infection on workstations or heavy email and virus and spam loads.
Email message virus and spam scanning/filtering is processor intensive.

use
iptraf
to analyse

Apart from the crashing you mention, your graph looks OK to me.

What do your log files say happened at the time of the crashes ?
...

Offline fixit

  • *
  • 216
  • +0/-0
    • http://www.fixitcomputers.com.au
memory usage nearly full
« Reply #7 on: October 08, 2006, 04:19:26 PM »
Quote
htop
top
top -i
ps -aux



I ran these commands and found that the speedy backend was running about 33% memory usage.

I installed smeserver-squid_cache_mgt-1.0-2.noarch.rpm and flushed the cache , but that did not make much difference, as the graph shows.





I think I might of found the problem, could have been with metadot, I removed all the rss news feeds that came preinstalled in the userchannel section, it could be just a coinstanence, but I did notice the drop in the cpu usage, I only normally see the cpu usage peak when it does a virus scan.

System Load CPU



CPU usage

to me this seemed like it was a big jump in usage, this what caught my attention



Thanks Russell
.........

Offline raem

  • *
  • 3,972
  • +4/-0
memory usage nearly full
« Reply #8 on: October 08, 2006, 07:56:25 PM »
fixit

> the speedy backend was running about 33% memory usage.

What is the speedy backend ???


> smeserver-squid_cache_mgt....flushed the cache

It wouldn't make any difference either, squid cache is just the memory of web sites visited, nothing to do with running processes etc. As I said before a reboot will empty the cache, but it will fill up again, as it is supposed to.

You still don't seem to get it, having a large cache (using a lot of memory)is a good thing, it speeds up your system, and Linux is making full use of the memory, rather than leaving it unused.


>...the problem, could have been with metadot, I removed all the rss news feeds .... I did notice the drop in the cpu usage

A sustained drop in CPU usage is more likely to bring speed back to your system.
...

Offline fixit

  • *
  • 216
  • +0/-0
    • http://www.fixitcomputers.com.au
memory usage nearly full
« Reply #9 on: October 09, 2006, 12:42:32 AM »
OK, I get it now, :lol:

Yes, lots of cache is a good thing, but I think lots of CPU usage is not.

the speedy backend is the perl CGI speedy, to speed up perl

Maybe I should have made the topic CPU over load, which seems to be the problem in this case then :lol: my mistake.

Thanks to all tha that replyed, I get to learn something new though, thanks again.

Russell
.........