TinyPortal

Development => Support => Topic started by: Teelow on April 27, 2006, 10:25:29 PM

Title: Excessive CPU usage - need suggestions!
Post by: Teelow on April 27, 2006, 10:25:29 PM
Recently my HOST provider removed my website from its production server and on to a temp server and gave me 7 days to fix it or have the account suspended.  Below are the stats they outline.  I have pretty much removed every single php block from the front page.  Only thing there is a few java boxes and an html box and of course my forums.  Do you have ANY other suggestions on what I can twink to reduce it further?  They want cpu, mem and Mysql processes to average 1% and my Top processes no larger then 20%.  I really don't want to have to remove TP and go back to the old style HTML look.  At this point I face removing TP or goto a dedicated server that runs $1200 a year which is not gonna happen.
-------------------------------
Average %CPU: 4.07
Average %MEM: 2.67
Mysql Processes: 3.4

Top Process %CPU 35.0 /usr/bin/php
Top Process %CPU 30.0 /usr/bin/php
Top Process %CPU 29.0 /usr/bin/php


Title: Re: Excessive CPU usage - need suggestions!
Post by: G6Cad on April 27, 2006, 10:35:59 PM
I say change host  ???

Read back on this site.
www.b-one.net
It's a scandinavian host, but they host from all sides of the world, Very good, stable, very good support, friendly, Dont cost more than 450sek = 57$/year with the domain name included, for 1gb storage free transfer latest sql phpmyadmin and every thing you need.
I have two sites there. one for about 2 years and never had any troubble with them what so ever.
Maby worth a read back on their site. ?
Title: Re: Excessive CPU usage - need suggestions!
Post by: Blunt on April 27, 2006, 10:36:29 PM
Do you have the persistent link to MySql checked in SMF Server Settings?  (admin panel)

It says that it's not recommended unless you're on a dedicated server - on a shared serveer it will make you unpopular with your host.  Sounds like you ;)

I hope you get it sorted out.  Good luck :)
Title: Re: Excessive CPU usage - need suggestions!
Post by: cubby61 on June 22, 2007, 06:28:40 PM
I am having the exact same issue.  My CPU usage has increased the same way and my webhost (Lunarpages) is screaming about it.  I don't want to do without TP. I checked and I don't have the "Persistent link to MySql" checked in SMF Server Settings.

Is there anything else that can cause this.  Does TP really have THAT much overhead? 
Title: Re: Excessive CPU usage - need suggestions!
Post by: IchBin on June 22, 2007, 09:04:53 PM
How big is your site? What do you have on it? Custom blocks with multiple queries can cause this. Along with having a busy site with the shoutbox going crazy etc. What ever info you can provide on your site would help. Thanks.
Title: Re: Excessive CPU usage - need suggestions!
Post by: cubby61 on June 22, 2007, 09:30:27 PM
Its a small site with not a lot of add-ons.  No SHoutbox.  Here is the link:

http://everythingsg.com/forum

The only queries would be the User and Forum Stats,  I do have a Contributors page that users hit when they first log in. 

Any help or suggestions are appreciated.
Title: Re: Excessive CPU usage - need suggestions!
Post by: Nokonium on June 22, 2007, 09:39:08 PM
Check your ####_sessions table, that can grow like topsy due to spiders. We now regularly empty this table, it speeds up the forum and reduces the size of the d/b backup.
Title: Re: Excessive CPU usage - need suggestions!
Post by: IchBin on June 22, 2007, 10:08:13 PM
I would ask if they can give specifically what is causing the CPU spike.
Title: Re: Excessive CPU usage - need suggestions!
Post by: cubby61 on June 22, 2007, 10:39:57 PM
I asked them that very questions and I was told:

Please note that, due to the way the PHP scripts are executed, we are unable to tell you exactly what processes are causing this.
Title: Re: Excessive CPU usage - need suggestions!
Post by: pvcblue on June 22, 2007, 10:43:30 PM
Quote from: cubby61 on June 22, 2007, 10:39:57 PM
I asked them that very questions and I was told:

Please note that, due to the way the PHP scripts are executed, we are unable to tell you exactly what processes are causing this.

What company do you use? I had this kind of problem once with another php goof up and my company was able to pinpoint it for me.

Title: Re: Excessive CPU usage - need suggestions!
Post by: cubby61 on June 22, 2007, 10:56:20 PM
Lunarpages
Title: Re: Excessive CPU usage - need suggestions!
Post by: bloc on June 23, 2007, 12:08:28 AM
Before your remove everything..try this:

Remove the TP portion, meaning upload a fresh upgrade of SMF and overwrite the modded files. Then you only have SMF running - and TP data will still be intact if you want to use it again.

If the CPU use then decreases, then at least you know its TP..but you can still use SMF. If its NOT decreasing, change hosts. If CPU spikes when only SMF is running, something is up with the host.
Title: Re: Excessive CPU usage - need suggestions!
Post by: cubby61 on July 27, 2007, 08:37:38 PM
I tried this.  I did a fresh install of SMF and overwrote everything.  According to Lunarpages, the CPU usage stayed the same (too high) and they can not tell me which module is causing the problem.  They just tell me it is up to me to resolve the issue.

My next question is, who is a good reputable webhost that will allow SMF/TP and a basic website?
Title: Re: Excessive CPU usage - need suggestions!
Post by: superQ on July 27, 2007, 09:42:15 PM
What's the matter with the one G6 mentioned

www.b-one.net

I would at least check them out if I was dissatisfied with my host
Title: Re: Excessive CPU usage - need suggestions!
Post by: slvreagl on September 30, 2008, 05:16:47 PM
Quote from: nokonium on June 22, 2007, 09:39:08 PM
Check your ####_sessions table, that can grow like topsy due to spiders. We now regularly empty this table, it speeds up the forum and reduces the size of the d/b backup.

I logged into PHP Admin and emptied my smf_sessions table it was 132mb after doing a backup. Now my forum runs very fast, Thanks for the post.  Now if I could just use the shoutbox AND not go over my sql quires limit I would be in heaven.
Title: Re: Excessive CPU usage - need suggestions!
Post by: IchBin on September 30, 2008, 07:30:10 PM
Sounds like you need a bigger plan or a different host if you're running into that problem.