Thanks for the quick response! Could you let us know the app ID so we could take a look at the Datastore statistics? This does indeed seem unexpected. You may wish to use mtr <https://en.wikipedia.org/wiki/MTR_(software)> to test the IP route latency between your instance and our servers. You can run wireshark <https://www.wireshark.org/> in the instance while a problematic request is being made to determine the remote IP on our network that your instance is communicating with.
Regards, Nick Cloud Platform Community Support On Thursday, May 19, 2016 at 11:13:29 PM UTC-4, Ifen Shih wrote: > > Hi, Nick: > We build up a server on AWS and try to insert/query datastore data. > The entity is not large and only insert/query one entity. > Please help to check the following entity (I used these data to test > performance). > Thank you for your prompt reply. > > *Name/ID* (String) > name=9c3248df-4e02-447a-8b61-e9ae4ca590ce > > *Category *(String) > ABC > > *Code *(String) > abcdefg > > *State *(String) > abcdefg_state > > *UpdateTime *(Integer) > 1463712981898 > > *Id *(String) > 91a2b7e3-f981-46ae-902b-d4fb8ed7ef8b > > > On Friday, 20 May 2016 06:31:44 UTC+8, Nick (Cloud Platform Support) wrote: >> >> Hey Ifen, >> >> 2 to 2.8 seconds for a single entity put sounds like a serious outlier. >> Are you seeing that kind of timing for each put? Where is your code running >> - on your own computer, a Compute Engine >> <https://cloud.google.com/compute/docs> instance, inside App Engine, a >> custom runtime in the Flexible Environment >> <https://cloud.google.com/appengine/docs/flexible/>? Is the entity very >> large? These are the first questions which spring to mind in attempting to >> understand the amount of latency you're seeing. >> >> Cheers, >> >> Nick >> Cloud Platform Community Support >> >> On Thursday, May 19, 2016 at 7:17:25 AM UTC-4, Ifen Shih wrote: >>> >>> Hi, >>> I'm also a Java developer and in Linux platform. I am using the >>> gcloud-java for operating datastore and that is a really good library. >>> However, the query/insert performance is not good even I don't count the >>> connection time. >>> From my testing experience, the average time of inserting and query one >>> entity (4 properties) is about 2000~2800ms/200~600ms. >>> Could you please let me know that is it possible to improve the >>> performance? >>> or does your team have plan to improve the performance?? Thanks. >>> >>> *Version: 0.2.1* >>> // Initialize >>> DatastoreOptions options = DatastoreOptions.builder() >>> .authCredentials(AuthCredentials.createForJson(new >>> FileInputStream(mCertJsonFile))) >>> .projectId(mProjectId).namespace(mNamespace).build(); >>> mDatastore = options.service(); >>> >>> // [query] start to log time >>> mDatastore.run(Query.entityQueryBuilder().kind(KIND_NAME).build()) >>> // [query] end to log time *=> average: 200~600ms* >>> >>> // [insert] start to log time >>> mDatastore.put(entity) >>> // [insert] end to log time *=> average: 2000~2800ms* >>> >>> >>> On Thursday, 18 February 2016 08:59:19 UTC+8, Nick (Cloud Platform >>> Support) wrote: >>>> >>>> It's an interesting question. Obviously empirical testing is best, but >>>> one could investigate the source code to make an informed guess as to the >>>> efficiency. Really the native App Engine runtime API's benefit from using >>>> gRPC <http://www.grpc.io/docs/>, rather than JSON, but I feel that the >>>> gcloud-java library will likely also be able to make use of the more >>>> efficient gRPC when in a suitable environment, falling back to HTTP JSON >>>> REST when necessary. I'll try to update this thread tomorrow with any of >>>> my >>>> findings from investigating the source of gcloud-java >>>> <https://github.com/GoogleCloudPlatform/gcloud-java>. >>>> >>>> >>>> On Wednesday, February 17, 2016 at 4:19:33 PM UTC-5, Robert Fox wrote: >>>>> >>>>> I'm a Java developer on Googles App Engine platform. Lately I've been >>>>> using Managed VMs. According to new-ish documentation on Google's site [ >>>>> 1 >>>>> <https://cloud.google.com/appengine/docs/managed-vms/java/migrating-an-existing-app> >>>>> ]: >>>>> >>>>> As you become more familiar with the Managed VM environment you should >>>>>> use the native features of the Java runtime and the Google Cloud client >>>>>> libraries for Java rather than App Engine SDKs. >>>>>> I love that the new gcloud-java seems to be a unified API for >>>>>> local/remote usage. But I do have one concern... and that is my >>>>>> question: >>>>>> How does performance compare to the standard App Engine APIs? I get >>>>>> worried >>>>>> with the new REST APIs with their JSON text processing / parsing... I >>>>>> will >>>>>> build a test suite if I have to but I was hoping someone might already >>>>>> know. >>>>> >>>>> >>>>> These new developments would seem to be a huge win for Compute Engine >>>>> if the new gcloud-java is performant and can run fully authenticated. >>>>> >>>>> Out of the following services I'm a heavy user of the four in bold. >>>>> >>>>> *Datastore* >>>>> Logging >>>>> *Memcache* >>>>> Search >>>>> *Task Queue* >>>>> *URL Fetch* >>>>> Users >>>>> >>>>> -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/5d0f3fdc-36e6-498d-9467-2b137dd3e453%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
