[drupal-support] how does the throttle module works?

Jeremy Andrews lists at kerneltrap.org
Tue Apr 12 02:25:42 UTC 2005


> What I'd like to know is about the concrete difference between the
> different  throttle levels. From what I read it seems that the
> throttle disables the  blocks and module that I checked when it
> reaches the maximum throttle level  (5). So what's the difference
> between the previous levels? The module does  something else to
> optimize the site beside disabling those modules and  blocks? And
> it disables all the modules all at once at level 5 or there's a 
> progession regulated in some way?

In 4.6, the throttle has been simplified.  It only has two values: 
on and off.  

In 4.5 and earlier, the different throttle levels were not really
utilized.  Level 5 is when blocks and modules would be
auto-disabled.

> My guess is that the throttle also enables and controls the use of
> chached  pages even in the case the site is set to not use the
> cache, is this true?  And if I've set the site to always use the
> cache by default the throttle is  basically useless (aside when it
> reaches the level 5)?

No, the throttle does not affect the cache in any way.

> It does something else behind the scenes like slowing down the php
> and mySQL  requests?

No, it does not.

> I ask because my hosting company disabled my account for more than
> a day  because Drupal made the whole server crash due to an high
> load. I cannot  understand if it was because of an unrelated
> problem or because my site was  linked on an extremely popular
> board (which was), bringing an insane amount  of guests all at
> once. So I don't know if the crash was simply due to the  load, or
> if the load produced an overflow in the php that made a process go
> crazy and use up all the resources till the crash.

A link from a popular site can certainly cause a cpu spike. 
Enabling the cache can help quite a bit, though every time a user
leaves a comment the cache is flushed so if you have active
discussions the benefit of the cache can be minimal.

If a server crashed due to/in response to CPU load, it sounds like
they've got some configuration issues that they need to address.

What modules do you have enabled?  Different modules require
different resources.  If you're using contributed modules, this is
an unknown, the module may or may not be resource intensive.  I
believe from core, the forum module is probably the most CPU
intensive (but I'm basing this on a discussion I seem to remember
from a couple of years ago, so I could be totally wrong...)

Any modules you don't actually use should be disabled.  Any modules
you don't absolutely need should be set to auto-throttle so they can
be disabled when the site becomes busy. 

Here are some tips that might help you to tune a pre-4.6 throttle
module:
http://drupal.org/node/4342

-Jeremy



More information about the drupal-support mailing list