任何人都可以解释如何理解App Engine中的数据存储读取成本? [英] Can any one explain how to Understanding Datastore Read Costs in App Engine?

查看:105
本文介绍了任何人都可以解释如何理解App Engine中的数据存储读取成本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在300个用户实体中进行地理查询,结果范围为10.

我查询了120次。对于每个查询,我有10个用户实体对象。

此后,我的应用程序引擎读取操作达到了52%(26000个操作)。

我的用户实体具有12个单值属性和3个多-value属性(List类型)。

用户实体对于单值属性有2个索引,列表类型属性有2个索引。

任何人都可以帮助我理解google的appengine统计数据存储读取操作?

解决方案

首先,使用appstats。它会告诉你你的应用程序的成本来自哪里:



https://developers.google.com/appengine/docs/java/tools/appstats


为了保持应用程序的快速性,您需要知道:

您的应用程序是否在进行不必要的RPC调用?它应该缓存数据
而不是重复RPC调用来获取相同的数据吗?如果多个请求以
并行而非串行执行,您的
应用程序性能会更好吗? Appstats库帮助您回答这些问题
,并通过允许您分析RPC调用来验证您的应用程序使用
中的RPC调用是最有效的方式。
Appstats允许您跟踪给定请求的所有RPC调用,
报告每次调用的时间和成本。

一旦你明白你的成本来自哪里,你可以优化。



如果你只是想知道价格是什么,他们在这里:

https://developers.google.com/appengine/docs/billing


I am doing geoquery among 300 user entities with a result range 10.
I've maked a query for 120 times. For each query I got 10 user entity objects.
After this my app engine read operations reached 52% (26000 operations).
My user entity has 12 single value properties and 3 multi-value properties(List type).
User entity have 2 indexes for single value properties and 2 indexes on list type properties.
Can any one please help me to understand how google's appengine counts the datastore read operations?

解决方案

As a start, use appstats. It'll show you where your costs are coming from in your app:

https://developers.google.com/appengine/docs/java/tools/appstats

To keep your application fast, you need to know:

Is your application making unnecessay RPC calls? Should it cache data instead of making repeated RPC calls to get the same data? Will your application perform better if multiple requests are executed in parallel rather than serially? The Appstats library helps you answer these questions and verify that your application is using RPC calls in the most efficient way by allowing you to profile your RPC calls. Appstats allows you to trace all RPC calls for a given request and reports on the time and cost of each call.

Once you understand where your costs are coming from you can optimise.

If you just want to know what the prices are, they are here:

https://developers.google.com/appengine/docs/billing

这篇关于任何人都可以解释如何理解App Engine中的数据存储读取成本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