New InterServer account

Jin Jie

Member
Just editing comments and cropping a few images. CPU 99% !!!
 

Attachments

  • Interserver CPU usage_03.JPG
    Interserver CPU usage_03.JPG
    233.4 KB · Views: 35

Jin Jie

Member
I have a ticket with several replies. When I am not editing anything, obviously the CPU is 0%
They told me that can't find the problem!
Any ideas from anyone?
 

Attachments

  • Interserver CPU usage_02.JPG
    Interserver CPU usage_02.JPG
    241.6 KB · Views: 15

Mar

Moderator
I have a ticket with several replies. When I am not editing anything, obviously the CPU is 0%
They told me that can't find the problem!
Any ideas from anyone?
What kind of subscription, Shared Hosting or VPS? Do you have cPanel?
 

Mar

Moderator
It look like you have cPanel. Please click Select PHP Version and see if opcache and apcu are activated. Also, you need to select PHP7.2. Opcache has an issue with PHP7.3, it will crash the site.


1562077634827.png


1562077472239.png
 

Jin Jie

Member
Hi Mar, thanks for your reply. I am on Shared Hosting.
When I set everything up at the beginning, I referred to the PHP version and PHP Extensions as above that you posted a while ago, so that was not the problem.

InterServer couldn't figure out what was causing the ridiculously high CPU usage.
Basically, I concluded that it was my site settings that caused the problem, so I did some research to try and resolve it.
My site page load time is now GtMetrix is 1.6 seconds, and I have not optimized any images yet!

The amazing things about InterServer:
1. TTFB 178ms (cloned site on SiteGround TTFB 1.5 seconds!)
2. After I had fixed everything, InterServer kindly doubled my CPU power and IO

Here are the changes I made to improve performance and reduce the CPU load:
1. Heartbeat API:
I have a few tabs open for convenience when editing. The Heartbeat API by default polls the admin-ajax.php file every 15 seconds to do an auto-save. If I were to leave one tab open and leave my computer, that one post alone might generate 5,760 requests in a day!

2. admin-ajax.php Related to Heartbeat API on the backend:
Disabled Heartbeat API
Heartbeat API uses admin-ajax.php to run AJAX calls from the web-browser, and it can cause high CPU usage. Shared hosts don’t have much room when it comes to CPU usage.

3. Woocommerce thumbnail regeneration:
Continually running in background - Disabled in functions.php
add_filter( 'woocommerce_background_image_regeneration', '__return_false' );

4. Disable WP Cron Jobs:
wp-config.php (define('DISABLE_WP_CRON', true); )
Set up real cron jobs in CPanel: I have set mine to 90 minutes

5. Disabled Caching for:
Cart, Checkout, etc

InterServer GTmetrix report.JPG
 

Mar

Moderator
Hi Mar, thanks for your reply. I am on Shared Hosting.
When I set everything up at the beginning, I referred to the PHP version and PHP Extensions as above that you posted a while ago, so that was not the problem.

InterServer couldn't figure out what was causing the ridiculously high CPU usage.
Basically, I concluded that it was my site settings that caused the problem, so I did some research to try and resolve it.
My site page load time is now GtMetrix is 1.6 seconds, and I have not optimized any images yet!

The amazing things about InterServer:
1. TTFB 178ms (cloned site on SiteGround TTFB 1.5 seconds!)
2. After I had fixed everything, InterServer kindly doubled my CPU power and IO

Here are the changes I made to improve performance and reduce the CPU load:
1. Heartbeat API:
I have a few tabs open for convenience when editing. The Heartbeat API by default polls the admin-ajax.php file every 15 seconds to do an auto-save. If I were to leave one tab open and leave my computer, that one post alone might generate 5,760 requests in a day!

2. admin-ajax.php Related to Heartbeat API on the backend:
Disabled Heartbeat API
Heartbeat API uses admin-ajax.php to run AJAX calls from the web-browser, and it can cause high CPU usage. Shared hosts don’t have much room when it comes to CPU usage.

3. Woocommerce thumbnail regeneration:
Continually running in background - Disabled in functions.php
add_filter( 'woocommerce_background_image_regeneration', '__return_false' );

4. Disable WP Cron Jobs:
wp-config.php (define('DISABLE_WP_CRON', true); )
Set up real cron jobs in CPanel: I have set mine to 90 minutes

5. Disabled Caching for:
Cart, Checkout, etc

View attachment 9533
As you know, I recommend InterServer and happy to know you have resolved the CPU problem and the load speed is impressive. I might implement some of your actions in my site.
 

Yaros

Moderator
Staff member
Hi Mar, thanks for your reply. I am on Shared Hosting.
When I set everything up at the beginning, I referred to the PHP version and PHP Extensions as above that you posted a while ago, so that was not the problem.

InterServer couldn't figure out what was causing the ridiculously high CPU usage.
Basically, I concluded that it was my site settings that caused the problem, so I did some research to try and resolve it.
My site page load time is now GtMetrix is 1.6 seconds, and I have not optimized any images yet!

The amazing things about InterServer:
1. TTFB 178ms (cloned site on SiteGround TTFB 1.5 seconds!)
2. After I had fixed everything, InterServer kindly doubled my CPU power and IO

Here are the changes I made to improve performance and reduce the CPU load:
1. Heartbeat API:
I have a few tabs open for convenience when editing. The Heartbeat API by default polls the admin-ajax.php file every 15 seconds to do an auto-save. If I were to leave one tab open and leave my computer, that one post alone might generate 5,760 requests in a day!

