Skip to content

Profile-Guided Optimization (PGO) benchmark results #195

Open
@zamazan4ik

Description

@zamazan4ik

Hi!

Since the library cares a lot (according to the README) about performance, I decided to apply Profile-Guided Optimization (PGO) on it (as I already did for many other applications - check my GitHub repo). Hope the results will be interesting for someone.

Test environment

  • Fedora 39
  • Linux kernel 6.6.13
  • AMD Ryzen 9 5900x
  • 48 Gib RAM
  • SSD Samsung 980 Pro 2 Tib
  • Compiler - Rustc 1.75
  • minitrace-rust version: the latest for now from the master branch on commit ee49263f56ebbe038ca70377166d319fdb170601
  • Disabled Turbo boost (for more stable results across benchmark runs)

Benchmark

Built-in benchmarks are invoked with cargo bench --all-features --workspace. PGO instrumentation phase on benchmarks is done with cargo pgo bench -- --all-features --workspace. PGO optimization phase is done with cargo pgo optimize bench -- --all-features --workspace.

All PGO optimization steps are done with cargo-pgo tool.

Results

I got the following results:

At least in the provided by the project benchmarks, I see measurable performance improvements in many cases.

Possible further steps

I can suggest the following things to consider:

  • Perform more PGO benchmarks in other scenarios. If it shows improvements - add a note to the documentation about possible improvements in the tracing library performance with PGO (I guess somewhere in the README file will be enough).

I will be happy to answer all your questions about PGO.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions