Skip to content

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

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
nvb:nvanbenschoten/sstIterSeek
Dec 21, 2020
Merged

storage: re-use buffer across calls to sstIterator.SeekGE#58121
craig[bot] merged 1 commit intocockroachdb:masterfrom
nvb:nvanbenschoten/sstIterSeek

Conversation

@nvb
Copy link
Copy Markdown
Contributor

@nvb nvb commented Dec 21, 2020

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
```
@nvb nvb requested a review from sumeerbhola December 21, 2020 03:33
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
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

@nvb
Copy link
Copy Markdown
Contributor Author

nvb commented Dec 21, 2020

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Dec 21, 2020

Build succeeded:

@craig craig bot merged commit e552218 into cockroachdb:master Dec 21, 2020
@nvb nvb 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