summaryrefslogtreecommitdiff
path: root/modules/throttle
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-10-25 06:31:17 +0000
committerDries Buytaert <dries@buytaert.net>2003-10-25 06:31:17 +0000
commit98a17718f7adfd678ab06d76964f8c548ddd8534 (patch)
treee6d89b92fc5e95e73b82799e693ba6178c0192e2 /modules/throttle
parenta7e20bcd939de9e1886c8cdd57a471ca13f72b16 (diff)
downloadbrdo-98a17718f7adfd678ab06d76964f8c548ddd8534.tar.gz
brdo-98a17718f7adfd678ab06d76964f8c548ddd8534.tar.bz2
- Fixed typos in the throttle module documentation. Patch by marky.
Diffstat (limited to 'modules/throttle')
-rw-r--r--modules/throttle/throttle.module12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/throttle/throttle.module b/modules/throttle/throttle.module
index cecec29d3..e2469b755 100644
--- a/modules/throttle/throttle.module
+++ b/modules/throttle/throttle.module
@@ -20,15 +20,15 @@ function throttle_help($section = "admin/help#throttle") {
case "admin/help#throttle":
$output .= "<h3>Introduction</h3><p>This Drupal module allows you to enable and configure the auto-throttle congestion control mechanism offered by the %statistics-module. The auto-throttle mechanism allows your site to automatically adapt to different server levels.</p>";
$output .= "<p>This module also adds a block that displays the current status of the throttle. You must have \"%throttle-block\" privileges to view the block. As a general rule of thumb, only site administrators should be granted access to this block.</p>";
- $output .= "<p>The auto-throttle mechanism performs an extra database query in order to determine what the current throttle level should be. Fortunately the throttle can be tuned so these database queries only occur on a fraction of all pages geenrated by your site, reducing the overhead to an insignificant amount. Additionally, when the top-most throttle level is reached, all throttle queries are suspended for a configurable period of time. More detail follows.</p>";
+ $output .= "<p>The auto-throttle mechanism performs an extra database query in order to determine what the current throttle level should be. Fortunately the throttle can be tuned so these database queries only occur on a fraction of all pages generated by your site, reducing the overhead to an insignificant amount. Additionally, when the top-most throttle level is reached, all throttle queries are suspended for a configurable period of time. More detail follows.</p>";
$output .= "<p>As with any module, the throttle module needs to be %modules-enable before you can use it. Also refer to the permissions section below if you wish to access the throttle statistics block.</p>";
$output .= "<h3>Configuring the throttle module</h3><p>The %throttle-config for the throttle allows you to turn it on and off, as well as to fine-tune how sensitive it is.</p>";
- $output .= "<h4>enable auto-throttle:</h4><blockquote>This first option on the throttle module configuration screen allows you to enable or disable the auto-throttling mechanism. Note that the access-log must also be enabled via the %statistics-config for the auto-throttling mechanism to have any affect.</blockquote>";
+ $output .= "<h4>enable auto-throttle:</h4><blockquote>This first option on the throttle module configuration screen allows you to enable or disable the auto-throttling mechanism. Note that the access-log must also be enabled via the %statistics-config for the auto-throttling mechanism to have any effect.</blockquote>";
$output .= "<h4>auto-throttle multiplier:</h4><blockquote><p>This second option allows you to tune the auto-throttle mechanism. The auto-throttle mechanism supports six throttle levels, from 0 (off) to 5 (maximum). The current throttle level is based upon how many pages have been accessed on your site in the past 60 seconds - the more pages being displayed, the higher the throttle level. This multiplier defines how many hits are required to switch from one throttle level to the next.</p>";
$output .= "<p>For example, with a throttle multiplier of 20: Once 20 pages have been accessed on your site within a period of 60 seconds, the throttle level will be incremented to a level of 1. Once 40 pages have been accessed on your site within a period of 60 seconds, the throttle level will be incremented to a level of 2. And so on, until 100 pages are accessed on your site within a period of 60 seconds, at which time the throttle level will be set to a maximum level of 5.</p>";
$output .= "<p>Upon reaching a throttle level of 5, access logs and the auto-throttle checking mechanism is automatically disabled. It is only renabled by cron after a period of time defined by \"auto-throttle cron test\", explained below.</p></blockquote>";
- $output .= "<h4>auto-throttle probability limiter:</h4><blockquote><p>This option allows you to minimize the performance impact of the auto-throttle. If we refer to the probability limiter as P, then P\% of all pages generated by your site will perform an extra database query to verify that the current throttle level is appropriate to the current server load.</p>";
- $output .= "<p>As a rule of thumb, the higher your multiplier, the lower your probability limiter should be. For example, if you have a multiplier of 100, then you logically don't need to check the throttle level more than once out of every 100 page views, so the probability limiter should be set to 1\%. As database queries are \"expensive\", it's recommended that you keep the probability limiter to the smallest percentage possible, while still high enough to react quickly to a change in server load.</p></blockquote>";
+ $output .= "<h4>auto-throttle probability limiter:</h4><blockquote><p>This option allows you to minimize the performance impact of the auto-throttle. If we refer to the probability limiter as P, then P% of all pages generated by your site will perform an extra database query to verify that the current throttle level is appropriate to the current server load.</p>";
+ $output .= "<p>As a rule of thumb, the higher your multiplier, the lower your probability limiter should be. For example, if you have a multiplier of 100, then you logically don't need to check the throttle level more than once out of every 100 page views, so the probability limiter should be set to 1%. As database queries are \"expensive\", it's recommended that you keep the probability limiter to the smallest percentage possible, while still high enough to react quickly to a change in server load.</p></blockquote>";
$output .= "<h4>auto-throttle cron test:</h4><blockquote><p>The auto-throttle dynamically adjusts its level upward, but not downward. That is to say, if you have a multiplier of 20 and you get 45 hits in one minute, your throttle level will be adjusted to a level of 2. If a few minutes later you only get 35 hits in one minute, the throttle level will <b>NOT</b> be adjusted down to a level of 1. This prevents the throttle from bouncing back and forth between two levels.</p>";
$output .= "<p>In order for the throttle level to be dropped, \"cron.php\" must be called regularly. This option then defines how often the level will be dropped by one to test the server load. If the server load is no longer as high as it was, the level will stay where it is, until the cron test period passes again and cron drops the throttle level again. This process repeats until the throttle is returned to a throttle level of 0.</p></blockquote>";
$output .= "<h3>Throttle block</h3><p>This block displays some statistics regarding the current throttle and its configuration. It is recommended that only site administrators receive the \"%throttle-access\" permission bit required to view this block. It does not display information that would interest a normal site end-user.</p>";
@@ -38,7 +38,7 @@ function throttle_help($section = "admin/help#throttle") {
$output .= "<h3>For programmers: throttle_status()</h3><p>The function <code>throttle_status()</code> will return a number from 0 to 5. 0 means that there is no throttle enabled at this time. Each number above that is a progressively more throttled system... To disable a feature when a site first begins to get busy, disable it at a throttle of 2 or 3. To hold on to the bitter end, wait until 4 or 5.</p>";
$output .= "<p>To implement the throttle, you should do something like this:";
$output .= "<pre> \$throttle = 0;
- /* verify that the statitistics module is installed */
+ /* verify that the statistics module is installed */
if (function_exists(throttle_status) {
\$throttle = throttle_status()
}
@@ -48,7 +48,7 @@ function throttle_help($section = "admin/help#throttle") {
else {
// throttle limit not reached, execute normally
}</pre></p>";
- $output = t($output, array("%statistics-module" => l(t("statistics module"), "admin/statistics"), "%throttle-block" => l(t("access throttle block"), "admin/user/permission"), "%modules-enable" => l(t("enabled"), "admin/system/modules"), "%throttle-config" => l(t("configuration section"), "admin/system/modules/throttle"), "%statistics-config" => l(t("statistcs module"), "admin/system/modules/statistics"), "%throttle-access" => l(t("access throttle block"), "admin/user/permission"), "%throttle-block-enable" => l(t("here"), "admin/block"), "%permissions" => l(t("user permissions"), "admin/user/permission")));
+ $output = t($output, array("%statistics-module" => l(t("statistics module"), "admin/statistics"), "%throttle-block" => l(t("access throttle block"), "admin/user/permission"), "%modules-enable" => l(t("enabled"), "admin/system/modules"), "%throttle-config" => l(t("configuration section"), "admin/system/modules/throttle"), "%statistics-config" => l(t("statistics module"), "admin/system/modules/statistics"), "%throttle-access" => l(t("access throttle block"), "admin/user/permission"), "%throttle-block-enable" => l(t("here"), "admin/block"), "%permissions" => l(t("user permissions"), "admin/user/permission")));
break;
}