Controlling network packet size from IIS/ASP.Net?

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


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?


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.


Comments (3)

  1. John Haughton says:

    Thanks David — I think this puts us on the right track, also helps to cut off some areas not to explore. Will send page if problem persists.

  2. David.Wang says:

    Glad to be able to help. As people moved from IIS5/W2K to IIS6/WS03, many little things have changed in HTTP.SYS (and a couple of big things, like response buffering) in WS03SP1.

    Please do post back your end results to give the benefit of closure for future readers.


  3. Ankur says:

    Hi David,

    Thanks for the information.

    Is it possible in IIS7? I made a simple web application using which was working fine but suddenly stopped working(only from XP systems). After lot of troubleshooting I found that MTU of the Network to the server was 1496 and setting the same on local XP machine solves the problem. (I don’t know what’s different in Vista and Win Sever that it’s working flawlessly from those systems). I think ICMP may be disabled on the server. But again asp applications deployed on the same server are working perfect.

    I don’t know if its a correct place to ask this question and i saw many of your posts answering similar questions.

    Waiting for a reply.

Skip to main content