-
Notifications
You must be signed in to change notification settings - Fork 0
fix: k6 테스트 버그 수정 및 메모리 한도 상향 #128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,7 +61,7 @@ export const options = { | |
| }; | ||
|
|
||
| const CATEGORIES = ['KOREAN', 'JAPANESE', 'CHINESE', 'WESTERN', 'CAFE']; | ||
| const DISTRICTS = ['강남구', '마포구', '종로구', '용산구', '성동구']; | ||
| const DISTRICTS = ['GANGNAM', 'MAPO', 'JONGNO', 'YONGSAN', 'SEONGDONG']; | ||
|
|
||
| export default function () { | ||
| const isSpike = exec.scenario.name === 'event_spike'; | ||
|
|
@@ -87,6 +87,7 @@ export default function () { | |
| '목록 조회 200': (r) => r.status === 200, | ||
| '응답 body 존재': (r) => r.body && r.body.length > 0, | ||
| }); | ||
| if (!ok) console.log(`[ERROR] status=${res.status} url=${url} body=${res.body?.substring(0, 200)}`); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 부하 테스트(k6) 실행 중 에러가 발생할 때마다 고부하(High Load) 상황이나 일시적인 장애로 인해 에러율이 높아질 경우, 매 요청마다 발생하는 콘솔 I/O가 k6 실행 엔진의 병목 지점이 되어 CPU 사용량을 급증시키고 실제 응답 시간(Latency) 측정 결과를 왜곡할 수 있습니다. 개선 제안: if (!ok && Math.random() < 0.1) console.log(\`[ERROR] (Sampled 10%) status=\${res.status} url=\${url} body=\${res.body?.substring(0, 200)}\`); |
||
| errorRate.add(!ok); | ||
| }); | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
현재
docker-compose.prod.yml에 설정된 모든 서비스의 메모리 제한(Limit) 합계가 약 3.48GB(app 1000M, prometheus 800M, kafka 600M, loki 300M 등)로 크게 증가했습니다.기존 10라인 주석에 언급된
t3.small인스턴스는 물리 메모리가 2GB에 불과하므로, 이 설정을 그대로 적용하면 물리 메모리 고갈로 인해 호스트 OS의 OOM Killer가 작동하여 컨테이너가 강제 종료될 위험이 매우 높습니다.권장 사항:
t3.medium(4GB RAM) 이상으로 상향 조정하는 것을 검토해 주세요.t3.small을 유지해야 한다면, 각 컴포넌트의 메모리 제한을 다시 최적화하고 불필요한 모니터링 컴포넌트의 리소스 할당을 줄여야 합니다.