0

I run all of my websites on a 512MB dedicated virtual server, which up until now has served me very well.

On 10 Jan, for some unknown reason my memory consumption went up from averaging around 50% to 70-80%. To my recollection, I did not make any changes to the server that day and none of my websites have been receiving more traffic than usual, so technically there should be no reason for the higher memory consumption. The only possible reason is a 'yum update' which will have installed some updates of which may be eating more resources then they should be.

Nevertheless, I decided 3 days ago to try to optimize my server and reduce its memory consumption. I did this by following the steps in this link:

Making it better - Media Temple

I succeeded with all of the steps, except the FastCGI PHP module for complicated reasons. Regardless of this, the steps have had the opposite effect and I now seem to be using over 100% of my memory most of the time. Please note, the reason why I am able to use over 100% is because the server actually has 1GB but I am only meant to be using up to 512MB.

I have tried rolling back the changes I made by restoring the back conf files I made, but this has had no effect.

I did run another 'yum update' which could have installed a resource eating application

For your info, the mirrors that I use for 'yum update' are the default Plesk ones and Atomic. This might be relevant as the problem may be coming as a result of this not what I have done.

I also ran 'up' for the micro updates, which again, may have caused this problem

My questions are:

  1. Is there a plugin to see exactly what is eating my memory?
  2. Are the steps in the aforementioned link reliable in the sense that if configured correctly they will consume less of my servers resources?
  3. Is anybody else noticing higher memory consumption from the recent Plesk and Yum updates? My Plesk version is psa-10.3.1-cos5.build1012110718.17
Ben Carey
  • 164
  • 12
  • 1
    Not about programming. Belongs on serverfault instead. – Konerak Jan 26 '12 at 08:21
  • 1
    maybe better on serverfault? (voted to move) – jcomeau_ictx Jan 26 '12 at 08:22
  • Okay, I have never heard of this site. I will head over there now. Thank you – Ben Carey Jan 26 '12 at 08:24
  • I have flagged it to be moved to server fault, thank you for your help. – Ben Carey Jan 26 '12 at 08:29
  • It sounds like your problem is something called Linux. All of my Windows servers run fine. :) – JohnThePro Feb 10 '12 at 17:38
  • @JohnThePro, I respect your comment with regards to linux servers, I in fact work on several windows servers myself and I agree that in certain areas they are better, least of all, you are able to control them with a mouse and keyboard unlike CentOS! However, when it comes to control and administration, as long as you are familiar with shell script, Linux blow windows out of the water. – Ben Carey Feb 12 '12 at 11:15
  • I agree that individual customization of a machine (and finite control of the real deep level stuff is best done in Linux). To each their own, I'm no fanboy, just a vested professional. Thanks for taking my comments with a smile. You'd be surprised how many people don't. – JohnThePro Feb 13 '12 at 15:25

2 Answers2

5

Don't use a scheme where the system has more memory available than you actually want it to use. Operating systems assume that free memory is wasted and try their best to find some way to use it. Limit the OS to only the memory you want it to use and you won't have a problem.

Free memory is like money in a checking account. If it's there, it'll get used.

David Schwartz
  • 31,449
  • 2
  • 55
  • 84
  • That is very interesting!!! How do I reduce the memory of the dedicated server? – Ben Carey Jan 26 '12 at 08:23
  • You can change the kernel command line (add `mem=512M`). You can ask the administrator of the machine to reduce the memory made available to the OS. – David Schwartz Jan 26 '12 at 08:26
  • How do I change the kernel command? – Ben Carey Jan 26 '12 at 08:32
  • It depends what boot loader you use to boot the kernel. For `grub`, it's usually in `/boot/grub.conf`. Some distributions have a separate file that holds kernel parameters which you have to edit and then 'compile' or install somehow. – David Schwartz Jan 26 '12 at 08:35
  • Doesnt seem to be grub. Is there anyway I can find out? Surely I will have to reboot or as you mention 'compile' the kernel, is this complicated? – Ben Carey Jan 26 '12 at 08:40
  • You don't have to compile the kernel, you just have to install the new parameters to your boot loader. With `grub2`, that's a script. What distribution is this? – David Schwartz Jan 26 '12 at 09:25
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/7065/discussion-between-ben-carey-and-david-schwartz) – Ben Carey Jan 26 '12 at 09:28
0

Check mysql-server version. This was my issue , sql eating all available other then burstable RAM. I had the same issue , and others. About the same time. I did not find a solution due to so many other errors I had, other than backup up data and re imaging the server.

Rick
  • 1