Optimize mysql - High CPU usage for /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid
Budget: $10 – $30 USD
I have installed a software for sending Email called Lethe. It works with a cron when sending a campaign, the consumption of MYSQL is triggered as a detail. I need it to be optimized and avoid excessive consumption of resources.
########################################################
[root@ns102432 ~]# mysqladmin proc status
+-------+--------------------+-----------+-------------------+---------+-------+--------------+------------------------------------------------------------------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-------+--------------------+-----------+-------------------+---------+-------+--------------+------------------------------------------------------------------------------------------------------+
| 36550 | ascae01_ascae | localhost | ascae01_lethe | Execute | 10809 | Sending data | SELECT s.* FROM lethe_subscribers s INNER JOIN lethe_campaign_groups g on g.group_id=s.group_id LEF |
| 36565 | ascae01_ascae | localhost | ascae01_lethe | Execute | 10808 | Sending data | SELECT s.* FROM lethe_subscribers s INNER JOIN lethe_campaign_groups g on g.group_id=s.group_id LEF |
| 36566 | ascae01_ascae | localhost | ascae01_lethe | Execute | 10808 | Sending data | SELECT s.* FROM lethe_subscribers s INNER JOIN lethe_campaign_groups g on g.group_id=s.group_id LEF |
| 36590 | ascae01_ascae | localhost | ascae01_lethe | Execute | 10807 | Sending data | SELECT s.* FROM lethe_subscribers s INNER JOIN lethe_campaign_groups g on g.group_id=s.group_id LEF |
| 39243 | ascae01_ascae | localhost | ascae01_lethe | Execute | 1008 | Sending data | SELECT s.* FROM lethe_subscribers s INNER JOIN lethe_campaign_groups g on g.group_id=s.group_id LEF |
| 39245 | ascae01_ascae | localhost | ascae01_lethe | Execute | 1008 | Sending data | SELECT s.* FROM lethe_subscribers s INNER JOIN lethe_campaign_groups g on g.group_id=s.group_id LEF |
| 39249 | ascae01_ascae | localhost | ascae01_lethe | Execute | 1008 | Sending data | SELECT s.* FROM lethe_subscribers s INNER JOIN lethe_campaign_groups g on g.group_id=s.group_id LEF |
| 39252 | ascae01_ascae | localhost | ascae01_lethe | Execute | 1006 | Sending data | SELECT s.* FROM lethe_subscribers s INNER JOIN lethe_campaign_groups g on g.group_id=s.group_id LEF |
| 39256 | ascae01_ascae | localhost | ascae01_lethe | Execute | 1006 | Sending data | SELECT s.* FROM lethe_subscribers s INNER JOIN lethe_campaign_groups g on g.group_id=s.group_id LEF |
+-------+--------------------+-----------+-------------------+---------+-------+--------------+------------------------------------------------------------------------------------------------------+
[root@ns102432 ~]# mysql -e "show variables;" | grep table_open_cache
table_open_cache 2000
table_open_cache_instances 16
[root@ns102432 ~]#
#############################################################
########################################################
[root@ns102432 ~]# mysqladmin proc status
+-------+--------------------+-----------+-------------------+---------+-------+--------------+------------------------------------------------------------------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-------+--------------------+-----------+-------------------+---------+-------+--------------+------------------------------------------------------------------------------------------------------+
| 36550 | ascae01_ascae | localhost | ascae01_lethe | Execute | 10809 | Sending data | SELECT s.* FROM lethe_subscribers s INNER JOIN lethe_campaign_groups g on g.group_id=s.group_id LEF |
| 36565 | ascae01_ascae | localhost | ascae01_lethe | Execute | 10808 | Sending data | SELECT s.* FROM lethe_subscribers s INNER JOIN lethe_campaign_groups g on g.group_id=s.group_id LEF |
| 36566 | ascae01_ascae | localhost | ascae01_lethe | Execute | 10808 | Sending data | SELECT s.* FROM lethe_subscribers s INNER JOIN lethe_campaign_groups g on g.group_id=s.group_id LEF |
| 36590 | ascae01_ascae | localhost | ascae01_lethe | Execute | 10807 | Sending data | SELECT s.* FROM lethe_subscribers s INNER JOIN lethe_campaign_groups g on g.group_id=s.group_id LEF |
| 39243 | ascae01_ascae | localhost | ascae01_lethe | Execute | 1008 | Sending data | SELECT s.* FROM lethe_subscribers s INNER JOIN lethe_campaign_groups g on g.group_id=s.group_id LEF |
| 39245 | ascae01_ascae | localhost | ascae01_lethe | Execute | 1008 | Sending data | SELECT s.* FROM lethe_subscribers s INNER JOIN lethe_campaign_groups g on g.group_id=s.group_id LEF |
| 39249 | ascae01_ascae | localhost | ascae01_lethe | Execute | 1008 | Sending data | SELECT s.* FROM lethe_subscribers s INNER JOIN lethe_campaign_groups g on g.group_id=s.group_id LEF |
| 39252 | ascae01_ascae | localhost | ascae01_lethe | Execute | 1006 | Sending data | SELECT s.* FROM lethe_subscribers s INNER JOIN lethe_campaign_groups g on g.group_id=s.group_id LEF |
| 39256 | ascae01_ascae | localhost | ascae01_lethe | Execute | 1006 | Sending data | SELECT s.* FROM lethe_subscribers s INNER JOIN lethe_campaign_groups g on g.group_id=s.group_id LEF |
+-------+--------------------+-----------+-------------------+---------+-------+--------------+------------------------------------------------------------------------------------------------------+
[root@ns102432 ~]# mysql -e "show variables;" | grep table_open_cache
table_open_cache 2000
table_open_cache_instances 16
[root@ns102432 ~]#
#############################################################