Java 11 with Docker slow on both direct EC2 deployment and ECS deployment

0

Hi,

I am in the process of migrating our Java and Spring boot based micro-services to newer Java (Open Jdk 11/12) from 8.

When I deployed them via ECS deployment on EC2 instance (m5.xlarge), I see significant performance degradation. For a reference, the method that took 500ms with Java 8 now takes 3 seconds (with both Java 11 and 12 runtime). As a result the entire product runs slow. I also tried directly running docker container by launching it directly on EC2 instance (to rule out ECS restriction) and issue was still present.

When I run microservices locally - outside of docker - on Mac, they are fast.
When I run microservices on Linux server - inside docker same docker image- they are fast.

I tried using following two docker base images and no improvement.
https://github.com/docker-library/openjdk/blob/25c0a52bf0c70eafc6341bdb621580f4f282e1a1/12/jdk/alpine/Dockerfile
https://github.com/docker-library/openjdk/blob/258870647c5a4281c4cc81d0d17b6fd95bcf4141/11/jre/slim/Dockerfile

I tried giving them more memories, CPU shares also ran them unrestricted by launching directly on EC2, they remain slower and no obvious sign of Java related issue in JConsole.

Any help would be appreciated and if more information is needed I can provide as I have the deployment running.

Edited by: cbarad on Jan 29, 2019 7:06 AM

cbarad
asked 5 years ago572 views
1 Answer
0

The issue was with Hibernate being slow to execute database queries. Looking into the cause of that.

cbarad
answered 5 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions