본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

스트레스 테스트 (Stress Testing)

원문 보기 위키 갱신

gcloud 바이너리를 설치합니다.

출처: Argo Workflows 문서

본문

# Login to GCP:
gcloud auth login

# Set-up your config (if needed):
gcloud config set project alex-sb

# Create a cluster (default region is us-west-2, if you're not in west of the USA, you might want at different region):
gcloud container clusters create-auto argo-workflows-stress-1

# Get credentials:
gcloud container clusters get-credentials argo-workflows-stress-1                             

# Install workflows (If this fails, try running it again):
make start PROFILE=stress

# Make sure pods are running:
kubectl get deployments

# Run a test workflow:
argo submit examples/hello-world.yaml --watch

확인 사항

go run ./test/stress/tool -n 10000을 실행하면 대량의 워크플로를 실행합니다.

Prometheus 확인:

  1. 얼마나 많은 쿠버네티스 API 요청이 만들어지는지 봅니다. 리컨실레이션(reconciliation)당 하나의 Update workflows, 여러 개의 Create pods가 보일 것입니다. 워크플로당 하나의 Get workflowtemplates가 보여야 합니다(첫 리컨실레이션에서 수행). 그 외의 것이 보인다면 문제일 수 있습니다.
  2. 얼마나 많은 에러가 기록되었나요? log_messages{level="error"} 원인은 무엇이었나요?

핫스팟(hot spot)이 있는지 PProf로 확인합니다:

go tool pprof -png http://localhost:6060/debug/pprof/allocs
go tool pprof -png http://localhost:6060/debug/pprof/heap
go tool pprof -png http://localhost:6060/debug/pprof/profile

정리 (Clean-up)

gcloud container clusters delete argo-workflows-stress-1

더 알아보기 (Learn more)

  • 스트레스 테스트에서는 API 요청 패턴(Update workflows, Create pods, Get workflowtemplates)과 에러 로그 수가 핵심 관찰 지표입니다.
  • pprof의 allocs/heap/profile 엔드포인트로 컨트롤러의 메모리·CPU 핫스팟을 시각화할 수 있습니다.