Home » Microsoft TechnologiesRSS

AppFabric Cache Size Expands upon Eviction Disable

Hi,

I have AppFabric cluster with a single node. I have set cache size = 100MB for this host. I did 2 test as follows:

1) I created named cache (Catalog). I had client storing, size of 1MB object, in for loop from 1 to 100. I checked the Eviction happens @ 91st objects as I expected. Because, the High Wm = 90%, that make sense.

2) I removed the cache and recreated it again (Catalog) - this time with -Eviction None to get a negative reply from cache host @ 91st object assuming Eviction process will not run or even if it will run, it would not clear the already cached items as its disabled instead of LRU. But when I ran the client application, this time also it let me store more than 91 objects. The Put() is success and did not throw any AppFabric ErrorCode or exceptions. I verified the cache shows that it stored more than 91 objects by using  Get-CacheStatistics cmdlet.

So, my question here is Is AppFabric expands the size to an arbitrary size irrespective of the specified size for that host in config file. Please answer my question. I will appreciate help on this one.

Thanks,

Syed.

 

3 Answers Found

 

Answer 1

Hi,

I verified the above scenario stores more than allocated cache size (above Hw of the given cache limit) in cache host of my appfabric cache cluster by reading the values of object from 1 to 200. I am even able to store double the size of allocated cache. So, whats the use of the size parameter in the host element of cluster config, then? Have any one tested the above scenario in your dev/test app-fabric cluster. Please someone answer this.

Thanks,

Syed.


 

Answer 2

Syed,

This is a good question. The Size that you specify for the Caching Service on a cache host is used for Eviction rather than being a guarantee of the size. So when you disable eviction, there is always the chance that you will run out of memory. As you have observed, without eviction disabled, the size setting for your cache host has no effect.

In essence, the caching service is deciding to honor your request to not evict, even if it means that you can get yourself into trouble. These warnings and more explanation can be found in this topic:

Eviction Troubleshooting (Windows Server AppFabric Caching)

I hope this helps explain the design. Let me know if you have more questions or concerns about this.

Thanks.

Jason
 

Answer 3

Thanks Jason, I think I got the information I needed.
 
 
 

<< Previous      Next >>


Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter