473,406 Members | 2,847 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Cache performance in ASP.NET 2.0

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

Sep 20 '07 #1
1 1267
robm,
It would be really hard to say since you are describing symptoms but we
don't have any idea what your code is doing, or how. I use Caching in
ASP.NET 2.0 extensively and have never seen the kind of behavior you
describe. Maybe a little more detail of a snippet of working code sufficient
to reproduce the issue would help.
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com

"robm" wrote:
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

Sep 20 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: emerth | last post by:
Hello all: I have read references to optimizing C code to exploit the CPU cache of <insert your favourite CPU>. Can anyone point me towards some info on the 'net that gets into techniques for...
1
by: Jim | last post by:
Hi, I have a few questions regarding the cache object: Does the cache object exist through postbacks? The cache object only exists for the current request, right? Is there a way to cache...
26
by: Ed L. | last post by:
Here's some of my current notions on pgsql performance tuning strictly as it relates to pgsql tuning parameters in the context of a dedicated linux or hpux server. I'm particularly focusing on...
18
by: Mark | last post by:
Hello. I am looking for a way to download and cache a web page that the user has not yet requested, and write the web page to the browser cache without displaying it. My intention is to improve...
4
by: RedHair | last post by:
Development: Windows 2003 Production :Windows 2003 ASP.NET 2.0 + C# I want to disable the cache feature of all pages in dev but enable it in production environments. What's the solution? If...
10
by: =?Utf-8?B?TmFkYXYgUG9wcGxld2VsbA==?= | last post by:
Hi Everybody, I'm trying to save some items in the asp.net cache, but they are removed from the cache WAY before they are supposed to (at least as I understand the documentation). I add the...
0
by: pmouse | last post by:
Hi Guys, I've written a templated lru cache based on the SGI version of STL. To use the class, simply write: lru_cache<key_type, data_type, cache_length, custom_containercache; cache.insert( key,...
5
by: J055 | last post by:
Hi The following code works on my develeopment machine using the VS web server. When I run the application on 2 other Windows 2003/IIS 6 servers no caching seems to take place at all. Can...
3
by: zaheer031 | last post by:
Hi All, How do I maximse the use of cache( both data and instruction ) in the code . I know use of loops and local variables will help but more would be of good help Thanks,
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.