Skip to content
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

Matching simulation improvements #6224

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

natemort
Copy link
Member

Fix sync matching by increasing the deadline for AddDecisionTask. Sync matching subtracts 1 second from the deadline to determine how long to spend sync matching, and with a deadline of 0.5 seconds it immediately times out.

Add support for parameterizing the configuration file to use. This will allow us to have several scenarios that we evaluate any matching changes against.

Rather than running for a fixed time, run until the expected number of tasks have been consumed. This allows for the benchmark to be used as a measure of throughput and also makes it run faster for short lived scenarios.

What changed?

  • Add additional options to the matching simulator

Why?

  • Allows us to better test changes to matching.

How did you test it?

  • ./scripts/run_matching_simulator.sh
  • ./scripts/run_matching_simulator.sh burst

Potential risks

Release notes

Documentation Changes

Copy link

codecov bot commented Aug 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.87%. Comparing base (de281a6) to head (cdc57be).

Additional details and impacted files

see 6 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update de281a6...cdc57be. Read the comment docs.

@@ -176,31 +181,35 @@ func (s *MatchingSimulationSuite) TestMatchingSimulation() {
numPollers := getNumPollers(s.testClusterConfig.MatchingConfig.SimulationConfig.NumPollers)
pollDuration := getPollDuration(s.testClusterConfig.MatchingConfig.SimulationConfig.PollTimeout)
polledTasksCounter := int32(0)
maxTasksToGenerate := getMaxTaskstoGenerate(s.testClusterConfig.MatchingConfig.SimulationConfig.MaxTaskToGenerate)
var tasksToReceive sync.WaitGroup
tasksToReceive.Add(maxTasksToGenerate)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simulation runs for 180s at most (timeout set here) and maxTasksToGenerate might not be hit if it's set too high. please add a comment in the test code here about this to help identify "simulation is stuck" cases due to misconfiguration

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks.

taskgeneratortickinterval: 10ms
maxtasktogenerate: 1500
polltimeout: 5s
forwardermaxoutstandingpolls: 20
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the default setting in prod is 1

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just adding this as an example for now, I'll be adding a full suite that we can use to validate it.

Fix sync matching by increasing the deadline for AddDecisionTask. Sync matching subtracts 1 second from the deadline to determine how long to spend sync matching, and with a deadline of 0.5 seconds it immediately times out.

Add support for parameterizing the configuration file to use. This will allow us to have several scenarios that we evaluate any matching changes against.

Rather than running for a fixed time, run until the expected number of tasks have been consumed. This allows for the benchmark to be used as a measure of throughput and also makes it run faster for short lived scenarios.
@natemort natemort merged commit e7bd499 into cadence-workflow:master Aug 13, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants