3

So I am currently performing a test, to estimate how much can my Google app engine work, without going over quotas. This is my test:

  • I have in the datastore an entity, that according to my local dashboard, needs 18 write operations. I have 5 entries of this type in a table.
  • Every 30 seconds, I fetch those 5 entities mentioned above. I DO NOT USE MEMCACHE FOR THESE !!!

That means 5 * 18 = 90 read operations, per fetch right ? In 1 minute that means 180, in 1 hour that means 10800 read operations..Which is ~20% of the daily limit quota...

However, after 1 hour of my test running, I noticed on my online dashboard, that only 2% of the read operations were used...and my question is why is that?...Where is the flaw in my calculations ?

Also...where can I see in the online dashboard how many read/write operations does an entity need?

Thanks

chchrist
  • 18,854
  • 11
  • 48
  • 82
Teshte
  • 624
  • 1
  • 7
  • 26

1 Answers1

5

A write on your entity may need 18 writes, but a get on your entity will cost you only 1 read.

So if you get 5 entries every 30 secondes during one hour, you'll have about 5reads * 120 = 600 reads.

This is in the case you make a get on your 5 entries. (fetching the entry with it's id) If you make a query to fetch them, the cost is "1 read + 1 read per entity retrieved". Wich mean 2 reads per entries. So around 1200 reads in one hour.

For more details informations, here is the documentation for estimating costs.

You can't see on the dashboard how many writes/reads operations an entity need. But I invite you to check appstats for that.

  • Ok i think i get...there is one thing that i don't know...lets say i have a table with 1000 entities...and i make a query that needs to retrieve only 5 of them...How many reads will this take?...On the website you gave me there is something like this specified...that i don't understand : Note: Queries that specify an offset are charged for the number of results that are skipped in addition to those that are returned. – Teshte Apr 11 '13 at 13:56
  • If you do a GQL query with a "WHERE" condition, and this query retrieve 5 entries, the cost is 2 reads per entries. But if you do a GQL query with a "WHERE" and an "OFFSET", the cost is 2 reads per entries you retrieve + 2reads * the number of entries ignored from the offset. – Patrick Dura Apr 12 '13 at 10:02
  • Why is that OFFSET used ? From what i quickly read, to limit the number of rows returned? What i have in my code is something like this : `cls.all().filter('was_accepted =', true)` ...so basically all the rows with that condition...I am assuming that I am not using OFFSET here right ? – Teshte Apr 13 '13 at 08:24
  • No, you are not using OFFSET in your code. You are just filtering so that's ok. – Patrick Dura Apr 18 '13 at 10:16
  • @PatrickDura Is there any way to know which entity is getting read more time in project? – SylvesterTheKid Dec 26 '19 at 16:42