Skip to content

WIP (do not merge): Performance test for zlib-ng-compat #75732

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

Closed

Conversation

joshtriplett
Copy link
Member

Test PR for a perf run with zlib-ng-compat. rustc uses flate2 to
compress and decompress metadata (and in some cases LLVM bytecode), and
it's worth evaluating the potential performance improvement here. This
would require more care (and a config.toml setting) to do properly.

@rust-highfive
Copy link
Contributor

r? @Mark-Simulacrum

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 20, 2020
@joshtriplett
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion

@bors
Copy link
Collaborator

bors commented Aug 20, 2020

⌛ Trying commit 08e06af56c96cb72fc04627437c6a278396c8a74 with merge 86b2c01be5672069ae4742dc7330133e9acb017c...

@rust-log-analyzer
Copy link
Collaborator

The job dist-x86_64-linux of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
   Compiling compiler_builtins v0.1.32
   Compiling unwind v0.0.0 (/checkout/library/unwind)
   Compiling profiler_builtins v0.0.0 (/checkout/library/profiler_builtins)
   Compiling rustc-std-workspace-core v1.99.0 (/checkout/library/rustc-std-workspace-core)
error: cannot find derive macro `Copy` in this scope
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.75/src/unix/linux_like/linux/gnu/mod.rs:320:18
    |
320 |         #[derive(Copy,Clone)]


error: cannot find derive macro `Clone` in this scope
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.75/src/unix/linux_like/linux/gnu/mod.rs:320:23
    |
320 |         #[derive(Copy,Clone)]


