MemCache Vs. EdgeCache

540 views
Skip to first unread message

Brandon Wirtz

unread,
Nov 27, 2011, 3:19:15 AM11/27/11
to google-a...@googlegroups.com

While I’m not saying you should ditch memcache for speeding up your output.  If you are looking at the effort to implement Memcache through out your code, or getting your headers right to enable edgecache, consider this.

 

In all 3 of the following apps EdgeCache “Hits” were at 40-65%

 

MemCache:

'hits': 2,425, (4%)

'misses': 55,618,

'items': 2,696,

'bytes': 34,992,253,

 

'hits': 44,668, (27%)
'misses': 163,823, 
'items': 1,170, 
'bytes': 1,515,333,
 
JeffProbst.com (High Volume, only like 25 pages of content, I think Edge misses are due to geographic diversity)
'hits': 50,943, (74%)
'misses': 68,942, 
'items': 100, 
'bytes': 618,267, 
 

 

The larger your data set the lower your memcache success will be.  From what I can tell Memcache never goes over 3000 items or 35 Megs  I haven’t been Logging it constantly, so I’m not sure if it is an item or a Meg limit.

 

If you are writing a VERY small app. Using only 1 always on instance writing for Instance memory ensures a much larger cache hit ratio because you get more space and unless your instance resets the data seems to persist.

Brandon Wirtz

unread,
Nov 27, 2011, 3:56:00 AM11/27/11
to google-a...@googlegroups.com

I should have also mentioned that the combined cache hit of all tiers of our system is 93%.

50% Edgecache

12% Local Instance Memory

8% MemCache

23% DataStore

 

With edge Cache off

The numbers look pretty close to the same

14% Local Instance Memory

10% MemCache

69% DataStore

 

Turning off Local instance memory has a NEGATIVE effect on Memcache because of data turn over being high because of the limited size of the Memcache.

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.

Tim Hoffman

unread,
Nov 27, 2011, 4:16:57 AM11/27/11
to google-a...@googlegroups.com
Hi Brandon

memcache effectiveness is going to be heavily dependent on what you are caching.
I have in the past had memcache up to 70MB (but I haven't looked at it in a while.)

One of my sites has a 76% hit ratio on memcache, but it only uses <7MB and the app has a small data set.

I should use edge cache as well ;-)

Cheers

T

Brandon Wirtz

unread,
Nov 27, 2011, 4:59:00 AM11/27/11
to google-a...@googlegroups.com

Edge Cache is Infinite :-)  So if you know how long a page is good for, and you can do things via Get Requests it is the way to go.

 

I’m guessing Jeff Probst’s site could get to 70% cache hits or better easily. 100-ish objects I could probably load the whole site in to ram and not have a tiered system, and could serve everything from 1 or 2 instances, but that’d be code for a single site with atypical usage and not enough billing to support it.

--

You received this message because you are subscribed to the Google Groups "Google App Engine" group.

To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/r6ytOqg9yPoJ.

Tim Hoffman

unread,
Nov 27, 2011, 8:29:57 AM11/27/11
to google-a...@googlegroups.com
Infinite and completely useless for some types of apps ;-)

T

Brandon Wirtz

unread,
Nov 27, 2011, 9:15:48 AM11/27/11
to google-a...@googlegroups.com

Picky Picky.  If you can’t get your users to request the same page more than once, maybe you should make your pages worth coming back for. :-)

 

 

From: google-a...@googlegroups.com [mailto:google-a...@googlegroups.com] On Behalf Of Tim Hoffman
Sent: Sunday, November 27, 2011 5:30 AM
To: google-a...@googlegroups.com
Subject: Re: [google-appengine] MemCache Vs. EdgeCache

 

Infinite and completely useless for some types of apps ;-)

 

T

--

You received this message because you are subscribed to the Google Groups "Google App Engine" group.

To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/jlGF0wQmxJcJ.

Tim Hoffman

unread,
Nov 27, 2011, 6:18:54 PM11/27/11
to google-a...@googlegroups.com
Well I have 1000+ users with an app and every page is absolutely unique to them and no anonymous users, and the contents of every page is dynamically calculated and will be updated any time they do anything, they are required to log in every week or so to log their work hours to comply with their certification for their electrical certificates, so they are garunteed to keep coming back ;-)

The real kicker is access is only via SSL (which also kills edge cache ;-)

So not too picky, 

Memcache is the big win here (in this app once the user logs in they get around 70-80% cache hits from memcache.)

Cheers

T
Reply all
Reply to author
Forward
0 new messages