Question
Something strange about msqld memory usage
Hello,
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:
PID | USER | PR | VIRT | %CPU | %MEM | COMMAND |
---|---|---|---|---|---|---|
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.
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.
×
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:
https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04