error[E0658]: unions with non-`Copy` fields are unstable
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.75/src/unix/linux_like/linux/gnu/mod.rs:331:9
331 | /         union sifields {
331 | /         union sifields {
332 | |             _align_pointer: *mut ::c_void,
333 | |             sigchld: sifields_sigchld,
    | |_________^
    |
    |
    = note: see issue #55149 <https://github.com/rust-lang/rust/issues/55149> for more information
    = help: add `#![feature(untagged_unions)]` to the crate attributes to enable
error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0658`.
For more information about this error, try `rustc --explain E0658`.
error: could not compile `libc`.
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
error: build failed
command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "16" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace profiler compiler-builtins-c" "--manifest-path" "/checkout/library/test/Cargo.toml" "--message-format" "json-render-diagnostics"
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap dist --host x86_64-unknown-linux-gnu --target x86_64-unknown-linux-gnu
Build completed unsuccessfully in 0:01:35
== clock drift check ==
  local time: Thu Aug 20 05:17:50 UTC 2020
  local time: Thu Aug 20 05:17:50 UTC 2020
  network time: Thu, 20 Aug 2020 05:17:50 GMT
== end clock drift check ==
##[error]Process completed with exit code 1.
Terminate orphan process: pid (6225) (python)

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@bors
Copy link
Collaborator

bors commented Aug 20, 2020

💔 Test failed - checks-actions

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 20, 2020
@joshtriplett joshtriplett force-pushed the wip-perf-test-zlib-ng branch from 08e06af to b86161b Compare August 20, 2020 05:22
@joshtriplett
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion

@bors
Copy link
Collaborator

bors commented Aug 20, 2020

⌛ Trying commit b86161b1e88045064177caeeb71cb1117a329517 with merge 0991e982415f7bc29d102f3268e50132d3367d84...

@rust-log-analyzer
Copy link
Collaborator

The job dist-x86_64-linux of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
   Compiling compiler_builtins v0.1.32
   Compiling unwind v0.0.0 (/checkout/library/unwind)
   Compiling profiler_builtins v0.0.0 (/checkout/library/profiler_builtins)
   Compiling rustc-std-workspace-core v1.99.0 (/checkout/library/rustc-std-workspace-core)
error: cannot find derive macro `Copy` in this scope
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.75/src/unix/linux_like/linux/gnu/mod.rs:320:18
    |
320 |         #[derive(Copy,Clone)]


error: cannot find derive macro `Clone` in this scope
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.75/src/unix/linux_like/linux/gnu/mod.rs:320:23
    |
320 |         #[derive(Copy,Clone)]


error[E0658]: unions with non-`Copy` fields are unstable
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.75/src/unix/linux_like/linux/gnu/mod.rs:331:9
331 | /         union sifields {
331 | /         union sifields {
332 | |             _align_pointer: *mut ::c_void,
333 | |             sigchld: sifields_sigchld,
    | |_________^
    |
    |
    = note: see issue #55149 <https://github.com/rust-lang/rust/issues/55149> for more information
    = help: add `#![feature(untagged_unions)]` to the crate attributes to enable
error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0658`.
For more information about this error, try `rustc --explain E0658`.
error: could not compile `libc`.
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
error: build failed
command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "16" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace profiler compiler-builtins-c" "--manifest-path" "/checkout/library/test/Cargo.toml" "--message-format" "json-render-diagnostics"
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap dist --host x86_64-unknown-linux-gnu --target x86_64-unknown-linux-gnu
Build completed unsuccessfully in 0:01:42
== clock drift check ==
  local time: Thu Aug 20 05:28:30 UTC 2020
  local time: Thu Aug 20 05:28:30 UTC 2020
  network time: Thu, 20 Aug 2020 05:28:30 GMT
== end clock drift check ==
##[error]Process completed with exit code 1.
Terminate orphan process: pid (6461) (python)

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@bors
Copy link
Collaborator

bors commented Aug 20, 2020

💔 Test failed - checks-actions

@joshtriplett joshtriplett force-pushed the wip-perf-test-zlib-ng branch from b86161b to b8e3e0b Compare August 20, 2020 07:24
@joshtriplett
Copy link
Member Author

Evidently zlib-ng requires a newer cmake than the one from the version of mingw we're using. This experiment will need to wait until we update mingw cmake.

@mati865
Copy link
Contributor

mati865 commented Aug 20, 2020

MinGW does not provide CMake. The builder used CMake 3.10.2 because that's what Ubuntu 18.04 provides as cmake package.

@mati865
Copy link
Contributor

mati865 commented Aug 20, 2020

@joshtriplett I've reported that build error to the upstream: zlib-ng/zlib-ng#729
This bug will affect only cross-compiling images like mingw-check and some of the Docker jobs but you can still get the performance numbers in this PR.

@joshtriplett joshtriplett reopened this Aug 20, 2020
@joshtriplett
Copy link
Member Author

@mati865 Thanks! Worth a try, then.

@joshtriplett
Copy link
Member Author

joshtriplett commented Aug 20, 2020

@bors try @rust-timer queue

@bors
Copy link
Collaborator

bors commented Aug 20, 2020

⌛ Trying commit b8e3e0b with merge 69677eb315b30092708001efd2ee7aa01465e749...

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion

@bors
Copy link
Collaborator

bors commented Aug 20, 2020

⌛ Trying commit b8e3e0b with merge 101b1b679086e6a473cf43f6b3876b2376bc83f9...

@rust-log-analyzer
Copy link
Collaborator

Your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@bors
Copy link
Collaborator

bors commented Aug 20, 2020

☀️ Try build successful - checks-actions, checks-azure
Build commit: 101b1b679086e6a473cf43f6b3876b2376bc83f9 (101b1b679086e6a473cf43f6b3876b2376bc83f9)

@rust-timer
Copy link
Collaborator

Queued 101b1b679086e6a473cf43f6b3876b2376bc83f9 with parent 5fff382, future comparison URL.

@joshtriplett
Copy link
Member Author

Looking at the binaries, it looks like they're still getting linked to system libz through LLVM, so this may not give accurate results.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit (101b1b679086e6a473cf43f6b3876b2376bc83f9): comparison url.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying rollup- to bors.

Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up.

@bors rollup=never

@joshtriplett
Copy link
Member Author

Not bad! Zero regressions, tiny improvements across the board, a few larger improvements.

We'd likely get even more improvement by switching to an even faster compression format, like lz4 or snappy. But this test shows that there's performance to be gained.

@joshtriplett joshtriplett deleted the wip-perf-test-zlib-ng branch April 29, 2021 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants