Significant performance degrade when updating aws lambda runtime from java 11 to java 17



I'm trying to update a java11 based lambda function to run java17, but I experience a doubled execution time for simple function that just reads a large object from S3.

I posted a lot more details on stackoverflow but have not yet gotten any responses, hence this crosspost.

Is anyone else experiencing similar performance degrades on java-17?

Best regards Jens

profile picture
已提問 1 年前檢視次數 794 次
2 個答案

The JVM configuration for tiered compilation was changed in the Java 17 managed runtime.

You could change it back to the previous configuration with a environment variable.

JAVA_TOOL_OPTIONS set to "-XX:-TieredCompilation"

You can read about the changes on the Java 17 AWS blog

profile pictureAWS
已回答 1 年前
  • JAVA_TOOL_OPTIONS should be set to -XX:-TieredCompilation for same tiered compilation setting as in java11


Hi, I would personally start by tracing garbage collection and compare between v17 and v11. There has been lots of changes in this area between the 2 versions. In my experience, some GC changes good for most use cases are (very) bad for some. You may be in this situation.

I am saying this because I have been in projects when some code had to be rewritten to fight adversarial GC activity (blocking) due to too much memory allocation / release in the Java classes for class and method variables. We had to minimize this activity to get back to correct performance. Form your Stackoverflow post, you seem to read / write several GBs of data. So lots of chances for similar big memory activity and GC.

So, to trace GC:

About the evolutions:



profile pictureAWS
已回答 1 年前

您尚未登入。 登入 去張貼答案。