Lunarpages Web Hosting Forum

Author Topic: Tips to Reduce RESOURCES Consume please  (Read 21494 times)

Offline AL3X1S

  • Black-Belt
  • Intergalactic Cowboy
  • *****
  • Posts: 57
  • K-1Fans.com
    • http://k-1fans.com
Tips to Reduce RESOURCES Consume please
« on: January 18, 2006, 08:45:49 AM »
Hi friends
since some days ago I receive alerts from admins here,
about my site consuming too much resources.

I have a website and forum, wich is one of the most known now in the world of martial arts: k-1fans.com

I am doing all in my hands to solve that problem, because itīs a great community and we donīt imagine the site closed. Maybe soon we put publicity, donations, etc, to buy a bigger plan, but now we canīt and we will do all necessary to stay in the host, without problems, all fine like past year.

I was not using to much space or bandwith, less than 10% of the offer.  :?

I already moved today all the files of the website to other host, and now are only linked from the web.
So now I am only using 15 mb space for the files of the forum (phpbb latest version). And I will reduce the database all that I can.
I hope that with this it can be solved. :roll:

anyway I WOULD LIKE IF YOU KNOW MORE TIPS TO SOLVE THAT PROBLEM OF RESOURCES,
or if you were in the same situation some time, you have a big forum, etc.. how you solved it.

THANX 
« Last Edit: January 18, 2006, 08:57:46 AM by AL3X1S »

Offline stapel

  • Galactic Royalty
  • *****
  • Posts: 491
Re: Tips for Reducing Resource Consumption...?
« Reply #1 on: January 18, 2006, 09:08:58 AM »
"Resources" is not the same as "bandwidth" or "hard-drive space".

  • "Bandwidth" refers to how much "traffic" has come into or gone out of the server. So visitors coming in and your site sending out pageviews would fall under "bandwidth".
  • "Hard-drive space", or "footprint", refers to how much space your files take up on the server.
  • "Resources" refers to the processing power of the server's CPU. Some activities, such as serving up a graphic, don't take up much processing power. Other activities, such as running a "memory hog" of a script, can take up a lot of processing power.

Think of an old underpowered computer. You might have almost no files or programs on the hard drive (so you have a small footprint), and you may hardly ever turn the thing on (so you use very little bandwidth). But there's this one program you always use that is such a memory hog that it eats up all the computer's free memory and CPU power. When that program is in use, anything else you're running at the same time grinds to a halt; the entire computer may even crash.

This is similar to what happens when one site on a shared server uses too much of the server's "resources". Perhaps it's a script that is too resource-hungry (or, in my case, a script that too many people were using at once). Whatever the cause, one site is using more than its "fair share" of the CPU, and other sites are (or soon will be) suffering for it.

As far as I know, there is no way for users to check their utilization of the system's resources.

Eliz.

Offline AL3X1S

  • Black-Belt
  • Intergalactic Cowboy
  • *****
  • Posts: 57
  • K-1Fans.com
    • http://k-1fans.com
Re: Tips to Reduce RESOURCES Consume please
« Reply #2 on: January 18, 2006, 09:19:56 AM »
thanx stapel
did you have a similar problem?

now I donīt have rare scripts
I deleted the shoutbox, vote function, latest_posts mod.. etc

now I left only the phpbb forum there.
I hope that the site can run well with a forum with 70-100 users online..

if still there is something bad in it, I hope they could say me what is causing trouble.

Offline stapel

  • Galactic Royalty
  • *****
  • Posts: 491
Re: Tips to Reduce RESOURCES Consume please
« Reply #3 on: January 18, 2006, 10:03:43 AM »
Quote from: AL3X1S
stapel did you have a similar problem?

Yes. In my case, a "search" script was being used by too many people. When the script was being run during the summer, there was no problem, so I don't know that the script itself was the problem. But when the new academic year started and my volume of visitors spiked, the script was using as much as twenty-percent of server resources. Lunarpages sets the ceiling at ten percent, I believe.

