NDB 的 GAE Memcache 使用率似乎很低 [英] GAE Memcache Usage for NDB Seems Low

查看:24
本文介绍了NDB 的 GAE Memcache 使用率似乎很低的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含约 40 GB 数据库的 Google App Engine 项目,但使用 NDB 时读取性能很差.我注意到我的内存缓存大小(如仪表板上所列)只有大约 2 MB.我希望 NDB 隐式地更多地使用内存缓存来提高性能.

I have a Google App Engine project with a ~40 GB database, and I'm getting poor read performance with NDB. I've noticed that my memcache size (as listed on the dashboard) is only about 2 MB. I would expect NDB to implicitly make more use of memcache to improve performance.

有没有办法调试 NDB 的内存缓存使用情况?

Is there a way of debugging NDB's memcache usage?

推荐答案

这个问题的表述相当糟糕——读取性能不佳的原因有很多,大多数是由于应用程序编写的糟糕,但你没有告诉我们有关该应用的任何信息.

The question is rather poorly formulated -- there are a zillion reasons for poor read performance, and most are due to a poorly written app, but you don't tell us anything about the app.

唯一可以回答的问题是最后一个:有没有办法调试 NDB 的内存缓存使用情况?"除了 Sologoub 的指示之外,我还建议使用 Appstats 来确定是否实际进行了预期的内存缓存调用.阅读 NDB 源代码,尤其是 context.py 中的 get() 和 put() 也可能有所帮助.

The only question that can be answered is the final one: "Is there a way of debugging NDB's memcache usage?" In addition to Sologoub's pointers I'd suggest using Appstats to find out whether the expected memcache calls are actually being made. And reading the NDB source code, especially get() and put() in context.py, might also help.

这篇关于NDB 的 GAE Memcache 使用率似乎很低的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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