From: Rohit Khare (email@example.com)
Date: Wed Apr 12 2000 - 11:14:14 PDT
Patrick's Top-Ten Web Tuning Tips and Tricks
by Patrick Killelea, author of Web Performance Tuning
While there are literally thousands of things you can do to help web
performance, here are Patrick's top ten:
1. Make sure reverse DNS lookups are turned off in your web server.
Reverse DNS maps IP numbers to machine names in the web servers logs
and in CGI programs. CGI's can do the lookup themselves if they need
to and you can use log analysis programs to fill in names in the log
files later. Reverse DNS just slows you down if you do it for each
2. Use the most recent version of your web server because performance
is continuously improving. Early generations of servers are more than
10 times slower than the latest servers.
3. Put your HTML content and your HTTP logs on different disks so
that they don't fight each other, but rather can work in parallel.
4. Keep your content, especially images, as small as possible. Yahoo
is a good example. Download time is directly proportional to size.
5. Preprocess content off-line where ever possible rather than
generate dynamic content. If the number of possible pages you would
generate on the fly is reasonably small, then generate them all in
advance and you'll be ready when the user asks for any one of them.
6. If you have to generate dynamic content, user your server API or
Java servlets rather than slow CGI. CGI depends on forking user
processes for each request. This works well at light loads, but
becomes a bottleneck as the load gets heavier. Servlets and server
API's scale better.
7. Buy more RAM and more bandwidth for both web servers and clients.
Money may not buy you happiness, but it can buy better web
8. Look for excessive TCP retransmits. Turn up the TCP retransmit
timeout if needed. Many servers are tuned for the very small
latencies of a LAN and so perform poorly on the Internet.
9. Use the same TCP Maximum Transmission Unit (MTU) as your ISP. If
you're talking in the same size packets as your ISP, there will be
less time spent splitting up packets or putting them back together.
10. Use the trailing slash when requesting a directory, eg:
http://www.oreilly.com/catalog/ . Otherwise the server will just
reply to the brower with a message that it should use a trailing
slash and your browser will then re-issue the request in the formally
correct way. Things will work without the slash, but they'll be
slightly quicker with it.
Details on all these techniques can be found in Web Performance
Tuning, now available at a bookstore near you.
This archive was generated by hypermail 2b29 : Wed Apr 12 2000 - 11:17:19 PDT