|QUOTE (wolf68k @ Apr 27 2005, 07:17)|
| Well if any of you noobs, not that olds are any better at it, to bother to read the little quoted box at the top of PC Chat page and then accutally read the topic it says to read, you would have see these tweaks plus a few other that can speed things up.|
God danm it. Do no go around advocating things that seriously break the http protocol. This is the second time I've seen you doing it, the first time I pointed out exactly why some of these "tweaks" you recommend to everyone are stupid and screw over webservers. Jesus.
| Has anybody tried these new optimized settings for Mozilla/Firefox? They're tweaked and they give a big speed boost!|
A:There appear to be a bunch of optimizations circling around which claim you can speed up your surfing if you're on a broadband connection. Before you apply any such tweaks, it's important to understand which category they fall into:
These usually take the form of telling you to adjust settings in the "network.http.pipelining..." tree. These are quite safe, but may cause problems with older web servers which do not understand pipelining properly. Pipelining works by sending requests simultaneously over a single connection - this avoids the delay incurred by the latency between you and the server. Traditionally, HTTP clients go:
Pipelining changes this to:
code:REQUEST REQUEST ->
<- RESPONSE RESPONSE
This is a good optimization/tweak to apply as it increases speed for both you and the web server.
The "other" type of optimization commonly seen instructs you to alter the "network.http.max-persistent-connections-per-server", "network.http.max-connections-per-server" and other related settings. These are EXTREMELY DAMAGING "optimizations" to apply and should be avoided at all costs. These settings violate the HTTP protocol, which recommends a limit of 2 connections per server. When you increase it beyond that, a lot of bad things begin to happen:
The web server is often the hardest hit. The Apache web server maintains a number of "slots" which are processes lying around to handle requests as they come in. Since they usually come in at a steady rate, the server can create and destroy extra processes as needed to handle the load. When you and your "optimized" settings hit the server however, almost all of the slots that are idle are suddenly taken up by your browser. This forces the server to suddenly create a bunch of new processes to handle other traffic which is a CPU-intensive task. When you are done hogging up the slots, the server suddenly finds itself with way more processes than are needed for normal traffic, so it will kill off the extra ones.
What's worse is that since most tweaks involve such a high number of connections, once one element has been transferred, the connection is never used again. This forces the web server to hold all the connections in "keepalive" state as under normal circumstances, more than one request is sent per connection. TCP never gets a chance to automatically find the best RWIN for greatest speeds, load on routers between you and the server is increased thanks to all the extra packets... the whole basis of the HTTP/1.1 specification was to get away from the "one connection per element" days of HTTP/1.0, by applying these tweaks you are simply going back to the 1.0 days.
It's also worth pointing out that there exists an Apache module and netfilter settings that could cause your additional connections to be blocked from the server, resulting in very slow page load times, broken images and possibly even a complete IP ban for this "flooding" behaviour. Please, stick with pipelining and do not touch these settings. There is a very good reason why they are not the default.
If you have read and understood this entry thoroughly, you will notice that enabling pipelining will give you HIGHER performance than increasing the maximum number of connections! This is because with pipelining, even though there are only 2 connections to the target web server, you are still sending all your requests at once. Since you are re-using the same connection, TCP has a chance to tune the Receive Window, keep-alive is made useful and everyone is happy.
So in short, don't wander around calling others a n00b as you have quite a lot to learn yet.