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

ARROW-3016: [Docs][C++] Memory profiling with perf #12307

Closed

Conversation

wjones127
Copy link
Member

Put together some scripts and an example for using perf to understand memory allocations in an Arrow C++ program.

@github-actions
Copy link

Comment on lines 458 to 461
https://www.maartenbreddels.com/perf/jupyter/python/tracing/gil/2021/01/14/Tracing-the-Python-GIL.html
https://jvns.ca/linux-tracing-zine.pdf
https://jvns.ca/perf-zine.pdf
https://www.brendangregg.com/blog/2015-06-28/linux-ftrace-uprobe.html
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe put these in a bulleted list? (I think these render as just a paragraph right now)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'm just dropping these since this isn't meant to be a perf tutorial.

-e probe_libarrow:je_arrow_dallocx \
./arrow-array-test --gtest_filter=StructArray*

.. TODO: What are the equivalent probe calls for mimalloc and system allocator?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs/source/cpp/memory.rst Outdated Show resolved Hide resolved
@wjones127 wjones127 force-pushed the ARROW-3016-memory-profile-docs branch from 0fbe29d to ecab113 Compare February 1, 2022 23:37
@wjones127 wjones127 marked this pull request as ready for review February 2, 2022 20:06
Copy link
Member

@lidavidm lidavidm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is pretty slick. Just two nits.

alias perf=/usr/lib/linux-tools/<version-path>/perf


To track allocations, create probe points on each of the jemalloc methods used.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jemalloc -> allocator?

docs/source/cpp/memory.rst Show resolved Hide resolved
@wjones127
Copy link
Member Author

Thanks, this is pretty slick. Just two nits.

Well the commands you provided earlier help me get unstuck on learning how to use perf probes, so thank you @lidavidm! 🙏

@lidavidm lidavidm closed this in 5ab4112 Feb 3, 2022
@ursabot
Copy link

ursabot commented Feb 3, 2022

Benchmark runs are scheduled for baseline = 7d34a7c and contender = 5ab4112. 5ab4112 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Failed ⬇️0.36% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.3% ⬆️0.61%] ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python. Runs only benchmarks with cloud = True
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

@wjones127 wjones127 deleted the ARROW-3016-memory-profile-docs branch February 3, 2022 15:26
vibhatha pushed a commit to vibhatha/arrow that referenced this pull request Feb 4, 2022
Put together some scripts and an example for using perf to understand memory allocations in an Arrow C++ program.

Closes apache#12307 from wjones127/ARROW-3016-memory-profile-docs

Authored-by: Will Jones <willjones127@gmail.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
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

Successfully merging this pull request may close these issues.

None yet

3 participants