Wireshark-users: [Wireshark-users] Detecting client/server bottlenecks with Wireshark

From: Zach Turner <Zach.Turner@xxxxxxxxxx>
Date: Tue, 1 Jul 2008 14:35:08 -0500
Hello,
 
New to the list (and in fact a little new to networking in general).  I have written a client / server app.  On certain configurations of OSes the transfer rate is horrendous.  I want to try to use Wireshark to help me narrow down this bottleneck and determine where the performance problems are.  For example, say server is sending 17GB of data to client.  Obviously it can't load 17GB of data into memory at once and call write(), so it has to use some buffering logic.  Load a chunk of data, send it, load new chunk of data, send it, etc.  Likewise.  Client has to read/process a chunk of data, dispose of it, read/process a new chunk of data, dispose of it, etc.  So the performance problem could be any number of places:
 
1) Maybe server's custom buffer is getting starved, i.e. spending a lot of time with no data in the buffer because algorithm to populate buffer is slow.
2) Maybe local buffer is fine, but I'm sending data in non-optimal fashion.
3) Maybe server side socket send buffer is full, spends a lot of time trying to copy data from my custom buffer into the buffer.
4) Maybe network has congestion or other problems
5) Maybe client socket's recv buffer is always full, can't pull data off the wire and into socket recv buffer so there is a block.
6) Maybe client's processing of the data is too slow.
 
How can I narrow this down using Wireshark?  Of course I've played around a little on my own and made some discoveries, but as I'm new to this, I welcome any tips that others might have on how to track down this type of problem.