问题
My site has about 50 users and I am getting excessive small datastore operations. I am aggressively memcaching, dont have that many records and still I get millions of small datastore operations. Appstats says the cost is 0 yet the real cost is not 0. I basically know where the small datastore operations might occur.
Key only operations: I do this but I memcache it until the data is not changed. Plus most of my key only operation have limit=100 (this is max) so to get 12m operations I would need to make 120000 calls (I am assuming fetching 1 key is 1 small operation). As I get about 60-70 visits a day that seems a bit excessive. I just cant figure out what is causing that many operations. Appstats is giving me no clue.
This is the dashboard.
This is the appstats.
回答1:
Are you using lots of counts
? Seems like this can be a problem that causes excessive datastore small operations.
I don't have your code, but this answer has some suggestions for optimizing your code when experiencing this problem.
Also, take a look at a similar question - Google app engine excessive small datastore operations for similar answers
回答2:
I notice this old question isn't yet solved, so based on your info, here is another potential cause.
Running my GAE SDK on an very fresh public Azure VM instance (xxx.cloudapp.net), I've noticed a lot of bot traffic coming in trying to find a common open source CMS or cart's admin page. I believe this is due to the bots either utilizing AXFR requests or bruteforce detection of subdomains.
Make sure that you are blocking any unwanted bot traffic and not serving them a dynamic page, hitting your datastore more.
The same condition can also be caused by a rogue AJAX request looping on every page that those 50 users request.
来源:https://stackoverflow.com/questions/15737438/google-app-engine-excessive-datastore-small-operations