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

runtime: tests have gotten slower #48770

Closed
josharian opened this issue Oct 4, 2021 · 8 comments
Closed

runtime: tests have gotten slower #48770

josharian opened this issue Oct 4, 2021 · 8 comments
Labels
NeedsInvestigation Testing
Milestone

Comments

@josharian
Copy link
Contributor

@josharian josharian commented Oct 4, 2021

I've noticed running all.bash recently that the runtime tests are really slow and CPU intensive.

On my M1, I tried doing cd $GOROOT/runtime; go test -c; ./runtime.test -test.short with recent Go versions. The runtime tests now take almost 3x longer than 1.17.

  • Go 1.16: 6.46 real 7.76 user 2.52 sys
  • Go 1.17: 7.39 real 8.40 user 2.48 sys
  • Tip, Oct 4 '21 (9432320): 20.03 real 25.64 user 6.26 sys

The slowest at tip are:

0.50s TestCgoCrashHandler
0.58s TestCgoExternalThreadSignal
0.67s TestCgoSignalDeadlock
0.71s TestCheckPtr2
0.72s TestCgoExternalThreadSIGPROF
0.77s TestEINTR
1.00s TestCheckPtr/CheckPtrAlignmentNilPtr
1.00s TestDeferKeepAlive
1.01s TestSpuriousWakeupsNeverHangSemasleep
1.13s TestVDSO
1.38s TestCgoCCodeSIGPROF

Perhaps some of these could be shortened, skipped, or marked parallel?

@mknyszek mknyszek added NeedsInvestigation Testing labels Oct 4, 2021
@mknyszek mknyszek added this to the Go1.18 milestone Oct 4, 2021
@cuonglm
Copy link
Member

@cuonglm cuonglm commented Oct 4, 2021

Maybe related #48496

@josharian
Copy link
Contributor Author

@josharian josharian commented Oct 4, 2021

Ouch. Yes, quite possibly!

@mknyszek
Copy link
Contributor

@mknyszek mknyszek commented Nov 10, 2021

@josharian #48496 seems to have been resolved. Is this any better?

@josharian
Copy link
Contributor Author

@josharian josharian commented Nov 16, 2021

It is marginally better, but still much slower than previous releases.

  • 1.17: 7.58 real 9.83 user 2.84 sys
  • tip (f659183): 18.80 real 26.15 user 7.19 sys

Also, tip now contains log spam:

step 1
step 8
step 9
step 10
step 11
step 12
step 13
step 14
PASS

@josharian
Copy link
Contributor Author

@josharian josharian commented Nov 16, 2021

Mailed CL 364555 for the log spam.

@gopherbot
Copy link

@gopherbot gopherbot commented Nov 22, 2021

Change https://golang.org/cl/366256 mentions this issue: runtime: execute TestSpuriousWakeupsNeverHangSemasleep in parallel

gopherbot pushed a commit that referenced this issue Nov 22, 2021
This test spends most of its time sleeping and waiting on a subprocess
to sleep. It seems like a prime candidate to run in parallel, although
we may need to relax its hard-coded 2s timeout on the sleep(1)
subprocess.

For #48770

Change-Id: I4e839739fe82446615f9894c1904c87e5f3cf386
Reviewed-on: https://go-review.googlesource.com/c/go/+/366256
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
@odeke-em
Copy link
Member

@odeke-em odeke-em commented Dec 9, 2021

How are we doing here @josharian?

@josharian
Copy link
Contributor Author

@josharian josharian commented Dec 9, 2021

Looks fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Testing
Projects
None yet
Development

No branches or pull requests

5 participants