Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Dammit Jim, I'm a web developer, not a sys admin.

With that out of the way, my client's has a CentOS server (6.2) that is only serving a single Magento site (and the associated MySQL server) and it is frequently running out of memory, despite the site only currently being open to 5 users. I'm investigating the logs to try to figure out why the memory usage is so high, but I don't really know what I'm looking at.

It seems that there are a lot of entries in /var/log/messages concerning DHCP requests, approximately one every 15 seconds, that look like this:

Apr  7 14:23:06 s15940039 dhclient[815]: DHCPREQUEST on eth0 to 172.30.102.85 port 67 (xid=0x6b5cd2a7)

Is this normal? I don't see anything else in here that I don't recognise, but then I'm not sure I'd know the problem if I did see it. 4 days ago the server ran out of memory completely and locked up, requiring a restart. The DHCP messages did not start up again for 23 hours, but then carried on as before.

I have read this question which describes the same issue, but in my case a fresh DHCP lease does not ever seem to be issued. Is this something I should push back to the hosting provider, or have I not yet found the source of the memory problem?

share|improve this question
    
What do you mean by "running out of memory"? Are you getting error messages? If it's running out of free memory, that's normal. Since free memory is useless, the system tries as hard as it can to minimize the amount of free memory. –  David Schwartz Apr 9 '12 at 0:08
    
When I log into the Parallels interface it shows the RAM usage to be in the high 90s, and the time that it became completely unresponsive the service provider told me that it had run out of memory. –  shanethehat Apr 9 '12 at 9:56
    
I wouldn't read very much into either of those bits of information. RAM being used is normal and doesn't indicate a shortage. (We give a server RAM because we want it to use it to run faster, not because we want to see lots of free RAM to make us feel better.) And your description of a single incident whose diagnosis was reported to you by an uninterested third party wouldn't carry much weight, IMO. I would strongly urge you to avoid limiting your troubleshooting by jumping to a diagnosis. (Especially since you seem to have jumped at least twice now, focusing on DHCLIENT.) –  David Schwartz Apr 9 '12 at 10:07

2 Answers 2

I highly doubt that dhclient is consuming all of your memory, it is a very simple daemon. Have you used tools like top and sar to track your memory usage in real time and historically? I suggest you start analyzing the memory usage of your web application and web application server over time, perhaps using in-application monitoring or an external tool like Cacti or Munin.

Additionally, I'd suggest using statically assigned addresses, if that's something your hosting provider will allow. dhclient and a DHCP infrastructure are just one more moving part that could break.

share|improve this answer
    
As this is a bit out of my area of expertise I hadn't looked at any memory tracking tools. I will read up on those you have mentioned and get something going to keep track of what is going on. –  shanethehat Apr 8 '12 at 16:59

Although I understand why you think that dhclient might cause your RAM filling up very fast, I think there might be another reason.

I recommend to have a look at some analyzing tools which are easy to understand. Install htop and dstat and try finding what eats up all the RAM.

Have a look at my dstat tutorial, it shows you some examples: http://www.xenuser.org/2011/09/24/real-time-system-monitoring-with-dag-wieers-dstat/

share|improve this answer
    
If only I understood what all these beautifully coloured numbers really meant! –  shanethehat Apr 9 '12 at 15:48
    
Let us help you! :-) What about posting some screenshots here? –  Valentin Apr 9 '12 at 21:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.