Higher than normal CPU usage

Status
Not open for further replies.

MagH2Ospinner

New Member
Messages
7
Reaction score
0
Points
1
Hello,

I recently noticed that the CPU usage on my free hosting account has been spiking all over the place for the past few days. I did all I could last night to turn off any extra themes and plugins on my Wordpress multisite. I installed WP Super Cache to reduce the load on the CPU. I ran WP-Optimize just to clean up the database. I disabled or turned off a number of cron jobs from within the WP admin panel. I don't have any cron jobs set in cPanel. I figured after making all of these changes I'd see a reduction in my CPU usage. Unfortunately, nothing has changed.

I'm just about out of ideas. Can anyone here tell me why my CPU usage is so high, despite all the measures I've taken to conserve resources? Is there a bug I'm overlooking? Or am I just being hit by a lot of bots or something? Any thoughts?

your assistance is much appreciated.
 

MagH2Ospinner

New Member
Messages
7
Reaction score
0
Points
1
Yep, I saw that thread already, thanks for the link though. I'm just making sure mine is the same issue, since it started in the last week or two, and the CPU graph was noticably flatter before that. No to mention that now when I check the "Resource Usage" section of cPanel, I get this message immedately before any other stats show up:

"Your site has been limited within the past 24 hours. CPU resources were limited for your site."

By looking at the 30 day window for CPU usage, you can see a significant increase starting about a week or two ago, pushing my usual average up in the process:

lvechart.cgi.png


And, by looking at the last 24 hours, you can see that my max has been pegged at 100% for most of the time with few fluctuations.

lvechart2.cgi.png


So, maybe I'm not reading the charts correctly (and keep in mind I have an advanced math degree, though it might not be helping much in this case). But I fail to understand why my average can be so low when my max is literally maxed out for what seems like days now.

But, hey, if it's not a threat to my account, and if this is normal business for these servers, then maybe I'm reading too much into it. I'm just trying to prevent any sort of action being taken to disable or limit my site because of some misbehaving script that I've overlooked.

thanks again for any advice, much appreciated.
 

MagH2Ospinner

New Member
Messages
7
Reaction score
0
Points
1
Mystery Solved!

I'm posting this here in case others come across similar behavior. My CPU usage is finally back to normal levels rather than pegged at 100% most of the time (see charts above).

lvechart3.cgi.png

This change corresponded directly with one of my blogs being crawled by Google bots. After the drop in CPU usage seen in this chart, my blog is now ranking high in Google searches, whereas it was nowhere to be seen before hand. The week or so before the alarming CPU spike was probably more active than usual due to the fact that I was building the site and trying out different plugins, etc.

Anyway, thanks for letting me rant, consider the mystery solved, and let this serve as a reminder to new blog builders:

If you submit your site to be crawled by the search engines, expect to see an increase in activity during the following weeks.


Seems completely obvious in hindsight (duh). At least I didn't have some rogue script that had escaped my detection as I had feared.
 

skatecr2

New Member
Prime Account
Messages
22
Reaction score
0
Points
1
Yep, same "stuff" different thread: https://community.x10hosting.com/threads/cpanel-help.194464/

:D Freedom of Speech!

EDIT: I'm still having this problem with my website! Can someone please look into why the CPU usage is high?
I want some answers please and am thinking about upgrading my hosting account to prime or illuminated.



#bump
 

Attachments

  • lvechart.cgi.png
    lvechart.cgi.png
    358 KB · Views: 10
Last edited:

MagH2Ospinner

New Member
Messages
7
Reaction score
0
Points
1
Well, mine (OP) seems to have gone back to somewhat normal levels. If you look at my 30-day CPU graph (attached), you can definitely see where I was pegged at a high usage for a while, it's where there's a spike in the green average and the blue is no longer visible. I'm convinced that's when Google was crawling my site.

In my investigations, I found it really hard to differentiate between internal causes for CPU usage vs. external. I followed many other threads and forums/blogs and shut down all of my plugins except only the most crucial, turned on Wordpress caching, optimized the database, and did a few other minor things, none of which seemed to make much of a difference at the time. Turns out I just had to weather the storm of Google indexing. Another person's case could be entirely different, and as such, YMMV.

Good luck on your quest, I hope you find the cause of your unwanted CPU usage soon.
 

Attachments

  • lvechart.cgi.png
    lvechart.cgi.png
    265.6 KB · Views: 5

skatecr2

New Member
Prime Account
Messages
22
Reaction score
0
Points
1
Thank you for your response, I believe this is helpful information to me. According to our 30-day CPU analytics, the green has become more stable (0% with no recent spike occurrences) which is the CPU core internal usage? What exactly does the blue represent, "transient peak usage" or external CPU usage?

Is it normal to have that many blue "transient peak" spikes as shown in my 30-day CPU graph? Do I need to upgrade, and if I do will it double my CPU usage to 200%?
 

AngusThermopyle

Active Member
Messages
319
Reaction score
52
Points
28
What do you run on your site?
Any plugin that resizes images?
Any chat scripts (run on x10 servers)?
Caching scripts?
 

skatecr2

New Member
Prime Account
Messages
22
Reaction score
0
Points
1
No caching, no image resize other than WP Admin-AJAX, I took my chat-room down weeks ago because I had a green CPU spike :meh:
Plugins I am using: Iframe Widget, Insert PHP, Local Time Clock, New User Approve, SlideShow, Subscribe to Comments, WP Move Comments, Yop Poll Plugin.

I did however activate cloud fare after the CPU spike but it has only served 2 requests (meaning it doesn't do anything).
I tried WP-Caching but the script made my CPU spike 100% so removed it a few weeks ago.
 

MagH2Ospinner

New Member
Messages
7
Reaction score
0
Points
1
If I understand the stats correctly (table of values below the graphs), the blue line is the maximum CPU usage recorded on an hourly interval (possibly less if you select a small enough window) whereas the green is the average as measured over the same hourly interval. That's why you'll see more blue spikes than green. Blue spikes are nothing huge to worry about. Even small green spikes are not a major concern. In my original post, my concern was seeing the blue line pushed up to 100% for long periods of time causing an overall noticeable rise in the green average line.

To be honest, at one point I had played around with some script that allowed a visitor to the site to mine Dogecoin in their browser (there used to be a WP plugin that did the same thing for BTC, and was a total waste of processor useage for the site visitor). That was one of the first scripts I removed when testing for CPU leaks. The script was designed to run browser-side, not server side. However, my fear was that a rogue Dogecoin miner was maxing out the CPU server with no end in sight. My fear was completely unfounded, turns out. The CPU rise I saw had nothing to do with that (thank doge).

I think the benefit of WP caching depends heavily on how much your site gets visited. Sites that get hit many times per day from multiple IP's could probably benefit from WP caching. Sites that don't see as much traffic might see more CPU usage than normal just from having the caching cron job run in the background. I'm not an expert on WP caching though, that's just what I gather from setting it up on my own blog.
 
Status
Not open for further replies.
Top