Close

Account

Documentation

Forum

Menu

Theme cause a spike to CPU usage

  • Post count: 13
    rathasok7
    December 21, 2015 at 3:20 am #17052

    Hi,
    I need your urgent help. My normal CPU server usage is usually 2-3% (the limit is 5%). But after installing and activate your theme, the cpu usage is abnomally high (6%-7%). Could you help troubleshoot which of your theme component cause the high PHP usage?

    Post count: 13
    rathasok7
    December 21, 2015 at 3:53 am #17053

    i think the admin-ajax.php is the culprit.

    Post count: 2251
    Jegbagus
    December 22, 2015 at 4:19 am #17082

    hi rathasok7, i personally think its from WP Heartbeat. you may want to read this article : http://www.inmotionhosting.com/support/website/wordpress/heartbeat-ajax-php-usage

    Thank you

    Post count: 13
    rathasok7
    December 22, 2015 at 4:21 am #17084

    hi i have install heatbeat control to fix this.

    Post count: 13
    rathasok7
    December 22, 2015 at 4:22 am #17085

    but there is still a high load

    Post count: 2251
    Jegbagus
    December 22, 2015 at 4:22 am #17086

    great rathasok7, let me know if its working

    Thank you

    Post count: 13
    rathasok7
    December 22, 2015 at 4:27 am #17087

    no… there is still high cpu usage. my hosting support said there is a 2x increase in db query.

    Post count: 13
    rathasok7
    December 22, 2015 at 4:28 am #17088

    will moving js and css scripts to free cdn help? which file to change this js and css path?

    Post count: 2251
    Jegbagus
    December 23, 2015 at 2:02 am #17103

    hi rathasok7, may i know what kind cdn you using? may i suggest to use https://www.cloudflare.com/
    We use this also, and it work like a charm to reduce load for static file without even changing any code.
    also may i know why there is only 5% threshold for your CPU usage?

    Thank you

    Post count: 13
    rathasok7
    December 23, 2015 at 2:22 am #17106

    am using a shared hosting plan .. and they limit the average cpu usage to 5% only.

    Post count: 13
    rathasok7
    December 23, 2015 at 2:28 am #17107

    hi Jegbagus, if i want to offload the js and css to jrdelivr. which file should i edit? and will this help?

    Post count: 2251
    Jegbagus
    December 24, 2015 at 1:54 am #17124

    hi rathasok7, if you need to offload the style & script, please go to load-script.php (in lib folder).
    there is 2 kind of function (jeg_init_style & jeg_init_script), you will need to change both of it.

    Thank you

You must be logged in to reply to this topic.