开发者

Session Timeout and page response time

I'm load testing an asp.net app. The load test is simulating 500 user doing searchs on the site and browsing the results. I'm observing that the more I reduce the session timeout limit (in web.config) the better the page response time. For exemple, with a timeout at 10 minutes, I got an average response time of 8.35 seconds. With a timout at开发者_如何学Python 3 minutes, the average response time for the same page is 3,98 seconds. The session in stored "InProc". I supposed the memory used by the "no more used but still actives" sessions may be in cause. But, even if there is more memory used when the timeout is at 10, there is still plenty of memory available (about 2.7Gb). Any ideas?


It really sounds like you're not using session as it's intended. Have you considered rather than using session variables, you might be better off using one of the caching mechanisms available, whether that's through downlevel or in-proc caching? Here's the best place to start:

http://msdn.microsoft.com/en-us/library/xsbfdd8c%28v=vs.71%29.aspx

Its also strongly recommended that you disable viewstate at either the page or control level wherever its not needed. If you use a view state decoder such as:

http://ashishware.com/ViewStatePeeker.shtml

..you'll be horrified by the amount of useless junk it stores!


How long are the testcases that the VUs are executing? If they are not taking as long as the shorter session timeout (<3 min), or they are taking longer than both of them (>10 min), then it would seem that changing that timeout should have no effect.

Does the testcase contain a logout? Or do the VUs simply abandon the session (close browser, etc)?


For my case, storing the session state out-of-process (StateServer) greatly improved performance, even if the state server is on the same physical machine than the web server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