high usage mysql + just for one user
Hello
i see my mysql have much usage:
[QUOTE] PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
306175 mysql 20 0 10.9g 3.4g 1.2g S 161.2 7.2 1606:46 mysqld
when i did run "mysqladmin processlist;" i saw one user have much process: [QUOTE] | 418833 | par****a_ha****2 | localhost | par****a_ha****2 | Sleep | 0 | | | | 418835 | par****a_ha****2 | localhost | par****a_ha****2 | Query | 1 | Sending data | SELECT COUNT(*) FROM td5ia_k2_comments WHERE itemID=28 AND published=1 | | 418839 | par****a_ha****2 | localhost | par****a_ha****2 | Query | 0 | Sending data | SELECT COUNT(*) FROM td5ia_k2_comments WHERE itemID=23 AND published=1 | | 418841 | par****a_ha****2 | localhost | par****a_ha****2 | Query | 0 | Sending data | SELECT COUNT(*) FROM td5ia_k2_comments WHERE itemID=22 AND published=1 | 418845 | par****a_ha****2 | localhost | par****a_ha****2 | Sleep | 0 | | |
also in dbtop command i see: [QUOTE] User .cpu(%) * . read(B/s) . write(B/s) . CAUSE pa***a 231/301/240 0/0/0 97974/84513/76185-
they are for one user. how i can see why have this usage? or how i can resolve that? Thanks!
when i did run "mysqladmin processlist;" i saw one user have much process: [QUOTE] | 418833 | par****a_ha****2 | localhost | par****a_ha****2 | Sleep | 0 | | | | 418835 | par****a_ha****2 | localhost | par****a_ha****2 | Query | 1 | Sending data | SELECT COUNT(*) FROM td5ia_k2_comments WHERE itemID=28 AND published=1 | | 418839 | par****a_ha****2 | localhost | par****a_ha****2 | Query | 0 | Sending data | SELECT COUNT(*) FROM td5ia_k2_comments WHERE itemID=23 AND published=1 | | 418841 | par****a_ha****2 | localhost | par****a_ha****2 | Query | 0 | Sending data | SELECT COUNT(*) FROM td5ia_k2_comments WHERE itemID=22 AND published=1 | 418845 | par****a_ha****2 | localhost | par****a_ha****2 | Sleep | 0 | | |
also in dbtop command i see: [QUOTE] User .cpu(%) * . read(B/s) . write(B/s) . CAUSE pa***a 231/301/240 0/0/0 97974/84513/76185-
they are for one user. how i can see why have this usage? or how i can resolve that? Thanks!
-
Hello, If your only one user is increasing the load on your server through MySQL then you will have to optimize that user MySQL DB on your server 0 -
Unless you manage the script the user is using and you wrote the MySQL queries they're executing there's very likely little you can do short of perhaps making sure your MySQL is optimized for your environment. You'd probably want to get in contact with the customer and advise them of their usage and ask them to optimize - if they can't do it, there's not really any way you could do it unless you want to update/manage their script for them. 0 -
Thanks how i can see slow queries? how i can kill a database ID when i run "mysqladmin processlist;" i did use kill -9 ID but dont work for ID in "mysqladmin processlist;" Thanks 0 -
Hello :) It's really not a good idea to attempt to kill database processes as a method for reducing usage. Instead, you may want to consider suspending the account and restarting MySQL if you want to ensure it's disabled. The following thread is useful for obtaining information on tuning your MySQL: mysqlmymonlite.sh server stats gathering tool for cPanel Server Thank you. 0
Please sign in to leave a comment.
Comments
4 comments