On Mon, Aug 6, 2012 at 2:41 PM, Drake <drak...@digerat.com> wrote:
> So here are more generalizations for APP Engine:
>
> Cache Everything:
> Your CPU is slow, when profiling weigh the CPU to the memory cost and speed
> for things which you calculate often. It is surprising that even simple
> stuff denormalized can be so much faster than the complex operation.
> GetByID("Sales-and-Shipping-AZ-1599-1lb") takes less than 3 MS out of
> Instance memory cache served from a dedicated backend, 10ms from memcache
> 120ms from data store.  You can't do the 4 lookups and the calculation that
> fast. So Don't.  Remember all your "Complex business rules" are cacheable.
> Anything worth doing is worth caching :-)

These numbers are nothing like my past experimental results, so I ran
them again.  Here's appstats for a calls from a F1 to a B1 that does
nothing but return the string "noop":

https://img.skitch.com/20120808-nn749683wqdg5516fy732k71iw.jpg

Clicking on those links shows that 99% of the time is spent waiting on
urlfetch to the backend.

 * The _minimum_ fetch time to a backend is 12ms.

 * Maybe 10% of calls are >250ms, and a very significant portion exceed 500ms.

 * I also tried this with a B8.  No material difference
(https://img.skitch.com/20120808-gerejtgfd958i691hsiw897wjw.jpg)

My experience with memcache is that most requests come back in 2ms or
less, but there are rare outliers in the 100ms or 200ms range.  Much,
much better behaved.

BTW this was with zero contention (ab -c 1 -n 50).

Conclusion:  Backends suck.

Jeff

-- 
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-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to