Playsms & Mysql High CPU Usage


(Hamidreza Mahmoudi) #1

Hello.
Playsms and MYSQL take high cpu usage when I have got about 50 SMS Schedule in playsms Queue.
I use playsms to raspberry 3
Can I fix it ?
Thank you in advance.


(Anton Raharja) #2

Seems normal to me, sending SMS does take some CPU per queue

You can limit the number of queue processed at one time, check config.php

Anton


(Hamidreza Mahmoudi) #3

I changed number of queue proccess but nothing changed and cpu usage is high.
Can we set schedule to check every 5minetus ?


(Anton Raharja) #4

Changing config.php requires playsmsd restart

Anton


(Hamidreza Mahmoudi) #5

Yes. I did it.
But CPU Usage has not been reduce.


(Anton Raharja) #6

Raspi has a limited power, and unfortunately playSMS is coded with no consideration of such limitation

Try to use mysql outside raspi, external server for mysql

Anton


(Hamidreza Mahmoudi) #7

I changed playsms DB to external server (core i7 32GB RAM) in playsms config

$core_config['db']['type'] = 'mysqli';          // database engine
$core_config['db']['host'] = '192.168.1.4';     // database host/server
$core_config['db']['port'] = '3306';    // database port

but CPU usage still high. (CPU usage will be reduce after I delete all SMS queues)


(Hamidreza Mahmoudi) #8

There is no way to fix it?


(Hamidreza Mahmoudi) #9

As you said in the email:
I change


These 3, set to 2, 10 and 50. Restart playsmsd.

Also edit /etc/playsmsd.conf, remove comment from DAEMON_SLEEP and set to 5. Restart playsmsd.

But I want change dameon sleep to 30
And after that user credit has not ben change or take so long time.
How can I fix it?
Thanks


(Anton Raharja) #11

daemon sleep suppose to be small, like 1 or 2

anton