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
질문됨 5년 전580회 조회
1개 답변
0

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

cbarad
답변함 5년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