Josh
Josh

Reputation: 2338

Local AppFabric and Local Memcache - Strictly Performance Speaking

At work we are discussing the possibility for a dedicated in-memory cache server. The two choices are Windows AppFabric Cache Server and Memcached. So I setup two tests, one for AppFabric and one for Memcache.

Memcache tests OS/Appliance Memcache VMWare Appliance Virtualized in VMWare Workstation, Quad Core with 8gb of ram with the MemCachedDOTnet_2.0 C# API.

After I pushed a few objects into cache I started my timings and got on average.

AppFabric Cache Server No VM because its all windows. Quad Core with 8gb of ram. Same thing I pushed a few objects to cache before I started working. Local Cache option was disabled in the client settings.

Now the question is I have heard MemCached is super fast, but I assumed it to be faster then AppFabric, but not 15ms slower on Gets vs AppFabric. What is everyone else's performance for both AppFabric and/or MemCache. I'm just looking for raw numbers of MS and object size or things I should look at to see if I can make the numbers line up more to my expectations or options to set or check on.

Upvotes: 4

Views: 1667

Answers (2)

Prathul
Prathul

Reputation: 88

I see that you have enabled local cache on Appfabric. When local cache is enabled, the cache client stores a reference to the object locally. This keeps the object active in the memory of the client application. When the application requests the object, the cache client first checks whether the object resides in the local cache. If so, the reference to the object is returned immediately without contacting the server. If it does not exist, the object is retrieved from the server. After objects are stored in the local cache, your application continues to use those objects until they are invalidated, regardless of whether those objects are updated by another client on the cache cluster. For this reason, it is best to use local cache for data that changes infrequently.

Since you had local cache enabled, the object was returned immediately without contacting the cluster. If your data changes frequently and you have low tolerance for stale data, you should have local cache disabled. Try the same tests on Windows Server Appfabric 1.1 with local cache disabled.

Upvotes: 3

trondn
trondn

Reputation: 379

Why don't you test the windows version of memcached so that you're comparing apples with apples? When you're running one of them in a vm you'll also get the overhead of the extra OS..

Upvotes: 1

Related Questions