I got this question about response packet size control...

Question:

Running a web app - native .NET. 2003 for server. Reports come out as garhugic (66K) packets in testing. Is there a way to control max packet size from within .NET at the program level or within the IIS settings?

Answer:

Actually, IIS6 does not buffer nor parse response data, so no, there is no IIS setting to control, let alone manipulate, network packet size. I am not certain if ASP.Net gives any configuration of response buffer packet size.

However, I do not think you need to control packet size from within any framework. Optimizing packet size for network transmission is a function of the networking layer, not application/framework layer.

ASP.Net 1.1 on Windows Server 2003 uses HSE_REQ_VECTOR_SEND to directly send responses (as well as kernel-response cache them) via HTTP.SYS. In the optimum case, ASP.Net directly sends the response buffers to HTTP.SYS, who fills up network packets according to MTU size and sends them out.

However, HTTP.SYS did not implement efficient network buffering until Windows Server 2003 SP1, so there are a lot of popular, non-optimal cases whose performance suffered tremendously prior to SP1. You may be seeing performance artifacts related to those described in this KB article.

So, I would suggest that you first try this test against Windows Server 2003 SP1. If the SP does not work for you, please feel free to send me a short sample ASPX page (and instructions for content as well as necessary server configuration) which reproduces this issue, and I can try and get it to the right folks to look at it.

//David