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

storage: re-use buffer across calls to sstIterator.SeekGE #58121

Merged
merged 1 commit into from
Dec 21, 2020

Conversation

nvanbenschoten
Copy link
Member

At the end of a 4 hour, 2.2 TB IMPORT of TPC-E, this was responsible for 2.67% of all heap allocations (by object) due to the call to sstIterator.SeekGE from checkForKeyCollisionsGo.

      File: cockroach
Type: alloc_objects
Time: Dec 21, 2020 at 2:51am (UTC)
Duration: 5.32s, Total samples = 6963804
Active filters:
   focus=SeekGE
Showing nodes accounting for 212999, 3.06% of 6963804 total
----------------------------------------------------------+-------------
                                            185692   100% |   github.com/cockroachdb/cockroach/pkg/storage.checkForKeyCollisionsGo /go/src/github.com/cockroachdb/cockroach/pkg/storage/mvcc.go:3807
         0     0%     0%     185692  2.67%                | github.com/cockroachdb/cockroach/pkg/storage.(*sstIterator).SeekGE /go/src/github.com/cockroachdb/cockroach/pkg/storage/sst_iterator.go:93
                                            185692   100% |   github.com/cockroachdb/cockroach/pkg/storage.EncodeKey /go/src/github.com/cockroachdb/cockroach/pkg/storage/batch.go:126

At the end of a 4 hour, 2.2 TB IMPORT of TPC-E, this was responsible for
2.67% of all heap allocations (by object) due to the call to
`sstIterator.SeekGE` from `checkForKeyCollisionsGo`.

```
      File: cockroach
Type: alloc_objects
Time: Dec 21, 2020 at 2:51am (UTC)
Duration: 5.32s, Total samples = 6963804
Active filters:
   focus=SeekGE
Showing nodes accounting for 212999, 3.06% of 6963804 total
----------------------------------------------------------+-------------
                                            185692   100% |   github.com/cockroachdb/cockroach/pkg/storage.checkForKeyCollisionsGo /go/src/github.com/cockroachdb/cockroach/pkg/storage/mvcc.go:3807
         0     0%     0%     185692  2.67%                | github.com/cockroachdb/cockroach/pkg/storage.(*sstIterator).SeekGE /go/src/github.com/cockroachdb/cockroach/pkg/storage/sst_iterator.go:93
                                            185692   100% |   github.com/cockroachdb/cockroach/pkg/storage.EncodeKey /go/src/github.com/cockroachdb/cockroach/pkg/storage/batch.go:126
```
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@sumeerbhola sumeerbhola left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

@nvanbenschoten
Copy link
Member Author

bors r+

@craig
Copy link
Contributor

craig bot commented Dec 21, 2020

Build succeeded:

@craig craig bot merged commit e552218 into cockroachdb:master Dec 21, 2020
@nvanbenschoten nvanbenschoten deleted the nvanbenschoten/sstIterSeek 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