Mysql High cpu usage. Any tweaks to fix it?
Posted: Mon Oct 12, 2015 5:32 pm
I am running zm 1.28.2 on ubuntu and have one rtsp connection. The cpu usage for mysql is 133-143% is there a way to fix this? I have listed the output from top, and mysql for reference. Below shows that mysql has two of the same processes queued. Is that normal?
The camera is set to ffmpeg. The capture is set to 1280x640. The camera is sending 20fps and keyframes every 11 seconds. I have tried libvlc, and the built in rtsp, but those options do not work wit modect, and cpu usage remains the same.
Any help is appreciated.
Code: Select all
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1188 mysql 20 0 1340028 186464 10624 S 133.0 4.7 1177:10 mysqld
mysql> SHOW PROCESSLIST;
+-----+--------+-----------+------+---------+-------+--------------+------------------------------------------------------------------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+--------+-----------+------+---------+-------+--------------+------------------------------------------------------------------------------------------------------+
| 78 | zmuser | localhost | zm | Query | 42942 | Sending data | select * from Events as E left join Frames as F on (E.Id = F.EventId) where isnull(F.EventId) and no |
| 305 | zmuser | localhost | zm | Sleep | 1 | | NULL |
| 314 | zmuser | localhost | zm | Sleep | 41 | | NULL |
| 335 | zmuser | localhost | zm | Query | 40863 | Sending data | select * from Events as E left join Frames as F on (E.Id = F.EventId) where isnull(F.EventId) and no |
| 339 | zmuser | localhost | zm | Sleep | 15266 | | NULL |
| 355 | zmuser | localhost | zm | Sleep | 8 | | NULL |
| 538 | zmuser | localhost | zm | Sleep | 305 | | NULL |
| 539 | zmuser | localhost | zm | Sleep | 15 | | NULL |
| 862 | root | localhost | NULL | Query | 0 | NULL | SHOW PROCESSLIST |
| 863 | zmuser | localhost | zm | Sleep | 30 | | NULL |
+-----+--------+-----------+------+---------+-------+--------------+------------------------------------------------------------------------------------------------------+
Any help is appreciated.