跳至内容

压力测试

安装 gcloud 二进制文件。

# 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. 查看正在发起的Kubernetes API请求数量。每次协调过程中您会看到约一个Update workflows操作,多个Create pods操作。每个工作流首次协调时应该会看到一个Get workflowtemplates操作。如果发现其他异常请求,则可能存在问题。
  2. 记录了多少错误?log_messages{level="error"} 原因是什么?

检查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

清理

gcloud container clusters delete argo-workflows-stress-1

有问题吗?

Search on GitHub Discussions and Slack.