Page 1 of 1

Sudden Sharp Increase in Memory Usage after 0.9.8-17 Upgrade

Posted: Wed May 17, 2017 2:21 am
by Syeef
Hello,
I didn't realize until now that my VPS is consuming an unusual amount of Memory! The Memory Usage sharply increased after the 0.9.8-17 Upgrade. Please see the Graph generated by VestaCP:

Image

According to the Graph, the Memory Usage increased Greatly and all of a Sudden at the end of November 2016, when Vesta 0.9.8-17 Upgrade was released if I am not mistaken. Besides upgrading to 0.9.8-17, I didn't do anything to the VPS... I didn't change any configuration, not atleast for a year. Even I am hosting the same number of personal sites I was hosting since taking the VPS.

My VPS crashed twice in the last couple of months, the first time it corrupted MySQL Server totally, please see here. My VPS NEVER crashed before, it all started recently... so what should I do? Should I be concerned?

VPS Specs:
OS: CentOS 6.9 x86_64
CPU: Intel Xeon L5639 @ 2.13GHz (8-cores)
RAM: 4GB
SSD: 90GB

Thanks.

Re: Sudden Sharp Increase in Memory Usage after 0.9.8-17 Upgrade

Posted: Wed May 17, 2017 6:51 am
by skurudo
Try to tune your MySQL config first

viewtopic.php?f=14&t=14148

Re: Sudden Sharp Increase in Memory Usage after 0.9.8-17 Upgrade

Posted: Wed May 17, 2017 8:28 am
by Syeef
skurudo wrote:Try to tune your MySQL config first

viewtopic.php?f=14&t=14148
Okay. I am following this. Will update the results in a few days :)

Re: Sudden Sharp Increase in Memory Usage after 0.9.8-17 Upgrade

Posted: Fri May 19, 2017 11:41 pm
by Syeef
skurudo wrote:Try to tune your MySQL config first

viewtopic.php?f=14&t=14148
Yes, that MySQL Tuner script helped reduce a lot of memory usage. I will post the final results shortly after doing some more tests.

Also, is there any such Tuner script for HTTPD or NGINX? that would help optimize Memory Usage for my 4GB VPS?

Thanks.

Re: Sudden Sharp Increase in Memory Usage after 0.9.8-17 Upgrade

Posted: Tue May 23, 2017 2:43 am
by Syeef
Nah, it's not helping... I thought Tuning MySQL seemed to be working at first, but after a day or so, it is back like before.

This is new graph from today:

Image

Memory Usage is still high!

I did a server reboot after each MySQL Tuning attempt, now I am thinking the server reboot was helping and not MySQL Tuning.

help! :'(

Re: Sudden Sharp Increase in Memory Usage after 0.9.8-17 Upgrade

Posted: Tue May 23, 2017 2:09 pm
by Trentor
Syeef wrote:help! :'(
But, are you facing any problem for running out of memory?

The graph seems ok for me in a Linux server. Linux try to use all the memory using cache. Indeed, your server it's not swapping too much.

You have to find how your RAM it's used (Kernel + apps + cache + buffer).

For example, this is how the RAM is used in my server:

Image

As you can see, Linux is trying to use all my 2GB of RAM. But it's ok, I've never ran out of memory.

Take a look: Linux ate my RAM!

Re: Sudden Sharp Increase in Memory Usage after 0.9.8-17 Upgrade

Posted: Tue May 23, 2017 5:54 pm
by Syeef
Trentor wrote: But, are you facing any problem for running out of memory?
Yes. My Server crashed 3 times recently, the last crash occurred 2 days ago when I thought Tuning MySQL was helping, but it wasn't actually helping.
Trentor wrote: The graph seems ok for me in a Linux server. Linux try to use all the memory using cache. Indeed, your server it's not swapping too much.
Please see the first graph I posted, problem only started immediately after 0.9.8-17 upgrade. before that there was no high Memory Usage atleast for over a year. Something changed after the upgrade :(

Re: Sudden Sharp Increase in Memory Usage after 0.9.8-17 Upgrade

Posted: Tue May 23, 2017 6:13 pm
by Trentor
Syeef wrote:
Trentor wrote: But, are you facing any problem for running out of memory?
Yes. My Server crashed 3 times recently, the last crash occurred 2 days ago when I thought Tuning MySQL was helping, but it wasn't actually helping.
Trentor wrote: The graph seems ok for me in a Linux server. Linux try to use all the memory using cache. Indeed, your server it's not swapping too much.
Please see the first graph I posted, problem only started immediately after 0.9.8-17 upgrade. before that there was no high Memory Usage atleast for over a year. Something changed after the upgrade :(
Have you checked what is the highest RAM consumer in your server?

You can use, f.e., top or, better, htop.

Sort the processes for memory use and check wich one is guilty.

Edit: Your second graph of memory use it's perfectly fine.

Re: Sudden Sharp Increase in Memory Usage after 0.9.8-17 Upgrade

Posted: Tue May 23, 2017 6:47 pm
by Syeef
Trentor wrote:Have you checked what is the highest RAM consumer in your server?
i checked under VestaCP [Server], and it seems normal like always.
Trentor wrote:You can use, f.e., top or, better, htop.
I also used top before posting here, but that was no help at all.

But i just installed htop... it is nice! thanks. Let me review using htop for few days and find out the "guilty" one.