Application behaviour different while fetching data from cache

71 views Asked by At

I have an complete application that takes 7-8 seconds while fetching a particular key value from cache ( Ncache server ). Previously it use to take 1-2 seconds. Now all of a sudden it has changed behaviour( Not sure why and how ). To test, i created a console app and i programmed that it to fetch same key and value from Ncache server and my console app was taking only 0.5 seconds. The size of data is 19mb stored in Ncache server. Can any one throw some light what to do here and how to resolve it?

1

There are 1 answers

0
Shoeb Lodhi On

This seems like some application/environment related issue where a working application is now showing slow fetch time while it was working fine previously. Also, if your console app is getting results in less than a second then it again shows that issue is not from NCache server end but isolated to the application.

I will suggest to review what has been changed in the application to start off. You can also profile your application on which calls are taking more time now. NCache client side windows performance counters can also be reviewed to rule out if it is slow because of NCache or due to some application related issue.

Moreover, caching an object which is huge in size is generally not recommended. You should always break your bigger objects to smaller objects and then cache them. This will reduce network and storage overhead for your application. If you have to use bigger object then consider using compression.