Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-30-2010, 06:18 AM
|
#1
|
Member
Registered: Jun 2010
Posts: 160
Rep:
|
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.
|
|
|
10-30-2010, 06:28 AM
|
#2
|
Member
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731
Rep: 
|
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.
|
|
|
10-30-2010, 06:37 AM
|
#3
|
Member
Registered: Jun 2010
Posts: 160
Original Poster
Rep:
|
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 ?
|
|
|
10-30-2010, 07:30 AM
|
#4
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
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.
|
|
|
10-30-2010, 07:40 AM
|
#5
|
Member
Registered: Jun 2010
Posts: 160
Original Poster
Rep:
|
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.
|
|
|
10-30-2010, 08:47 PM
|
#6
|
LQ Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594
|
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.
|
|
|
10-31-2010, 12:26 AM
|
#7
|
Member
Registered: Jun 2010
Posts: 160
Original Poster
Rep:
|
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.
|
|
|
10-31-2010, 12:44 AM
|
#8
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
If you want your thread opened again you have to send a mail or a personal message to the moderator.
|
|
|
10-31-2010, 07:18 AM
|
#9
|
Member
Registered: Jun 2010
Posts: 160
Original Poster
Rep:
|
I've mailed a mod . Waiting..
|
|
|
10-31-2010, 10:03 AM
|
#10
|
LQ Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594
|
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/
|
|
|
All times are GMT -5. The time now is 02:31 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|