views:

181

answers:

5

According to this discussion of Google App Engine on Hacker News,

A DB (read) request takes over 100ms on the datastore. That's insane and unusable for about 90% of applications.

How do you determine what is an acceptable response time for a DB read request?

I have been using App Engine without noticing any issues with DB responsiveness. But, on the other hand, I'm not sure I would even know what to look for in that regard :)

+1  A: 

If you haven't noticed any issues then it is by definition an acceptable response time. The only question is how long your users are happy to wait.

David
+2  A: 

What do you mean by acceptable? What kind of application are you writing? Acceptable means different things for different domains/applications/people. First, you should decide how quickly you want your app to respond to a request. Let's pick 1 second, just for argument's sake. Now, how many DB requests do you need to make to fulfill that request? Let's say 5. Let's also say that we also have 400ms worth of other processing to do. OK, so that's 5 reads times 100ms each, plus 400ms of other stuff. 900ms total, which is less than our goal of 1 second. Perfect! 100ms is an acceptable read rate. In fact, 120ms would still be acceptable, just barely.

Now, let's generalize:

numberOfReads * readTime + otherStuffTime = TotalTime

Fill in your numbers, and you can see what is an acceptable time for your particular situation.

Peter Recore
+1  A: 

An "an acceptable response time for a DB read request" depends entirely on your application and your users.

If the net result is that your site runs fast enough to satisfy you and your users then the slow response time of the services provided by Google in their AppEngine are acceptable.

Now, looking deeper at this particular issue, it sounds like we are talking about GET's. Here are the figures for GET latency and it looks to me that the average latency is closer to 50ms then 100. I'm not saying that is good, but I don't think it is accurate to say 100ms.

qwavel
+2  A: 

You can measure precisely how much each RPC call (datastore or otherwise) is taking, thanks to Guido van Rossum's AppStats relatively-new component (it's part of the standard SDK since 1.3.1). See here for more. 100 milliseconds is fine for most well-designed apps -- if you need to make two or three queries to serve a page, you can still serve in less than half a seconds even if there's lots of processing and rendering involved... not too shabby. Plus, you can use memcache to reduce many of those latencies, etc.

Alex Martelli
+1  A: 

The poster is wrong. Datastore get operations are much faster - about 15-20ms each, currently. Datastore query operations can be slower, because they're much more involved and return more data, but they still complete in anywhere from 30-100ms for a typical query. Other posters have amply addressed whether that's "acceptable" or not.

Nick Johnson
The status page for Datastore GET's seems to show that they are about 50ms.http://code.google.com/status/appengine/detail/datastore/2010/04/08#ae-trust-detail-datastore-get-latency
qwavel
The measurements there are more useful in relative terms - 'weather forecast' type things, than in absolute terms. Typical datastore gets are more in the range I specified.
Nick Johnson