I don't understand pooling :-S

  • Thread starter Thread starter Willy Esteban
  • Start date Start date
W

Willy Esteban

OK, I understand what it's supposed to do, but I don't understand what it is
actually doing. Actually, I don't understand the .Net CLR Data values
numbers reported by Performance Monitor.

I wrote a very simple app that allows me to specifically open and close a
sql connection. When I open the connection, I see the Current # connection
pools increase by one and the Current # pooled connections increase by 2.
This is consistant with my understanding of what the pooling is supposed to
do. I can open and close the connection as many times as I like and the
numbers don't change.

When I close the app, the numbers in performance monitor remain the same. I
was expecting them to go away.

Then I run the app again. I open the connection and the previously mentioned
values increase again! Basically, it's like a whole new pool is created
again. What is going on? Is Performance Monitor misreporting or is the
pooling not working properly. Reading some of the messages here about this
subject, it appears that the latter would be true.

Even after I close VS, Performace Monitor continues to report the same
values. They don't go away.
 
It's just one of life's little mysteries. ;)
I wrote an article to help clear up some of these behaviors. Consider that
the .NET SqlClient counters are not resetting correctly. These are expected
to be fixed eventually. See http://www.betav.com/sql_server_magazine.htm for
more details. If this does not do the trick, come back here and keep asking
questions.

hth


--
____________________________________
Bill Vaughn
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Back
Top