2. admin-ajax.php Related to Heartbeat API on the backend:
Disabled Heartbeat API
Heartbeat API uses admin-ajax.php to run AJAX calls from the web-browser, and it can cause high CPU usage. Shared hosts don’t have much room when it comes to CPU usage.

3. Woocommerce thumbnail regeneration:
Continually running in background - Disabled in functions.php
add_filter( 'woocommerce_background_image_regeneration', '__return_false' );

4. Disable WP Cron Jobs:
wp-config.php (define('DISABLE_WP_CRON', true); )
Set up real cron jobs in CPanel: I have set mine to 90 minutes

5. Disabled Caching for:
Cart, Checkout, etc

View attachment 9533
Very good recommendations except Cron, since it is required for plugins updates, images download and currency converter. For Heartbeat there is a good WP plugin - Heartbeat Control that can disable it.
 

Jin Jie

Member
Very good recommendations except Cron, since it is required for plugins updates, images download and currency converter. For Heartbeat there is a good WP plugin - Heartbeat Control that can disable it.

Yes we still need wp-cron (eg. checking for theme/plugin updates), just not on every page load!
That's why I replaced it with a real cron job:)

Or you can put this in functions.php ...

add_action( 'init', 'stop_heartbeat', 1 );
function stop_heartbeat() {
wp_deregister_script('heartbeat');
}
Yes, no need for another plugin.
 

Jin Jie

Member
Slightly OT but Woocommerce status showed SoapClient: disabled and Multibyte string: disabled
I already had them enabled, so opened a ticket.

First reply: "
Please be informed that the soap and mbstring are already enabled in the PHP. Kindly check the same from cPanel >> Software (tab) >> Select PHP version."

Second reply: "Extensions have been enabled on server now"

Third reply, different staff member: "Thank you for writing in. We have now enabled the PHP extensions now."


I checked and was surprised to see a new a completely new PHP Extensions panel, and of course, they were enabled as they had been before....strange!

Interserver PHP extensions new panel_04-07-2018.JPG
 

Mar

Moderator
Slightly OT but Woocommerce status showed SoapClient: disabled and Multibyte string: disabled
I already had them enabled, so opened a ticket.

First reply: "
Please be informed that the soap and mbstring are already enabled in the PHP. Kindly check the same from cPanel >> Software (tab) >> Select PHP version."

Second reply: "Extensions have been enabled on server now"

Third reply, different staff member: "Thank you for writing in. We have now enabled the PHP extensions now."


I checked and was surprised to see a new a completely new PHP Extensions panel, and of course, they were enabled as they had been before....strange!

View attachment 9543
Surprising, saw it only now. There should be more changes in cPanel now. Don't be surprised in updates of tickets. A number of support staff will send different updates of the same tickets. I always tell them, before you send updates, see the previous updates sent by your colleagues so you'll understand what was done and what was not done to avoid confusion. Also, the livechat support, I reported them to the management. They close the chat window in the middle of discussion.
 

psimhq

New Member
5. Disabled Caching for:
Cart, Checkout, etc
Hi @Jin Jie do you mind elaborating on what you mean?
How did you disable caching for Cart, Checkout, etc...?

I suspect I have a problem with that on my newly created Alidropship store.

My webhost is not InterServer, but I am considering to move my Alidropship store there, based on the glowing remarks seen on this forum so far...
 

psimhq

New Member
What is the cache plugin you are using?
If you're asking me, I am currently not using any cache plugin...

Per my reply to @Direct Webstore Webstore, my Custom Store built by Alidropship is not using the Ali Woo plugin.

As such, should I still try to install a cache plugin to see if the problem with my Checkout Cart can be solved? https://forum.alidropship.com/threads/best-hosting-plan.13743/page-5#post-73067
If yes, do you have any to recommend for non-Woo stores?
 
Last edited:

Mar

Moderator
Thanks for this @Direct Webstore!

But, I am not using Ali Woo plugin, would this article still be applicable to my Alidropship store? (sorry, n00b here )
Thanks for this @Direct Webstore!

But, I am not using Ali Woo plugin, would this article still be applicable to my Alidropship store? (sorry, n00b here )
The link is for woocommerce store, but the cache plugin WP Rocket mentioned in the article work even with non-woocommerce store.
 

Direct Webstore

Well-Known Member
I am not using Ali Woo plugin
Sorry. I presumed you were because Jin Jie is using Woo and you asked him how he disabled the Caching for: Cart, Checkout, etc (For Woo, I presumed)


I am currently not using any cache plugin...
Then you can't do this ...
5. Disabled Caching for:
Cart, Checkout, etc


should I still try to install a cache plugin to see if the problem with my Checkout Cart can be solved?
That would be a waste of time. If you have no Cache plugin, it's obviously not causing any problems. BUT, you should have a Caching plugin anyway. It's one of the "Essentials". (In my opinion, anyway)


do you have any to recommend for non-Woo stores? (Caching Plugins)
Original or Woo doesn't make any difference in choosing a cache plugin. I use Rocket. Mar uses W3 Total Cache (I think). Everyone will tell you one different. You can just try a few, do page speed tests and pick the one that results in the fastest page loads. That's what I and many others have done.


see if the problem with my Checkout Cart can be solved?
I suspect I have a problem with that on my newly created Alidropship store.
You still haven't mentioned what the actual "problem" is. I suggest you start a new thread for this mystery problem and state what it actually is.


(sorry, n00b here )
In that case, skip the new thread (if you wish) and write to support@alidropship.com and outline the problem to them.
 
Top