I have a user who periodically has poor performance when using an on-line database, he connects over the internet using HTTPS. The client connects directly through the firewall missing out the proxy and is using IE8.
I've taken a packet trace and I've noticed that the TCP streams often aren't shut down gracefully. The client will ACK the last packet received from the server then there will be a 60 second wait before the client sends a FIN and the connection closes. This is the IE time out because when I changed HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\InternetSetting\KeepAliveTimeout value to 30 seconds the delay changed to 30 seconds.
This is what a trace of the closure looks like
If the previous packet to the first FIN is data from the database then it closes without any delay
I think the user experiences performance issues when all 6 available TCP streams are timing out.
Is that a reasonable explanation for what is going on? Can anyone suggest why it might be behaving like this?
Thanks in advance for any help.
asked 18 Jul '13, 03:43
In the old days, it was netiquette to open not more than two connections to the same server:
These days, the amount of persistent connections per server has increased to improve performance. You can now download 6 objects in parallel (IE8+) instead of 2. Whenever a connection is not in use, the inactivity timer starts to count down. When it hits 0, the connection is closed. However, if the user needs a new object from the server (because it clicked on a new link on the site), the browser will look if there are any open idle connections to the server and use it instead of opening a new connection. This saves TCP (and in your case also SSL) connection setup time.
So the closure of the sessions is normal as the browser waits for the user to click on a link to get new objects over the current connection. If you see the connection closed straight away for some sessions, this can be caused by several things: - The server issued a "Connection: Close" in the last response in the session - The request limit for the connection has been reached (most web servers keep a request count per connection and have a fixed limit on each connection
In your colored packet list, the client requested some web page objects over 3 connections, then there was user-time (reading the page etc). The connections idled out and almost 32 seconds after the last session idled out, the user requested a new http object, so a new connection had to be created.
All in all very normal behavior.
So what does the user report as "Slow performance" and do you have a tracefile of a good session and one for which he reported "slow performance"?
answered 18 Jul '13, 15:02
IE or in general a browser kepping HTTP sessions open for a certain keepalive period is absolutely normal and the snippets you provided show a perfectly fine graceful TCP connection teardown with both sides having sent and ACKed their FINs.
Why do you suppose a performance problem resulting from that regular behaviour? Is your client in any way limited to having only 6 TCP connections open e.g. on the firewall?
answered 18 Jul '13, 05:11