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

Revise heuristic for initial jitting. #1949

Merged

Conversation

AndyAyersMS
Copy link
Member

Increase the magic limit to 10s per #1780.

Also use the "1.5" criteria for retry so we don't have odd threshold
where initial jitting is a bit faster than IterationTime but not fast
enough to trigger the multi action engine.

Increase the magic limit to 10s per dotnet#1780.

Also use the "1.5" criteria for retry so we don't have odd threshold
where initial jitting is a bit faster than IterationTime but not fast
enough to trigger the multi action engine.
@AndyAyersMS
Copy link
Member Author

I get some local test failures so this may be missing something. Still evaluating this locally to make sure it does what I expect.

@AndyAyersMS
Copy link
Member Author

AndyAyersMS commented Mar 18, 2022

Looks like this does what I'd expect.

On one problematic test, the initial jitting for OSR is 208 ms, iteration time is 250 ms, and so with the change in this PR, we give it one more try, see it is actually much shorter, pick a reasonable number of iterations. MAIN is slower so gets a retry w/o these changes.

;; MAIN
OverheadJitting  1: 1 op, 204700.00 ns, 204.7000 us/op
WorkloadJitting  1: 1 op, 288439300.00 ns, 288.4393 ms/op

OverheadJitting  2: 1 op, 200.00 ns, 200.0000 ns/op
WorkloadJitting  2: 1 op, 2278100.00 ns, 2.2781 ms/op

;; OSR
OverheadJitting  1: 1 op, 199700.00 ns, 199.7000 us/op
WorkloadJitting  1: 1 op, 208746600.00 ns, 208.7466 ms/op

OverheadJitting  2: 1 op, 200.00 ns, 200.0000 ns/op
WorkloadJitting  2: 1 op, 2246500.00 ns, 2.2465 ms/op
Method Job Toolchain ssl chunkedResponse responseLength Mean Error StdDev Median Min Max Ratio Gen 0 Allocated Alloc Ratio
Get Job-ENNAQT \main-rel\corerun.exe True False 1 97.08 us 1.125 us 1.052 us 96.94 us 95.61 us 99.13 us 1.00 0.3858 2.6 KB 1.00
Get Job-BKYUPI \osr-rel\corerun.exe True False 1 96.73 us 0.674 us 0.563 us 96.92 us 95.46 us 97.44 us 1.00 - 2.6 KB 1.00

Default behavior w/o the change -- no retry for OSR, OSR looks like it has a massive regression, but we're not comparing apples to apples.

;; OSR
OverheadJitting  1: 1 op, 197300.00 ns, 197.3000 us/op
WorkloadJitting  1: 1 op, 220702800.00 ns, 220.7028 ms/op

WorkloadWarmup   1: 1 op, 2132400.00 ns, 2.1324 ms/op

// BeforeActualRun
WorkloadActual   1: 1 op, 305700.00 ns, 305.7000 us/op
Method Job Toolchain ssl chunkedResponse responseLength Mean Error StdDev Median Min Max Ratio RatioSD Gen 0 Allocated Alloc Ratio
Get Job-DCYPEV \main-rel\corerun.exe True False 1 95.43 us 0.532 us 0.415 us 95.52 us 94.67 us 95.93 us 1.00 0.00 0.3906 2.6 KB 1.00
Get Job-OJSKBX \osr-rel\corerun.exe True False 1 214.75 us 53.592 us 61.717 us 195.30 us 135.10 us 315.20 us 2.63 0.57 - 3.68 KB 1.41

Copy link
Member

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

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

LGTM, thanks a lot @AndyAyersMS !

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