[techtalk] Benchmarking, Bandwidth, server speed

Daniel Manrique roadmr at entropia.com.mx
Tue May 15 16:13:41 EST 2001


> I'm trying to solve a mystery, and at the same time, figure out good metrics 
> to determine our server speed, network speed, capacity, etc.

tough order :)

> One database-driven page in particular loads *extremely* slowly (like, 
> minutes), from several computers in the client's office. I've NEVER had the 
> page load anywhere near that slowly from within our network (where the server 
> resides) or remotely (like at home, which is on a cable modem connection - 
> but via a totally different network than the DSL that work is on).  The 
> client has a high-speed connection. (the strange part is that it appears that 
> it is one page in particular, and that there are other pages that have just 
> as much info, but load much faster - I'm not sure what's up there.)

Do you know for sure that the page itself isn't the problem? if you need
data from a complex query to build the page, it might be that the database
is suffering. In this case maybe checking what the heck the database is
doing would give a clue as to whether optimization is needed in that area.

Maybe modifiying the page's code so that it logs all the queries it
executes, and then running those queries manually and measuring the time
they take. If they are indeed slow, try to have your DBMS explain how is
it optimizing the query, maybe an index here and there could help
performance. I have cut load times 10-fold by indexing the correct column
in a big table.

> We're running mrtg, and find that theoretically, our bandwidth is never 
> anywhere near the theoretical capacity that we pay for. 

mrtg only tells you how much information is really going through. say you
have a 1-Mbps link and mrtg says you never use more than 200 kbps. That
could mean that somewhere along the way, some bottleneck keeps the
information from flowing faster than that.

> First, are there programs which can give you the "cieling" bandwidth of your 
> network - the real speed that you've got?

try a search for "bing" (bandwidth ping). It uses an admittedly not too
scientific method for calculating effective maximum bandwidth between two
points in the network. I've used it and while I wouldn't bet substantial
amounts of money to its accuracy, it's good enough to get an estimate.

> I'm learning about benchmarking perl code (which is the back-end programming 
> language that we use) and I know that there are definitely things I need to 
> do to improve speed there.  As well, we use PostgreSQL, which is slower than 
> MySQL, but not that much slower - I don't think that's the problem. 
> 
> How can you test the capacity of a server to handle concurrent sessions, etc.?
> (BTW, in general, we run Debian Linux, Postgres, apache and perl)

Assuming it's a web server, there are utilities that will stress-test your
server requesting a buttload of pages and measuring reply time, served
bandwidth, number of hits/second the server managed to serve and stuff
like that. A quick freshmeat search for "http benchmark" turns out a few
links which are a good place to start.

	- Roadmaster

----------------
*
Save a tree- use E-Mail!			roadmr at entropia.com.mx
*







More information about the Techtalk mailing list