From 1c582b1c44e01b0d1ca8640e2e5d5a51e13cea54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=86=A1=EC=98=81=EB=AF=BC=20=28YeongMin=20Song=29?= Date: Wed, 18 Dec 2024 21:31:19 +0900 Subject: [PATCH] feat: optimize memory --- api-gateway/build.gradle.kts | 6 ++++-- photo-service/build.gradle.kts | 6 ++++-- user-service/build.gradle.kts | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/api-gateway/build.gradle.kts b/api-gateway/build.gradle.kts index e271149..e23a53f 100644 --- a/api-gateway/build.gradle.kts +++ b/api-gateway/build.gradle.kts @@ -73,8 +73,10 @@ jib { "-XX:+UnlockExperimentalVMOptions", "-XX:+UseContainerSupport", "-XX:+UseG1GC", - "-XX:InitialHeapSize=1g", - "-XX:MaxHeapSize=1g", + "-Xms1500M", + "-Xmx3G", + "-XX:MaxRAMPercentage=80", + "-XX:MaxGCPauseMillis=200", "-XX:+DisableExplicitGC", // System.gc() 방어 "-server", ) diff --git a/photo-service/build.gradle.kts b/photo-service/build.gradle.kts index cda793e..0b5474c 100644 --- a/photo-service/build.gradle.kts +++ b/photo-service/build.gradle.kts @@ -70,8 +70,10 @@ jib { "-XX:+UnlockExperimentalVMOptions", "-XX:+UseContainerSupport", "-XX:+UseG1GC", - "-XX:InitialHeapSize=1g", - "-XX:MaxHeapSize=1g", + "-Xms1500M", + "-Xmx3G", + "-XX:MaxRAMPercentage=80", + "-XX:MaxGCPauseMillis=200", "-XX:+DisableExplicitGC", // System.gc() 방어 "-server", ) diff --git a/user-service/build.gradle.kts b/user-service/build.gradle.kts index caa2d23..e88d69c 100644 --- a/user-service/build.gradle.kts +++ b/user-service/build.gradle.kts @@ -88,8 +88,10 @@ jib { "-XX:+UnlockExperimentalVMOptions", "-XX:+UseContainerSupport", "-XX:+UseG1GC", - "-XX:InitialHeapSize=1g", - "-XX:MaxHeapSize=1g", + "-Xms1500M", + "-Xmx3G", + "-XX:MaxRAMPercentage=80", + "-XX:MaxGCPauseMillis=200", "-XX:+DisableExplicitGC", // System.gc() 방어 "-server", )