Skip to main content

miniserv.pl uses lots of CPU power

Posted by gb_delti on Mon, 01/26/2009

Hello,

sometimes when using PBXManager while placing calls or listening to MOH the audio quality decreases for one second. Using top I have seen that the process miniserv.pl uses 99% of the CPU when I am loading a configuration page, stripping the processing power from asterisk. Loading is also very slow (1-3 seconds per page) compared with other web apps. Is this normal behavior or can I do something about it?


Submitted by eeman on Tue, 01/27/2009 Permalink

well, as with any application, you can counter it with processor power and memory, like multiple cores etc. I have also noticed that some of the backgroup process when a page loads has resulted in 1-3 second slowdowns. Are you running the latest build of pbx manager? A recent bug was fixed that was doubling up on connections to the AMI on every page load. Additionally there is code that has to perform different actions depending on if the engine is callweaver, asterisk 1.4, asterisk 1.6 etc. I think eventually things are going to evolve to class objects to reduce code loaded on page loads. But yes, there are some pages that do incurr more load than others.

Submitted by olekaas on Wed, 01/28/2009 Permalink

My experience is that the time to load pages is at least 3 seconds. If Asterisk for some reason eats cpu cycles (solved by restart of *), the load time becomes agonizing. However - and most important - we have never experienced degraded sound quality.

I don't know what the time is spend on (AMI, code execution, parsing conf files, etc), but it would be neat if the web interface didn't need to run on the asterisk server and could fully manage multiple asterisk servers. Config files could be maintained using ssh with keys. When adding a new tenant you just select which server to use - and if you later need to move tenant, you just select another server and the movement is done automatically....

What ya think Alex? Fueled by a pizza and a couple of redbulls, you could do this overnight - ehh?

Seriously. The idea of having a separate server for the web interface, is that the server could be optimized for cranking out web pages without annoying asterisk. Also, no matter how many server, all tenants go to the same place to log in.

/Ole

Submitted by justdave on Wed, 01/28/2009 Permalink

You could probably do this easily with Thirdlane in its current form by NFS-mounting a few directories across a couple servers. You'd probably need to put passphraseless ssh keys on the box and add an ssh to your server restart command, and of course the remote IP for the manager access.