Simultaneous Connections

  • I have a desktop application which is multi-threaded. It allows for queries to be executed against a server and hence simulates multiple users querying the database at the same time. In the background I monitor the performance of these queries in profiler. The weird thing, I think, is that depending on the number of concurrent connections the length of time for each query to execute is increased linearly, i.e. with a single connection the query takes 80 ms, when I increase the number of connections to 10 each query takes 800 ms. I have no problem reproducing this behaviour no matter what the query is I use. All my queries are done through stored procs and indexes are set up correctly.

    Can anyone tell me:

    Is this to be expected.

    If not, has anybody seen this before.

    If not, how can I remedy.

    Your help is much appreciated.

  • Niall,

    Are you looking at other performance counters, e.g. processor time and disk IO, during your profiling? Perhaps you're maxing something out?

    --
    Adam Machanic
    whoisactive

  • CPU, memory and disk activity seems ok. I am using simple queries, nothing too taxing, but the query time increases proportional to the number of sim. connections.

    I am interested to know if anyone has tried a similar test and not seen the results I am getting ?

  • I run load tests all the time (it's a major part of my job) and durations are generally fairly consistent -- with some decay as simultaneous connections increase -- until we start to see blocking, processors/disks maxing out, etc, at which time things begin breaking down more consistently with what you describe.

    --
    Adam Machanic
    whoisactive

  • OK, that sounds like might be my problem. Can you suggest maybe what I should do, maybe run perform. analyser and if so what counters should I use.

    Your help is appreciated

    Thanks

  • Niall,

    When I run load tests, I usually start the monitor for Average Disk Queue Length, Total Processor Time, Total Memory Utilization, Page Faults, and then sometimes add a few others if I think there's a specific problem. For example, I might look at disk total write time instead of queue length if I think that's contributing to the problem. It gets to be more of a "by feel" thing after a while; start working with the counters and you'll get the hang of it fairly quickly, IMO...

    This link describes some of the counters as they pertain to web testing, but I think the descriptions are still pretty good and can be transferred over to database testing:

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/act/htm/actml_ref_pcls.asp

    --
    Adam Machanic
    whoisactive

  • Thanks for your help!

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply