R
robm
Hi,
We have recently upgraded an application from .NET 1.1 to .NET 2.0.
It is a medium size enterprise application that makes quite heavy use
of the ASP.NET caching API to improve performance. Since moving
to .NET 2.0 we have observed a marked degradation in performance in
certain areas of code. In particular one function which accesses the
cache within a For loop seems to take considerably longer under high
load conditions. Under normal load there doesn't appear to be any
difference in performance. Extensive investigations have shown the
under high load the CPU of the web server is not maxed out, but
performance of the application drops off. I have investigated the
cause of this and it appears to be to do with contention on the cache
between multiple worker threads. On examining the framework code with
reflector there do seem to be some changes around locking between .NET
1.1 and .NET 2.0: specifically the addition of a new method
WaitInsertBlock inside the class CacheSingle. Can anyone give me any
information about how the functionality has changed between the
framework versions and whether it is a likely cause of the problems
I'm experiencing.
Thanks,
Rob
We have recently upgraded an application from .NET 1.1 to .NET 2.0.
It is a medium size enterprise application that makes quite heavy use
of the ASP.NET caching API to improve performance. Since moving
to .NET 2.0 we have observed a marked degradation in performance in
certain areas of code. In particular one function which accesses the
cache within a For loop seems to take considerably longer under high
load conditions. Under normal load there doesn't appear to be any
difference in performance. Extensive investigations have shown the
under high load the CPU of the web server is not maxed out, but
performance of the application drops off. I have investigated the
cause of this and it appears to be to do with contention on the cache
between multiple worker threads. On examining the framework code with
reflector there do seem to be some changes around locking between .NET
1.1 and .NET 2.0: specifically the addition of a new method
WaitInsertBlock inside the class CacheSingle. Can anyone give me any
information about how the functionality has changed between the
framework versions and whether it is a likely cause of the problems
I'm experiencing.
Thanks,
Rob