-
Notifications
You must be signed in to change notification settings - Fork 0
fix: k6 테스트 버그 수정 및 메모리 한도 상향 #129
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. 부하 테스트 중 에러가 발생할 때 모든 실패 요청에 대해 고부하(High Load) 상황에서 수많은 요청이 실패할 경우, 매 요청마다 콘솔 로그를 출력하는 작업은 k6 실행 엔진의 성능을 심각하게 저하시키고 응답 시간(Response Time) 메트릭을 왜곡시킬 수 있습니다. 또한 디스크 I/O 부하 및 로그 파일 크기 폭발을 유발할 수 있습니다. 권장사항:
Suggested change
|
||||||
| 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.
현재
app서비스의 메모리 제한을1000M으로 상향하셨습니다. 하지만 10라인의 주석(# t3.small 메모리 한도 고려한 app 한도...)은 여전히600M으로 기재되어 있어 실제 설정값과 일치하지 않습니다.또한, 이 파일에 정의된 모든 서비스의 메모리 제한 합계(App 1000M, Prometheus 800M, Kafka 600M, Grafana 300M, Loki 300M, Redis 200M, Promtail 200M 등)가 약 3.48GB에 달합니다. 만약 실제 배포 환경이 주석에 언급된
t3.small(메모리 2GB) 인스턴스라면, 부하 테스트 진행 시 물리 메모리 부족으로 인해 호스트 OS 레벨에서 OOM Killer가 작동하여 컨테이너나 도커 데몬이 강제 종료될 위험이 매우 높습니다.권장사항:
t3.small환경을 유지해야 한다면 전체 서비스의 메모리 제한 합계를 2GB 이하로 조정하거나, 부하 테스트를 원활히 수행하기 위해 인스턴스 스펙을 최소t3.medium(4GB) 이상으로 업그레이드하는 것을 검토해 주세요.