Something strange about msqld memory usage


Newbie here.

I run my VPS on CentOS 7. I just setup LAMP (with mariadb), phpMyAdmin and PPTP for VPN server. Just pure setup. I didn’t create another php file or database.

I run “top” command and watch some time. I just realize that mysqld process running every 25 seconds, shows up only 3 seconds and then disappear. This happens every 25 seconds and looks like below:

1152 mysql 20 847188 0,7 18,4 mysqld

What is the reason of that? Is it a some kind of memory leak? Is there any way to optimize mysql to avoid this problem?

Thanks for your help

P.s. That would be great if we can add images to questions.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

This question was answered by @ryanpq:

The mysqld process should be running the whole time but as it’s resource usage changes it may appear and disappear from your view in “top” depending on how you have it sorted. MySQL/MariaDB will reserve a fairly large amount of RAM for itself and this can sometimes pose problems on 512MB droplets. If you are running on a 512MB droplet you may want to consider enabling a swap file on your droplet. The tutorial below will walk you through this process:

View the original comment