If the only script you have running is the forum (which I don't use), then you might want to try changing to a different forum script. It might also be wise to submit a ticket to Support, to confirm that the forum script is indeed the problem.

Eliz.

Offline stapel

  • Galactic Royalty
  • *****
  • Posts: 491
Update
« Reply #4 on: January 18, 2006, 04:20:47 PM »
I just received an e-mail notification from Support that I am somehow over-utilizing my current server's resources. According to the notice they sent, small pages (thirty-some kilobytes of straight text) and miniscule graphics (seven kilobytes) are causing the problem.

FYI: The limits on CPU usage are listed as being "...1.0% average %CPU or less, 1.0% average %Memory or less and Top Processes below 20%."

I have no "processes" other than a feedback form that gets used once or twice a day. I appear to be over on CPU usage and memory. I'm not sure how, since my traffic hasn't changed, and I've used only six percent of the allowable bandwidth for the day.

My maximum bandwidth rate, according to cPanel, appears to be about 300 kilobits (that's "-bits", not "-bytes") per second. I have no idea how "normal" that might be, nor how that translates into CPU usage or memory drains. If/when I receive clarification, I'll try to remember to follow up here.

Eliz.

Lupine1647

  • Guest
Re: Tips to Reduce RESOURCES Consume please
« Reply #5 on: January 18, 2006, 04:32:36 PM »
Staple, remember what you said, bandwidth!=CPU Usage

What is in the code of the specific page? Was it getting hit a lot recently(if a spambot or something is trying to attack the forum, it could have pushed the CPU limit a tad up). Make sure all your scripts are up to date?

Offline AL3X1S

  • Black-Belt
  • Intergalactic Cowboy
  • *****
  • Posts: 57
  • K-1Fans.com
    • http://k-1fans.com
Re: Tips to Reduce RESOURCES Consume please
« Reply #6 on: January 18, 2006, 04:41:53 PM »
Hi Lupine
about spam bots:

when I enter in my forum admin zone, I see a big list of guests, today more than 40 with the same IP

I made a "whois" and saw it was google bot and msnbot

I banned those IP,s in the forum
but dont know if it is solved with that.  :?

Lupine1647

  • Guest
Re: Tips to Reduce RESOURCES Consume please
« Reply #7 on: January 18, 2006, 04:48:29 PM »
Well Google and MSN aren't spambots. If you don't want them indexing your forum, I suggest making a robots.txt file. If those bots are crawling your site a bit too often (like they make a request every few seconds), then you may want to contact them to get the crawl rate lowered.

Offline AL3X1S

  • Black-Belt
  • Intergalactic Cowboy
  • *****
  • Posts: 57
  • K-1Fans.com
    • http://k-1fans.com
Re: Tips to Reduce RESOURCES Consume please
« Reply #8 on: January 18, 2006, 05:37:23 PM »
yes, I will do it since I see sometimes more false guests in admin zone
from bots than from real members.

what do I have to write to cancel all bots?
with this is enough?
thanx

robots.txt
Code: [Select]
User-Agent: *
Disallow: *

Lupine1647

  • Guest
Re: Tips to Reduce RESOURCES Consume please
« Reply #9 on: January 18, 2006, 06:14:32 PM »
User-Agent: *
Disallow: /

That will block everything on your site, if you're just wanting to block the board from search results and crawls and your board is in the directory board then you would put:

User-Agent: *
Disallow: /board/

Offline AL3X1S

  • Black-Belt
  • Intergalactic Cowboy
  • *****
  • Posts: 57
  • K-1Fans.com
    • http://k-1fans.com
Re: Tips to Reduce RESOURCES Consume please
« Reply #10 on: January 18, 2006, 06:39:21 PM »
thnx Lupine.


btw,
does someone have a forum in a lunarpages shared host with (40 - 80) or more, users online average ??

Is a forum like that able to stay in these hosts?

In the case it is not, they should advert it.  :(


Lupine1647

  • Guest
Re: Tips to Reduce RESOURCES Consume please
« Reply #11 on: January 18, 2006, 06:44:54 PM »
You can have that many users online at once, just keep your scripts up to date because like I said in a previous post, bots can try to hack the board if a known exploit is out there for that board(this can cause an increase in CPU because the hack has to be proccessed by the server), etc.

Offline stapel

  • Galactic Royalty
  • *****
  • Posts: 491
Re: Tips to Reduce RESOURCES Consume please
« Reply #12 on: January 18, 2006, 07:32:32 PM »
Quote from: Lupine1647
Staple, remember what you said, bandwidth!=CPU Usage
True. But if there are no "processes" happening (no scripts running), then what else could the CPU be doing, other than serving up files? (I'm not trying to be smart-aleck; I don't know, so I'm asking.)

Quote from: Lupine1647
What is in the code of the specific page?
Text with simple graphics, or the graphics themselves. The report for today said:

Quote from: Support
1-18
purplemath.com 5.10 7.07 0.0
Top Process %CPU 8.5 httpd [www.purplemath.com] [/modules/fraction/percnt26.gif]
Top Process %CPU 6.5 httpd [www.purplemath.com] [/modules/rational/mult14.gif]
Top Process %CPU 6.0 httpd [www.purplemath.com] [/modules/factquad.htm]
So the top offenders, respectively, are  an 875 byte picture of long division, a 621 byte picture of a rational expression, and a 39 KB lesson on quadratics.

Quote from: Lupine1647
Was it getting hit a lot recently(if a spambot or something is trying to attack the forum, it could have pushed the CPU limit a tad up).
But wouldn't "hits" show up as "bandwidth"? I've had no unusual bandwidth usage lately, and I've got a script that bans most misbehaving bots anyway (of which only two or three have visited in the past few days). And I don't have anything like a forum.

Quote from: Lupine1647
Make sure all your scripts are up to date?
Even if the one script I have weren't up to date, how would users sending me two or three e-mails a day (in other words, a decline in mail) push me from "just fine" to "too big for anything but a dedicated server, if that"?

That's where I'm a bit confused. I have no forum or other high-usage script. All the CPU is doing is serving up static text and tiny graphics. Nothing has changed over the last months, but somehow I've gone from "small" to "maybe to huge for us to handle". :?

Anyway, I'm still waiting to hear back from Support. If nobody can figure out how having traffic markedly lower than three months ago, and having nothing else running, is causing my site to bog everything down, it's going to be difficult to know how to solve the problem. If I learn anything useful, I'll post it here.

Thank you.

Eliz.

Offline AL3X1S

  • Black-Belt
  • Intergalactic Cowboy
  • *****
  • Posts: 57
  • K-1Fans.com
    • http://k-1fans.com
Re: Tips to Reduce RESOURCES Consume please
« Reply #13 on: January 18, 2006, 08:10:33 PM »
You can have that many users online at once, just keep your scripts up to date because like I said in a previous post, bots can try to hack the board if a known exploit is out there for that board(this can cause an increase in CPU because the hack has to be proccessed by the server), etc.

my forum is updated to the latest version since the same day the upgrades from phpbb.com appears.


staple, I hope you can solve your situation too

I hope this is not due to a kind of servers "overbooking" due to host now more than 600 websites a server and offer 400gb transfer instead of the 40 some months ago..  :-?

my 2 webs and the forum were before in the same host working well,
now in this host I only have the forum.. itīs rare.


This is your usage stats as of 4:21pm PST:
k-1fans.com 10.96 6.24 1.3
Top Process %CPU 60.0 [php ]
Top Process %CPU 57.0 /usr/bin/php
Top Process %CPU 55.0 [php ]
« Last Edit: January 18, 2006, 08:14:52 PM by AL3X1S »

Lupine1647

  • Guest
Re: Tips to Reduce RESOURCES Consume please
« Reply #14 on: January 18, 2006, 09:07:46 PM »
600 sites does not have a direct relation to accounts FYI and I'll say again, bandwidth has nothing to do with CPU load. The other accounts on the server have no interaction with the process load for your account.

AL3X1S, try disableing the forum and ask LP support to monitor the CPU figures to see if they went down.

Staple, Ask support about why a gif file can cause a load like that, might be some off-ball issue.