Sharding memcache incr()?

50 views
Skip to first unread message

Jan Z

unread,
Jun 12, 2010, 5:28:34 PM6/12/10
to Google App Engine
Hello - I'm looking for some advice on performance of memcache incr()
operations. I assume that these can become a bottleneck when a lot of
traffic hits and need to get sharded, the question is what is "a lot".

I'm using memcache incr() for counting specific event types and would
like to understand if this is an issue that's likely to affect my
app. I have no problem losing the stats occasionally (during
maintenance periods, etc.)

Any thoughts on what this number might be, even in terms of an order
of magnitude??

Thanks!

Jan

Nick Johnson (Google)

unread,
Jun 12, 2010, 6:15:43 PM6/12/10
to google-a...@googlegroups.com
Hi Jan,

Because memcache is entirely in-memory, and quite straightforward, it's extremely fast. A memcache server can typically handle thousands of QPS - more than your app is likely to see - so you're quite safe not sharding memcache calls.

-Nick Johnson


--
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.




--
Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047
Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047

Jan Z

unread,
Jun 12, 2010, 7:46:01 PM6/12/10
to Google App Engine
Thanks Nick - hoped this was the case, just haven't seen it confirmed!

Jan

On Jun 13, 10:15 am, "Nick Johnson (Google)" <nick.john...@google.com>
wrote:
> Hi Jan,
>
> Because memcache is entirely in-memory, and quite straightforward, it's
> extremely fast. A memcache server can typically handle thousands of QPS -
> more than your app is likely to see - so you're quite safe not sharding
> memcache calls.
>
> -Nick Johnson
>
>
>
> On Sat, Jun 12, 2010 at 10:28 PM, Jan Z <jan.zawad...@gmail.com> wrote:
> > Hello - I'm looking for some advice on performance of memcache incr()
> > operations.  I assume that these can become a bottleneck when a lot of
> > traffic hits and need to get sharded, the question is what is "a lot".
>
> > I'm using memcache incr() for counting specific event types and would
> > like to understand if this is an issue that's likely to affect my
> > app.  I have no problem losing the stats occasionally (during
> > maintenance periods, etc.)
>
> > Any thoughts on what this number might be, even in terms of an order
> > of magnitude??
>
> > Thanks!
>
> > Jan
>
> > --
> > 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<google-appengine%2Bunsu...@googlegroups.com>
> > .

David Keyes

unread,
Mar 3, 2012, 2:28:11 AM3/3/12
to google-a...@googlegroups.com
Hey just curious if you ever bumped into a wall on this?  I've been playing around with a memcache-based counter, using periodic persistence via a task-queue to keep things "close enough" in the database.

I've been hitting a wall at between 500-1000 locked memcache operations per second.  I've been thinking of doing some kind of sharding in memcache to deal with this, as it seems that the contention is coming from waiting on synchronized memcache, not processor time.

dk

Andrin von Rechenberg

unread,
Mar 5, 2012, 4:30:34 AM3/5/12
to google-a...@googlegroups.com
Might be unrealted, but have you checked out prodeagle.com ?
I use prodeagle extensively and i've never had an issue.

Cheers,
-Andrin

--
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/-/IL38M5eWRrwJ.

To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages