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

0

Hi

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
jtm
feita há 10 meses682 visualizações
2 Respostas
0
Resposta aceita

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
respondido há 10 meses
  • JAVA_TOOL_OPTIONS should be set to -XX:-TieredCompilation for same tiered compilation setting as in java11

0

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: https://aws.amazon.com/blogs/architecture/field-notes-monitoring-the-java-virtual-machine-garbage-collection-on-aws-lambda/

About the evolutions: https://blogs.oracle.com/javamagazine/post/java-garbage-collectors-evolution

Best,

Didier

profile pictureAWS
ESPECIALISTA
respondido há 10 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas