Code Monkey home page Code Monkey logo

Comments (3)

meven avatar meven commented on July 30, 2024 1

inferno-collapse-perf-origin is vanilla inferno
inferno-collapse-perf is using jemalloc

Using Jemalloc is most of the time faster but not significantly.

Benchmark #1: target/release/inferno-collapse-perf-origin --all ./flamegraph/test/perf-iperf-stacks-pidtid-01.txt
  Time (mean ± σ):       4.4 ms ±   1.7 ms    [User: 3.6 ms, System: 0.8 ms]
  Range (min … max):     2.3 ms …  12.0 ms    314 runs
 
  Warning: Command took less than 5 ms to complete. Results might be inaccurate.
 
Benchmark #2: target/release/inferno-collapse-perf --all ./flamegraph/test/perf-iperf-stacks-pidtid-01.txt
  Time (mean ± σ):       4.4 ms ±   1.7 ms    [User: 3.4 ms, System: 1.0 ms]
  Range (min … max):     2.5 ms …  16.0 ms    592 runs
 
  Warning: Command took less than 5 ms to complete. Results might be inaccurate.
  Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet PC without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.
 
Summary
  'target/release/inferno-collapse-perf --all ./flamegraph/test/perf-iperf-stacks-pidtid-01.txt' ran
    1.01 ± 0.55 times faster than 'target/release/inferno-collapse-perf-origin --all ./flamegraph/test/perf-iperf-stacks-pidtid-01.txt'


==>  ./flamegraph/test/perf-java-stacks-01.txt  <==
Benchmark #1: target/release/inferno-collapse-perf-origin --all ./flamegraph/test/perf-java-stacks-01.txt
  Time (mean ± σ):       2.5 ms ±   0.9 ms    [User: 2.0 ms, System: 0.5 ms]
  Range (min … max):     1.5 ms …   9.3 ms    925 runs
 
  Warning: Command took less than 5 ms to complete. Results might be inaccurate.
  Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet PC without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.
 
Benchmark #2: target/release/inferno-collapse-perf --all ./flamegraph/test/perf-java-stacks-01.txt
  Time (mean ± σ):       2.3 ms ±   0.9 ms    [User: 1.8 ms, System: 0.5 ms]
  Range (min … max):     1.5 ms …   8.8 ms    857 runs
 
  Warning: Command took less than 5 ms to complete. Results might be inaccurate.
  Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet PC without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.
 
Summary
  'target/release/inferno-collapse-perf --all ./flamegraph/test/perf-java-stacks-01.txt' ran
    1.11 ± 0.59 times faster than 'target/release/inferno-collapse-perf-origin --all ./flamegraph/test/perf-java-stacks-01.txt'


==>  ./flamegraph/test/perf-numa-stacks-01.txt  <==
Benchmark #1: target/release/inferno-collapse-perf-origin --all ./flamegraph/test/perf-numa-stacks-01.txt
  Time (mean ± σ):       2.4 ms ±   0.8 ms    [User: 2.1 ms, System: 0.4 ms]
  Range (min … max):     1.8 ms …  19.2 ms    736 runs
 
  Warning: Command took less than 5 ms to complete. Results might be inaccurate.
  Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet PC without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.
 
Benchmark #2: target/release/inferno-collapse-perf --all ./flamegraph/test/perf-numa-stacks-01.txt
  Time (mean ± σ):       2.3 ms ±   0.4 ms    [User: 2.0 ms, System: 0.4 ms]
  Range (min … max):     2.0 ms …   7.1 ms    808 runs
 
  Warning: Command took less than 5 ms to complete. Results might be inaccurate.
  Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet PC without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.
 
Summary
  'target/release/inferno-collapse-perf --all ./flamegraph/test/perf-numa-stacks-01.txt' ran
    1.04 ± 0.41 times faster than 'target/release/inferno-collapse-perf-origin --all ./flamegraph/test/perf-numa-stacks-01.txt'


==>  ./flamegraph/test/perf-rust-Yamakaky-dcpu.txt  <==
Benchmark #1: target/release/inferno-collapse-perf-origin --all ./flamegraph/test/perf-rust-Yamakaky-dcpu.txt
  Time (mean ± σ):       1.7 ms ±   0.6 ms    [User: 1.4 ms, System: 0.3 ms]
  Range (min … max):     1.2 ms …   5.5 ms    896 runs
 
  Warning: Command took less than 5 ms to complete. Results might be inaccurate.
  Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet PC without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.
 
Benchmark #2: target/release/inferno-collapse-perf --all ./flamegraph/test/perf-rust-Yamakaky-dcpu.txt
  Time (mean ± σ):       1.8 ms ±   0.5 ms    [User: 1.5 ms, System: 0.3 ms]
  Range (min … max):     1.3 ms …   7.3 ms    1339 runs
 
  Warning: Command took less than 5 ms to complete. Results might be inaccurate.
  Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet PC without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.
 
Summary
  'target/release/inferno-collapse-perf-origin --all ./flamegraph/test/perf-rust-Yamakaky-dcpu.txt' ran
    1.06 ± 0.48 times faster than 'target/release/inferno-collapse-perf --all ./flamegraph/test/perf-rust-Yamakaky-dcpu.txt'


==>  ./flamegraph/test/perf-vertx-stacks-01.txt  <==
Benchmark #1: target/release/inferno-collapse-perf-origin --all ./flamegraph/test/perf-vertx-stacks-01.txt
  Time (mean ± σ):       9.0 ms ±   1.7 ms    [User: 8.2 ms, System: 0.8 ms]
  Range (min … max):     7.9 ms …  18.7 ms    249 runs
 
  Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet PC without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.
 
Benchmark #2: target/release/inferno-collapse-perf --all ./flamegraph/test/perf-vertx-stacks-01.txt
  Time (mean ± σ):       8.5 ms ±   1.4 ms    [User: 7.7 ms, System: 0.8 ms]
  Range (min … max):     7.6 ms …  17.6 ms    341 runs
 
  Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet PC without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.
 
Summary
  'target/release/inferno-collapse-perf --all ./flamegraph/test/perf-vertx-stacks-01.txt' ran
    1.06 ± 0.26 times faster than 'target/release/inferno-collapse-perf-origin --all ./flamegraph/test/perf-vertx-stacks-01.txt'

from inferno.

masklinn avatar masklinn commented on July 30, 2024 1

Thanks for the check work @meven. The "gains" when they appear at all seem mostly irrelevant and insignificant, making the original suggestion irrelevant.

I won't close the issue as @jonhoo renamed it to something more useful, but either way the jemalloc track can safely be ignored.

from inferno.

jonhoo avatar jonhoo commented on July 30, 2024

I wish we were as careful with allocations in collapse-perf as we are in flamegraph following #37, but I think it's actually a fair bit trickier there since we really do need to allocate for each distinct function name. We should be able to avoid allocations for repeated function names though; probably by keeping a single string that we write the "current" function name into, and then only copy that to its own string if we discover that we need to stick it in the stack count map.

In any case, yes, jemalloc might help a decent amount here. That said, I'd prefer to just get rid of those allocations altogether. And given that collapse-perf is now faster than perf script, it's not clear to me that we're in any rush to squeeze out that performance. :p Seeing jemalloc results would certainly be interesting and tell us how important getting rid of those allocations is though!

from inferno.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.