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

release-20.2: sql/rowexec: don't allocate buf per row in sketchInfo.addRow #58197

Merged

Conversation

nvanbenschoten
Copy link
Member

Backport 1/1 commits from #58117.

/cc @cockroachdb/release


The intbuf array was meant to stay on the stack, but was escaping to the heap because the call through the hash function variable was opaque to escape analysis.

At the end of a 4 hour, 2.2 TB IMPORT of TPC-E, this was responsible for 76.70% of all heap allocations (by object).

Screen Shot 2020-12-20 at 9 58 04 PM

Release note (performance improvement): SQL statistics collection has been made more efficient by avoiding an accidental heap allocation per row for some schemas.

The `intbuf` array was meant to stay on the stack, but was escaping
to the heap because the call through the `hash` function variable was
opaque to escape analysis.

At the end of a 4 hour, 2.2 TB IMPORT of TPC-E, this was responsible
for **76.70%** of all heap allocations.

Release note (performance improvement): SQL statistics collection
has been made more efficient by avoiding an accidental heap allocation
per row for some schemas.
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@nvanbenschoten nvanbenschoten merged commit e60df47 into cockroachdb:release-20.2 Dec 30, 2020
@nvanbenschoten nvanbenschoten deleted the backport20.2-58117 branch December 31, 2020 06:11
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.

3 participants