Fossil SCM
Add a mention of the "fossil cache" command to the server load management discussion on the "server.wiki" page. And mention "fossil cache" in the change log. Documentation changes only.
Commit
34ea8daf905f6b7ac5847bfaf6438d1d05f9d795
Parent
c7194b668b8ce41…
2 files changed
+4
-1
+24
-7
+4
-1
| --- www/changes.wiki | ||
| +++ www/changes.wiki | ||
| @@ -35,11 +35,14 @@ | ||
| 35 | 35 | * Fix the [/help?cmd=stash|stash] so that it remembers added files and re-adds |
| 36 | 36 | them when the stash is applied. |
| 37 | 37 | * Fix the server so that it avoids writing to the database (and thus avoids |
| 38 | 38 | database locking issues) on a |
| 39 | 39 | [/help?cmd=pull|pull] or [/help?cmd=clone|clone]. |
| 40 | - * Add support for [./server.wiki#loadmgmt|server load management]. | |
| 40 | + * Add support for [./server.wiki#loadmgmt|server load management] using both | |
| 41 | + a cache of expensive pages (the [/help?cmd=cache|fossil cache] command) | |
| 42 | + and by rejecting expensive page requests when the server load average is too | |
| 43 | + high. | |
| 41 | 44 | * Add the [/help?cmd=praise|fossil praise] command as an alias for |
| 42 | 45 | [/help?cmd=blame|fossil blame] for subversion compatibility. |
| 43 | 46 | * Enhance the [/help?cmd=test-diff|fossil test-diff] command with -y or --tk |
| 44 | 47 | options so that it shows both filenames above their respective columns in |
| 45 | 48 | the side-by-side diff output. |
| 46 | 49 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -35,11 +35,14 @@ | |
| 35 | * Fix the [/help?cmd=stash|stash] so that it remembers added files and re-adds |
| 36 | them when the stash is applied. |
| 37 | * Fix the server so that it avoids writing to the database (and thus avoids |
| 38 | database locking issues) on a |
| 39 | [/help?cmd=pull|pull] or [/help?cmd=clone|clone]. |
| 40 | * Add support for [./server.wiki#loadmgmt|server load management]. |
| 41 | * Add the [/help?cmd=praise|fossil praise] command as an alias for |
| 42 | [/help?cmd=blame|fossil blame] for subversion compatibility. |
| 43 | * Enhance the [/help?cmd=test-diff|fossil test-diff] command with -y or --tk |
| 44 | options so that it shows both filenames above their respective columns in |
| 45 | the side-by-side diff output. |
| 46 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -35,11 +35,14 @@ | |
| 35 | * Fix the [/help?cmd=stash|stash] so that it remembers added files and re-adds |
| 36 | them when the stash is applied. |
| 37 | * Fix the server so that it avoids writing to the database (and thus avoids |
| 38 | database locking issues) on a |
| 39 | [/help?cmd=pull|pull] or [/help?cmd=clone|clone]. |
| 40 | * Add support for [./server.wiki#loadmgmt|server load management] using both |
| 41 | a cache of expensive pages (the [/help?cmd=cache|fossil cache] command) |
| 42 | and by rejecting expensive page requests when the server load average is too |
| 43 | high. |
| 44 | * Add the [/help?cmd=praise|fossil praise] command as an alias for |
| 45 | [/help?cmd=blame|fossil blame] for subversion compatibility. |
| 46 | * Enhance the [/help?cmd=test-diff|fossil test-diff] command with -y or --tk |
| 47 | options so that it shows both filenames above their respective columns in |
| 48 | the side-by-side diff output. |
| 49 |
+24
-7
| --- www/server.wiki | ||
| +++ www/server.wiki | ||
| @@ -246,11 +246,11 @@ | ||
| 246 | 246 | <a name="loadmgmt"></a> |
| 247 | 247 | <h2>Managing Server Load</h2><blockquote> |
| 248 | 248 | <p> |
| 249 | 249 | A Fossil server is very efficient and normally presents a very light |
| 250 | 250 | load on the server. |
| 251 | -The Fossil [./selfhost.wiki | self-host server] is a 1/24th slice VM at | |
| 251 | +The Fossil [./selfhost.wiki | self-hosting server] is a 1/24th slice VM at | |
| 252 | 252 | [http://www.linode.com | Linode.com] hosting 65 other repositories in |
| 253 | 253 | addition to Fossil (and including some very high-traffic sites such |
| 254 | 254 | as [http://www.sqlite.org] and [http://system.data.sqlite.org]) and |
| 255 | 255 | it has a typical load of 0.05 to 0.1. A single HTTP request to Fossil |
| 256 | 256 | normally takes less than 10 milliseconds of CPU time to complete. So |
| @@ -264,16 +264,33 @@ | ||
| 264 | 264 | [/help?cmd=/annotate | /annotate] and others. On very large repositories, |
| 265 | 265 | these commands can take 15 seconds or more of CPU time. |
| 266 | 266 | If these kinds of requests arrive too quickly, the load average on the |
| 267 | 267 | server can grow dramatically, making the server unresponsive. |
| 268 | 268 | <p> |
| 269 | -To help avoid problems, Fossil has the ability to fail CPU-intensive | |
| 270 | -web page requests with a | |
| 271 | -[http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.3 | "503 Server Overload"] | |
| 272 | -HTTP error if an expensive request is received while the host load | |
| 273 | -average is too high. To activate this | |
| 274 | -feature, visit the /Admin/Access setup page in the administrative web | |
| 269 | +Fossil provides two capabilities to help avoid server overload problems | |
| 270 | +due to excessive requests to expensive pages: | |
| 271 | +<ol> | |
| 272 | +<li><p>An optional cache is available that remembers the 10 most recently | |
| 273 | + requested /zip or /tarball pages and returns the precomputed answer | |
| 274 | + if the same page is requested again. | |
| 275 | +<li><p>Page requests can be configured to fail with a | |
| 276 | + [http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.3 | "503 Server Overload"] | |
| 277 | + HTTP error if an expensive request is received while the host load | |
| 278 | + average is too high. | |
| 279 | +</ol> | |
| 280 | +Both of these load-control mechanisms are turned off by default, but they | |
| 281 | +are recommended for high-traffic sites. | |
| 282 | +<p> | |
| 283 | +The webpage cache is activated using the [/help?cmd=cache|fossil cache init] | |
| 284 | +command-line on the server. Add a -R option to specify the specific repository | |
| 285 | +for which to enable caching. If running this command as root, be sure to | |
| 286 | +"chown" the cache database (which is a separate file in the same directory | |
| 287 | +and with the same name as the repository but with the suffix changed to ".cache") | |
| 288 | +to give it write permission for the userid of the webserver. | |
| 289 | +<p> | |
| 290 | +To activate the server load control feature | |
| 291 | +visit the /Admin/Access setup page in the administrative web | |
| 275 | 292 | interface and in the "<b>Server Load Average Limit</b>" box |
| 276 | 293 | enter the load average threshold above which "503 Server |
| 277 | 294 | Overload" replies will be issued for expensive requests. On the |
| 278 | 295 | self-host Fossil server, that value is set to 1.5. But you could easily |
| 279 | 296 | set it higher on a multi-core server. |
| 280 | 297 |
| --- www/server.wiki | |
| +++ www/server.wiki | |
| @@ -246,11 +246,11 @@ | |
| 246 | <a name="loadmgmt"></a> |
| 247 | <h2>Managing Server Load</h2><blockquote> |
| 248 | <p> |
| 249 | A Fossil server is very efficient and normally presents a very light |
| 250 | load on the server. |
| 251 | The Fossil [./selfhost.wiki | self-host server] is a 1/24th slice VM at |
| 252 | [http://www.linode.com | Linode.com] hosting 65 other repositories in |
| 253 | addition to Fossil (and including some very high-traffic sites such |
| 254 | as [http://www.sqlite.org] and [http://system.data.sqlite.org]) and |
| 255 | it has a typical load of 0.05 to 0.1. A single HTTP request to Fossil |
| 256 | normally takes less than 10 milliseconds of CPU time to complete. So |
| @@ -264,16 +264,33 @@ | |
| 264 | [/help?cmd=/annotate | /annotate] and others. On very large repositories, |
| 265 | these commands can take 15 seconds or more of CPU time. |
| 266 | If these kinds of requests arrive too quickly, the load average on the |
| 267 | server can grow dramatically, making the server unresponsive. |
| 268 | <p> |
| 269 | To help avoid problems, Fossil has the ability to fail CPU-intensive |
| 270 | web page requests with a |
| 271 | [http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.3 | "503 Server Overload"] |
| 272 | HTTP error if an expensive request is received while the host load |
| 273 | average is too high. To activate this |
| 274 | feature, visit the /Admin/Access setup page in the administrative web |
| 275 | interface and in the "<b>Server Load Average Limit</b>" box |
| 276 | enter the load average threshold above which "503 Server |
| 277 | Overload" replies will be issued for expensive requests. On the |
| 278 | self-host Fossil server, that value is set to 1.5. But you could easily |
| 279 | set it higher on a multi-core server. |
| 280 |
| --- www/server.wiki | |
| +++ www/server.wiki | |
| @@ -246,11 +246,11 @@ | |
| 246 | <a name="loadmgmt"></a> |
| 247 | <h2>Managing Server Load</h2><blockquote> |
| 248 | <p> |
| 249 | A Fossil server is very efficient and normally presents a very light |
| 250 | load on the server. |
| 251 | The Fossil [./selfhost.wiki | self-hosting server] is a 1/24th slice VM at |
| 252 | [http://www.linode.com | Linode.com] hosting 65 other repositories in |
| 253 | addition to Fossil (and including some very high-traffic sites such |
| 254 | as [http://www.sqlite.org] and [http://system.data.sqlite.org]) and |
| 255 | it has a typical load of 0.05 to 0.1. A single HTTP request to Fossil |
| 256 | normally takes less than 10 milliseconds of CPU time to complete. So |
| @@ -264,16 +264,33 @@ | |
| 264 | [/help?cmd=/annotate | /annotate] and others. On very large repositories, |
| 265 | these commands can take 15 seconds or more of CPU time. |
| 266 | If these kinds of requests arrive too quickly, the load average on the |
| 267 | server can grow dramatically, making the server unresponsive. |
| 268 | <p> |
| 269 | Fossil provides two capabilities to help avoid server overload problems |
| 270 | due to excessive requests to expensive pages: |
| 271 | <ol> |
| 272 | <li><p>An optional cache is available that remembers the 10 most recently |
| 273 | requested /zip or /tarball pages and returns the precomputed answer |
| 274 | if the same page is requested again. |
| 275 | <li><p>Page requests can be configured to fail with a |
| 276 | [http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.3 | "503 Server Overload"] |
| 277 | HTTP error if an expensive request is received while the host load |
| 278 | average is too high. |
| 279 | </ol> |
| 280 | Both of these load-control mechanisms are turned off by default, but they |
| 281 | are recommended for high-traffic sites. |
| 282 | <p> |
| 283 | The webpage cache is activated using the [/help?cmd=cache|fossil cache init] |
| 284 | command-line on the server. Add a -R option to specify the specific repository |
| 285 | for which to enable caching. If running this command as root, be sure to |
| 286 | "chown" the cache database (which is a separate file in the same directory |
| 287 | and with the same name as the repository but with the suffix changed to ".cache") |
| 288 | to give it write permission for the userid of the webserver. |
| 289 | <p> |
| 290 | To activate the server load control feature |
| 291 | visit the /Admin/Access setup page in the administrative web |
| 292 | interface and in the "<b>Server Load Average Limit</b>" box |
| 293 | enter the load average threshold above which "503 Server |
| 294 | Overload" replies will be issued for expensive requests. On the |
| 295 | self-host Fossil server, that value is set to 1.5. But you could easily |
| 296 | set it higher on a multi-core server. |
| 297 |