PDA

View Full Version : CPU Throttling


rhyno
04-03-2006, 09:44 AM
Hello everyone.

I am a new member here at Bluehost. Yesterday, I received my first CPU usage ban after installing and playing with G2 on a new domain. According to the log, it looks like its mainly the fullscreen slideshow applet Module of G2(I have since disabled this feature) that was the issue, but there were quite a few queries that spiked the CPU as well.

I understand the reasoning behind limiting the CPU, but I was wondering if another method were possible to ensure the security and reliability of all the customers on box.

Rather than an outright ban, is it possible to throttle the CPU usage of the offending script? In other words, the script would automatically be set to a lower priority process and receive less CPU time therefore making the script take longer to process, but protecting the other customers as well. The owner of the script may receive complaints etc. but there could still be a log entry of the offending script for them to check on.

I'm not sure if this is technically feasible, or what may be needed serverside to make it feasible, but I thought I'd ask. It seems like it would be better than an outright ban (even for 15-30 seconds) for all website visitors to see.

PS. I do appreciate all the explanations of indexing tables in the database. Very informative and something I will be looking into if need be.

scottcrew
04-05-2006, 05:52 AM
Here's a thread that might help explain some things:
http://www.bluehostforum.com/showthread.php?t=144

HTH!

rhyno
04-05-2006, 08:42 AM
Yup, that thread is actually what gave me the idea to ask this question. I am fully aware of the need for a cpu limitation per customer in a shared environment. It makes complete sense.

Perhaps I was no clear enough. This question is mainly directed at the Bluehost guys themselves, but perhaps there are some very knowledgeable users out there as well.

What I was asking is whether it is technically possible to limit the amount of CPU a process is allowed to consume? So if a resource intensive process were to start eating up CPU time, something could come along and lower the process's priority therefore allowing other processes equal CPU time but without the ugly ban message which shows to everyone who visits your website. (wow, that was a run-on sentence!)