st2 performance issues
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.5k
- Forks
- 787
- PR merge metrics
- No merged PRs in 30d
Description
SUMMARY
I used k8s to deploy st2, and now the entire workflow action is running slowly, I tried to increase the number of replicas to increase the execution speed, but it doesn't seem to help
STACKSTORM VERSION
st2 3.8.0,on Python 3.8.10
OS, environment, install method
Kubernetes
Steps to reproduce the problem
The number of pods for each of my microservices in k8s is as follows
- st2sensor 4 Pods, sensor only kafka trigger is in use, kafka has 4 partitions, so I used 4 sensor Pods.
- st2actionrunner 30 Pods
- st2workflowengine 30 pods
- st2rulesengine 30 pods
- st2scheduler 20 pods
- st2notifier 20 pods
- st2garbagecollector 1 pods , the garbage collection mechanism is as follows:
[garbagecollector]
action_executions_ttl = 3
action_executions_output_ttl = 3
trigger_instances_ttl = 3
traces_ttl = 3
rule_enforcements_ttl = 3
workflow_executions_ttl = 3
task_executions_ttl = 3
tokens_ttl = 3 - st2client 1 pods
- st2auth 2 pods
- st2api 2 pods
- st2stream 2 pods
Expected Results
Actual Results
I've looked at mongo's slow queries before, adding composite indexes to increase the query speed, and now that I see some indexes in mongo that are never used, the next step is probably to remove all unused indexes from mongo.
According to the monitoring, it seems that too few plays can be matched. Is it necessary to increase the number of Pods for st2rulesengine? Do you have any good suggestions?
Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Kubernetes deployment topology, monitoring data, and MongoDB slow-query and unused-index observations described in the issue. Compare workflow latency and play matching across the listed service replicas, then identify and validate the limiting component. Done means documenting a reproducible bottleneck and a confirmed configuration or code change that improves execution speed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kafka, kubernetes, mongodb, python
- Domain
- databases, devops, distributed-systems, performance
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100