Appengine: dramatic performance deterioration after java 8 migration

156 views
Skip to first unread message

Andrea Zonzin

unread,
Feb 9, 2018, 9:31:55 AM2/9/18
to Google App Engine
I migrated my App Engine application from java 7 to java 8 as described here: https://cloud.google.com/appengine/docs/standard/java/migrating-to-java8

The invoked endpoint in my App Engine application performs the following steps:

- Performs an http request using java.net.HttpURLConnection
- Extracts text from the web page retrieved using de.l3s.boilerpipe.sax.BoilerpipeSAXInput.BoilerpipeSAXInput
- Creates a json object containing some fields realated to the web page visited using com.google.gson.JsonObject
- Returns the json in the response.

I notice a dramatic performance deterioration with java 8.

Using the App Engine console chart, I notice a big difference in latency.

I extracted the following information from the logs by choosing two requests representing the average latency time. The first one for requests on the java 7 version and the second one for requests on the java 8 version.

Java 7 version:

protoPayload.startTime: "2018-02-04T02:31:42.824065Z"
protoPayload:.endTime: "2018-02-04T02:31:43.447840Z"
latency: "0.623775s"
receiveTimestamp: "2018-02-04T02:31:43.799013964Z"
timestamp: "2018-02-04T02:31:42.824065Z"

Java 8 version

startTime: "2018-02-01T14:52:07.695316Z"
endTime: "2018-02-01T14:52:09.623029Z"
latency: "1.927713s"
receiveTimestamp: "2018-02-01T14:52:09.693218406Z"
timestamp: "2018-02-01T14:52:07.695316Z"

It is useful to clarify that running some tests on my local app engine environment (on my local machine), I did not notice any difference in the times of execution between java 7 and java 8. So it seems to me that the problem does not come from the version of java but perhaps from the environment app engine where the two versions run. Is my assumption correct?

Does anyone have any ideas about the possible causes?

Jordan (Cloud Platform Support)

unread,
Feb 9, 2018, 10:17:07 PM2/9/18
to Google App Engine
Google Groups is for general product discussions and is not for reporting Google-end issues. It is recommended to report your issue in the Public Issue Tracker with additional details such as your project number to inform the engineering team.  

- Note that this may be caused by your instance class type. Increasing your instance class will give it more CPU resources in turn allowing your application more CPU time to run and return quickly. 

Attila-Mihaly Balazs

unread,
Feb 16, 2018, 7:33:15 AM2/16/18
to Google App Engine
Jordan, please understand that from an user's point of view this response looks like a cop-out:

- for months there have been complaints of Java 8 being slow (just search the forums and the issue tracker)
- Google dragged its feet in making Java 8 available for GAE standard and only made it available *after* Java 7 got EOLd

It would be nice for Google to provide the latest version of the *supported* languages on AppEngine Standard (like PHP 7, Python 3, Java 9) instead of forcing us to use older, unsupported, insecure and slower versions of them!

Attila

PS. And no App Engine Flex is not the solution since it doesn't have feature parity with standard (even if we ignore the cost issue) and personally I find the monthly posts of "AppEngine now supports X" (like Elixir) annoying - because I always recall that I have to use an EOLd version of languages.

Jordan (Cloud Platform Support)

unread,
Feb 16, 2018, 4:41:42 PM2/16/18
to Google App Engine
I completely agree with you; and to clarify my redirect to the PIT, the engineering team is currently performing an internal investigation for this issue and by opening a Public Issue Tracker report we are able to link the internal investigations to the Public report (which is not possible in Groups).

Note that we listen intently to all of your feedback (even if we don't have time to respond publicly), and are currently working very hard on solutions with the soul purpose of evolving the Google Cloud Platform in a direction that implements all of the great feedback we receive. If it ever looks or feels like we are absent, it it because we are work hard on these new an amazing improvements. 

- The best way to receive any form of update is to file your reports in the Public Issue Tracker, and to subscribe to the Google Cloud Platform Blog. There is also a private Google Cloud Insiders group that requires invitation which often posts alpha access invitations for these new improved solutions. 
Reply all
Reply to author
Forward
0 new messages