High CPU applying changes

With the FOP2 service started, applying configurations changes in FreePBX causes the CPU to go over 80% for 60-120 seconds. What can be done to reduce the reload time? This does not happen with the FOP2 service is stopped. I am using FreePBX 2.9.0.12, Asterisk 1.8.7.1 and FOP2 2.26. There are about 259 extensions with 100 not active at this time, 7 queues, and 20 ring groups. Thanks.

Comments

  • If you have many extensiones, the autoconfig scripts will take its share of cpu, also mysql will show some spikes. It is not directly tied to the fop2 process itself. You can monitor cpu usage with TOP and check who is taking the cpu time, is it fop2_server? is it mysql? is it asterisk?

    My recommendations:

    Use fop2 version 2.27, it is more cpu efficient managing lots of AMI events (but it consumes more ram)

    Reduce the apply changes action in FreePBX. One common "mistake" I have seen is people doing multiple modifications/additions and applying changes after each one, when you can do all of the changes in one step and apply them just *once* when you finish. The apply changes in freepbx will regenerate your complete dialplan, it will create tons of files on disk, etc. It is demanding by itself (fop2 or not fop2).

    Best regards,
  • Removing the FOP2 module from FreePBX helps a lot. The config applies and the autoconfig-buttons procress runs for about 20 seconds. Any idea why the plugin would cause this problem?
  • Autoconfiguration scripts will perform mysql queries if you have fop2admin installed (they won't use mysql if it there is no fop2admin). So, your problem seems to be mysql related. You can check the scripts to look at the queries being used, they are complex but they should not make a system unusable for long, unless your mysql is in bad shape.
Sign In or Register to comment.