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

Performance triage for JVM smoketest #13779

Closed
stuhood opened this issue Dec 2, 2021 · 5 comments
Closed

Performance triage for JVM smoketest #13779

stuhood opened this issue Dec 2, 2021 · 5 comments
Assignees

Comments

@stuhood
Copy link
Member

stuhood commented Dec 2, 2021

Before recommending that users use the new backend, we'd like to ensure that they get a good first impression. We should do a few days of performance triage to set a bar and identify potential problem areas to fix during M2.

@stuhood
Copy link
Member Author

stuhood commented Dec 3, 2021

Opened #13787 and #13788 after an initial round of profiling.

Because #13787 causes a fair amount of unnecessary IO, it will likely muddy actual profiling of the JVMs being launched... but that's probably the next step. The actual sandbox creation time (see #13787) isn't horrible, but that's likely because the repository we're testing with is fairly small.

I'd also like to get a ballpark for how much total compilation time sbt sees for the test repo, so we can know where we stand.

@stuhood stuhood self-assigned this Dec 3, 2021
@stuhood
Copy link
Member Author

stuhood commented Dec 3, 2021

I'd also like to get a ballpark for how much total compilation time sbt sees for the test repo, so we can know where we stand.

I've done some comparison here and... there is work to do! No surprise there, but fixing (at least) both of the above issues will be necessary to get to a better baseline.

My very rough comparison involved:

  • For sbt, twice in a row:
    1. git clean -fdx
    2. start an sbt --timings shell
    3. time a run of compile
  • For pants, twice in a row:
    1. git clean -fdx
    2. run ./pants --no-local-cache dependencies :: to prime pantsd with analysis
      • this is slightly apples-to-oranges, since this is more work than sbt does to start a shell. but the analysis is very cacheable, so including it in the run (even a cold run) is arguably not valid
    3. time a run of ./pants --no-local-cache check ::

@stuhood
Copy link
Member Author

stuhood commented Dec 3, 2021

Also obvious in here is that in macOS we're running afoul of xprotect (it keeps one core busy): I expect that we are repeatedly re-fingerprinting the coursier binary (but haven't confirmed). #12716 would help with that by creating it once.

EDIT: Yea, confirmed. And this also affects fetching artifacts with coursier (such that each fetch first applies xprotect to coursier, adding 3 or 4 seconds).

@stuhood
Copy link
Member Author

stuhood commented Dec 6, 2021

With the above two issues addressed, I did a bit of profiling of the JVMs for javac and scalac, and was able to confirm that a significant fraction of their runtime is currently being spent on IO. So I expect that both to resolve the xprotect issue mentioned above, and to reduce IO contention in general, we should implement #12716.

@stuhood
Copy link
Member Author

stuhood commented Dec 6, 2021

Going to call this complete. #13435 is the JVM-specific ticket for #12716 and any other remediation that we might need to do here. Will add additional details there.

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

No branches or pull requests

1 participant