4
votes

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 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?

3
Do you use session variables ? Also the delay is referred to what code ? Probably on find results together with the paging the results ? So what method to you use for the paging ?Aristos
Yes, session variables are used, principally to store search results so they are accessible accross the different pages of the site. I store basic information about each results, and then when a result page is displayed (like the 10 first result of 200), I go read the details to be displayed through a web service. It can result in a lot of data in session variable, but I don't see a way to reduce it. It's about 140Ko for 200 search result, a total of 225Ko overwall, including ViewState data (using SessionPageStatePersister). Every page is about 3 times slower.Johnny5

3 Answers

1
votes

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!

0
votes

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)?

0
votes

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.