LinuxQuestions.org
Visit Jeremy's Blog.
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 10-30-2010, 06:18 AM   #1
AsadMoeen
Member
 
Registered: Jun 2010
Posts: 160

Rep: Reputation: 3
Debian 5.0.6 | Too much RAM usage


[Fixed]


Hey.

I'd been using Directadmin on my Debian 5.0 machine earlier . I had 1GB ram and a lot of memory was used up. Sometimes even the OS crashed as the programs couldn't allocate memory. I increased my RAM to 3GB but still the RAM usage sometimes just flow up to 1GB although normally DirectAdmin doesn't use more than 200MB . Restarting the server fixes the issue but then it climbs up again and comes down to a 200-400MB again by itself. Cached Memory was also being too much and sometimes even Swap Partition gets used up .


Just to be sure that it's not the Bugged OS, today I installed the latest Debian 5.0.6 Net-inst on my machine . I allocated just 128MB of ram to it because it was just a testing machine. I installed it without the swap partition since I thought I will make a swap-file if it is required. I did not even update the OS rather I just installed Openssh-server and everything else was default as in Debian 5.0.6 . When server started, only 20MB ram was being used .

I just logged into my server afer about 5 hours and saw 112 MB ram being used out of which 91MB was cached. I haven't installed anything so why is this happening ?


Here is my 'Free -m' Usage :


Code:
Debian:~# free -m
             total       used       free     shared    buffers     cached
Mem:           123        111         12          0          6         91
-/+ buffers/cache:         13        110
Swap:            0          0
Here is my 'top ' Usage :

Code:
Debian:~# top
top - 06:15:38 up  2:22,  1 user,  load average: 0.00, 0.00, 0.00
Tasks:  34 total,   1 running,  33 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    126456k total,   113276k used,    13180k free,     6200k buffers
Swap:        0k total,        0k used,        0k free,    93984k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 2656 root      20   0  8160 2660 2196 S  0.7  2.1   0:00.06 sshd
    1 root      20   0  2104  684  588 S  0.0  0.5   0:02.76 init
    2 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kthreadd
    3 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 migration/0
    4 root      15  -5     0    0    0 S  0.0  0.0   0:00.02 ksoftirqd/0
    5 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/0
    6 root      15  -5     0    0    0 S  0.0  0.0   0:00.66 events/0
    7 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 khelper
   39 root      15  -5     0    0    0 S  0.0  0.0   0:00.28 kblockd/0
   41 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kacpid
   42 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kacpi_notify
  169 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kseriod
  206 root      20   0     0    0    0 S  0.0  0.0   0:00.00 pdflush
  207 root      20   0     0    0    0 S  0.0  0.0   0:01.04 pdflush
  208 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kswapd0
  209 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 aio/0
  754 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 ata/0


Why is this happening when I just installed the default Operating System and didn't even run an apt-get update on it . Please advise ?


I think my previous operating system with Directadmin was also having similar issues . What could be the problem ?

Last edited by AsadMoeen; 10-31-2010 at 12:30 AM.
 
Old 10-30-2010, 06:28 AM   #2
mesiol
Member
 
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731

Rep: Reputation: 137Reputation: 137
Hi,

nearly all memory not used by application or kernel will be used as filesystem cache. If an application allocates memory the operating system will scale down the filesystem cache.

There is nothing wrong, this is a completly normal behaviour. So don't worry about it.
 
Old 10-30-2010, 06:37 AM   #3
AsadMoeen
Member
 
Registered: Jun 2010
Posts: 160

Original Poster
Rep: Reputation: 3
Thanks for your reply. Can you explain this ?

I ran this command I found after Googling,

Code:
echo 3 > /proc/sys/vm/drop_caches

This cleared the cache memory and used RAM is only 14mb now.

I want to know if clearing the Cache memory is safe and why did this RAM grow like this . This is really fedding me up because my other machine with Debian - Directadmin has the same issue with RAM and it keeps rising/falling itself and it makes my websites slow.


Is this a general issue with Debian ? Is Debian not good for hosting websites ? What should we do to fix such issues ?
 
Old 10-30-2010, 07:30 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Simple explanation of caching: If a file is accessed on your server, it will be loaded to to the free memory, named cache. If it is accessed a second time, it can be loaded from cache, which is much faster as loading the file from disk every time it is accessed. If an application needs more RAM as there is currently free RAM available, files will be dropped from cache and the freed memory is assigned to the application. This behavior speeds up things and makes your server more responsible. It is a good behavior and nothing to be worried about, there is nothing eating up your RAM.
Simply said, you bought the RAM, and Linux tries to use it to its fully extent.
 
Old 10-30-2010, 07:40 AM   #5
AsadMoeen
Member
 
Registered: Jun 2010
Posts: 160

Original Poster
Rep: Reputation: 3
Ok Thanks for the explanation. I understand now.

This means my New Test server is working fine so I will be asking about problems with my Old Debian | Directadmin machine. Here is a link to my Post :

http://www.linuxquestions.org/questi...-crash-841372/


Admins please lock this topic and let my Post continue about Previous Debian 5.0 Machine.
 
Old 10-30-2010, 08:47 PM   #6
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
We do not "lock" threads here at LQ. You as OP of a thread can mark them [SOLVED] when you have gotten a satisfactory answer to them, but they remain open so that people may post to them if they wish.

I read your other threads, and while I probably did not read every single word of them, I could not distinguish them from the issue here in this thread. Therefore, the others have been closed. Please continue the discussion in this thread.

If there's some compelling difference between one of the others that I have closed, or it relates to this thread closely enough, please feel welcome to contact me by PM or email and I will have a re-read of the thread(s) you indicate, and consider re-opening or merging with this one.
 
Old 10-31-2010, 12:26 AM   #7
AsadMoeen
Member
 
Registered: Jun 2010
Posts: 160

Original Poster
Rep: Reputation: 3
This is really sad that you locked a post which was needing an answer.


Debian 5.0 topic wasnt duplicate'and this topic here is Debian 5.0.6 topic. I have 2 machines and I was discussing my problem in both of them as separate topics. I donn't know why the moderator closed my thread.

This thread is solved as the 1st word of the post says since I edited it.


That thread wasnt solved and I had to continue it. Please open it .

This is the thread.

http://www.linuxquestions.org/questi...-crash-841372/

Last edited by AsadMoeen; 10-31-2010 at 12:29 AM.
 
Old 10-31-2010, 12:44 AM   #8
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
If you want your thread opened again you have to send a mail or a personal message to the moderator.
 
Old 10-31-2010, 07:18 AM   #9
AsadMoeen
Member
 
Registered: Jun 2010
Posts: 160

Original Poster
Rep: Reputation: 3
I've mailed a mod . Waiting..
 
Old 10-31-2010, 10:03 AM   #10
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
The situation of the multiple threads has been rectified. This thread is [SOLVED] and so I expect little more should get posted to it unless someone other than the OP has something to add.

Meanwhile, OP's problem continues over here:
http://www.linuxquestions.org/questi...-crash-841372/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Too Much of RAM Usage !! asneed_jas Linux - Newbie 4 05-12-2007 05:28 AM
RAM usage Deelk Linux - General 11 03-27-2006 03:03 PM
RAM/SWAP usage ganja_guru Linux - Software 13 12-29-2004 03:17 AM
RAM usage Serena Linux - General 1 08-12-2003 10:50 PM
Average RAM usage... KevStA Linux - Newbie 7 05-31-2002 04:58 PM

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

All times are GMT -5. The time now is 02:31 AM.

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