Announcement

Collapse
No announcement yet.

CPU usage going through the roof

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CPU usage going through the roof

    Hi,

    I am trying my best to reduce the CPU usage and while I was examining the Jan 2013 figures, I noticed that on January 11, my site had 184 visitors but the CPU time was 5298.38 seconds and the execution time was 181,411 seconds at 15.33% CPU usage.

    I know that there are 86,400 seconds in a day (24x60x60) but the figure shown shows 181,411 seconds, about double the number of seconds for the day. Could there be an reporting error?

    I do not know what is going on and there is one particular tech support guy keeps giving me rubbish answers as if he does not know anything about programming. The rest of the tech support guys are really helpful an knowledgeable. (Ticket 1291666)

    What can I do?

  • #2
    What scripts are running on the site?

    Just out of curiosity, is the domain name the site is on close to its expiry date, ie expires in the next 90 days?

    Comment


    • #3
      Thanks for your response.

      The site is a WordPress site upgraded to version 3.5.1. I hit about 1200 visitors per day (Awstats) in early January 2013. Then the visitor count dropped to as low as 184, on Jan 11th, as they said that there was a flood in Chicago and many IP's were blocked hence my visitor count reflected this. The visitor count has recovered to above 700.

      As I was examining the CPU usage I noticed that there cannot be 181,411s in a 24 hour period. So I reported it to tech support but I am very unhappy with his reply as this one particular guy gives me a lot of ****. So I have come to the forum to find more help. I am pretty sure the hosting tracking software is over counting the execution time and cpu usage.

      The last reply I received from that tech support guy was "The problem comes from the count of queries generated by your database. I will strongly advice you to check your site script configuration from your end or with the assistance of a web developer and to make sure that your site bachutha.com is optimized. " which is utter rubbish. How do LiquidNet UK programmers count time? Do the count the queries to the database as seconds?

      I am pretty disgusted with this reply. He does know hwat he is doing and I have other such replies from this particular guy ... I got to the point where I suspected that he does not want to work as tech support and has no interest in computers or servers or hosting services.

      Comment


      • #4
        CPU 'time' is hard to count. Most servers these days have multiple cores and can be running on top of multiple servers (ie a cloud). If both you and a friend worked for 24hrs, how many hours have you both worked? 48!!

        Both CPU time and CPU percentage are becoming obsolete terms! However this does not solve your current problem.

        First I would start by blocking access to the site externally by placing a password on the domain folder. Once a site becomes hammered like this, its just a matter of time before the entire account is suspended by RSP for over using CPU. I believe its an automatic process.

        If the CPU usage is still high after you blocked access to the site this means there is a script stuck in a loop on the site. You need to figure out how to break the loop! Sometimes just moving the files to another folder can stop it, or renaming the file if you can identify it!

        If the usage drops down then you have someone externally who is trying to overload your site. Monitor the logs and identity the IP address or addresses being used. If its just one IP you can block it using the IP blocker in your Control Panel. If its a DDOS attack you need to get the RSP techies to elevate it to the admins.
        Last edited by clivejo; 02-02-2013, 02:43 AM.

        Comment


        • #5
          My previous reply is being moderated ... I guess it was a long message.

          My site is http://bachutha.com and is a WordPress site version 3.5.1. Tech support said there was flood in Chicago so they had to block IP's.

          Comment


          • #6
            Your post will be automatically blocked and sent to the moderator queue if you use questionable language or external links. Please refrain from using both!

            If you wish to mention a URL use a human readable form such as www (dot) mydomain (dot) com, so that its not blocked by the forums spam protection.

            I will have to go offline soon, so I wont be able to accept your post if they are moderated I dont think Nick is online at the moment so getting it accepted could involve a wait!

            Comment


            • #7
              Thanks clivejo.

              No I don't use bad language - don't know how, never trained that way.

              The IP address was blocked, due to Chicago flooding, hence the visitor count dropped to 184 for the day. That means the CPU was idle with nothing to do. So CPU usage should have dropped to 0.05%. My site normally runs around 2% to 5% cpu usage for 1000++ visitors per day ... I think WordPress have done a wonderful job.

              I am pretty sure there is something wrong with the reporting.

              Comment


              • #8
                Have you had a look at the database statistics?

                In your Control Panel, go to the menu and click on Databases > MySQL and click on the "MySQL Stats" tab

                ------------------------------------------------------------

                I dont know what the original word was but the forum blocked it due to this sentence "this one particular guy gives me a lot of ****."

                LOL just dont use it again and you will be fine :P

                Comment


                • #9
                  Thanks clivejo.

                  The word they starred out was "r u b b i s h".

                  I will check the database stats. ....

                  The stats are as follows:-

                  Day ei Total Hourly average
                  1 101282 101282 4220
                  2 138522 138522 5772
                  3 158400 158400 6600
                  4 164886 164886 6870
                  5 134319 134319 5597
                  6 180128 180128 7505
                  7 95196 95196 3967
                  8 95969 95969 3999
                  9 100843 100843 4202
                  10 72566 72566 3024
                  11 71536 71536 2981
                  12 58279 58279 2428
                  13 66409 66409 2767


                  Awstats is :-

                  Day Number of visits Pages Hits Bandwidth
                  01 Jan 2013 986 4,250 6,449 128.71 MB
                  02 Jan 2013 1,159 5,653 9,718 225.51 MB
                  03 Jan 2013 1,219 5,610 10,172 217.01 MB
                  04 Jan 2013 1,183 10,230 14,227 310.26 MB
                  05 Jan 2013 1,155 5,169 8,917 159.74 MB
                  06 Jan 2013 1,053 4,219 10,041 173.22 MB
                  07 Jan 2013 1,042 4,488 8,551 168.28 MB
                  08 Jan 2013 957 4,752 9,467 198.51 MB
                  09 Jan 2013 745 3,876 6,156 128.62 MB
                  10 Jan 2013 547 3,042 6,005 115.78 MB
                  11 Jan 2013 184 915 1,568 40.17 MB
                  12 Jan 2013 529 2,570 4,996 134.82 MB
                  13 Jan 2013 664 3,002 6,072 176.30 MB

                  CPU stats were:-

                  Day CPU Time Execution Time CPU Usage Average memory Processes
                  1 1088.22s 49482.82s 3.15% 4.60 MB 2632
                  2 1207.4s 55136.40s 3.49% 4.60 MB 2990
                  3 1727.5s 62794.42s 5.00% 4.60 MB 3343
                  4 1689.33s 49240.36s 4.89% 4.60 MB 2600
                  5 1397.02s 55110.49s 4.04% 4.60 MB 2886
                  6 1078.79s 38872.95s 3.12% 4.65 MB 2086
                  7 962.91s 33757.54s 2.79% 4.60 MB 1813
                  8 881.08s 27457.56s 2.55% 4.64 MB 1503
                  9 904.24s 26589.53s 2.62% 4.60 MB 1415
                  10 722.97s 20343.72s 2.09% 4.60 MB 1106
                  11 5298.38s 181411.20s 15.33% 4.60 MB 9454
                  12 551.8s 20474.61s 1.60% 4.59 MB 1134
                  13 679.46s 24343.42s 1.97% 4.59 MB 1321

                  Any idea?

                  Thanks,
                  Peter Achutha

                  Comment


                  • #10
                    what kind of plugin you are using for your wordpress.

                    and, please share your google analytics stat here, I don't really trust awstat as it's count on request instead of per visit.

                    Comment


                    • #11
                      I had a similar problem some time ago. I knew I wasn't running any scripts that would cause high cpu usage so for a while I just couldn't figure out what was wrong. After checking my traffic stats I found that I was getting a lot of hits from certain IPs. Once I blocked those IPs my cpu usage went back to normal and I haven't had the problem since.

                      Comment


                      • #12
                        I’ve had similar problems over the years. One was caused by Bing/MSN bot not respecting my robot.txt and hammering one of my sites.



                        The other was because my domain was due to expire and RSP decided to backup the content for me(Isnt that nice of them!). However, the backup script got stuck in a loop and ended up suspending my account!

                        Comment


                        • #13
                          Hi wjleong, clivejo, vlasi47gr,

                          I have not used google analytics yet. Just relying on Awstats for the time being. My plugins for WordPress are

                          1. Bulk Remove Pending Comments - this one is good as I used to get about a few thousand spam posting on my comments. When I manually delete spam comments page by page I get server errors and it would take some time to respond that comments were deleted. With this pulgin it takes a few seconds to delete all unapproved comments. - A huge time saver.

                          2. Configure SMTP - very important as all my email is re-routed to Google Apps. I don't use the default inbox provided by RSP.

                          3. Fast Secure Contact Form - for contact forms

                          4. Google Analytics Dashboard - I may have lost track why I installed it.

                          5. PHP Image Cache - very good for caching all pictures

                          6. SI CAPTCHA Anti-Spam

                          7. W3 Total Cache - pretty good cache once installed properly and no worries with the .htaccess file

                          8. WP Security Scan - need this to reduce potential hacking - been hacked before. I had a multi-domain site and hackers got through and destroy both websites so now all my websites are on separate hosting accounts.

                          9. WP Widget Cache - cache widges, sidebars.

                          10. SEOPressor V5 - for checking my on page SEO


                          In my case the tech support guy told me that there was a flood in Chicago and they had to block a whole range of IP address - the site were offline / down. I suspect this is a error in the reporting software. I have found other errors and have fed back to tech support and those were fixed, just not this one.

                          This particular account would have expired by Feb 24th 2013, but that should not be the case as the site was offline most of the time during the flood period in Chicago.

                          Thanks guys for your response.

                          Comment


                          • #14
                            one more plugin

                            11. 1-click Retweet/Share/Like - for all the like and share buttons. When this plugin is active GTmetrix generates an internal error as more than 1000 items. So when I analyse with GTmetrix I disable this plugin. You can also use Pingdom.com for analysis.

                            Thanks
                            Peter

                            Comment


                            • #15
                              1. Bulk Remove Pending Comments

                              By setting up Akismet can simply help you filter the spam comments.

                              4. Google Analytics Dashboard - I may have lost track why I installed it.

                              Not necessary to have it, just remove it and read it in Google Analytics.

                              3. Fast Secure Contact Form - for contact forms

                              5. PHP Image Cache - very good for caching all pictures

                              11. 1-click Retweet/Share/Like

                              3,5,11 can be done by only 1 plugin - Jetpack by Wordpress.com

                              7. W3 Total Cache

                              9. WP Widget Cache

                              7,9 - try to deactivate it and observe your cpu usage for few days. When your wordpress site traffic hits isn't that huge, and you have cache, it will actually increase your load, but did not help you to save the load at all.

                              Comment

                              Working...
                              X