-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
storage/engine: benchmark MVCCDeleteRange #3105
Conversation
b.StopTimer() | ||
|
||
for i := 0; i < b.N; i++ { | ||
rocksdb, stopper := setupMVCCData(1, numKeys, valueBytes, false, b) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Continually recreating the data is likely to be slow. I think you get rid of the changes to setupMVCCData
and instead copy the directory and its contents on each loop iteration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
|
Sure, I can wait. Not sure what you mean about old and new, since there is only one result set here. |
stopper.Stop() | ||
} | ||
|
||
locDirty := loc + "_dirty" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking you would only make the copy in BenchmarkMVCCDeleteRange
. Performing the copy for every benchmark seems excessive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Results of rebasing on #3096:
|
LGTM Reviewed 1 of 1 files at r1, 2 of 2 files at r2, 1 of 1 files at r3. storage/engine/rocksdb_test.go, line 511 [r3] (raw file): Comments from the review on Reviewable.io |
``` $ go test ./storage/engine -run - -bench MVCCDeleteRange 2>/dev/null PASS BenchmarkMVCCDeleteRange1Version8Bytes-4 10 182424913 ns/op 2.87 MB/s BenchmarkMVCCDeleteRange1Version32Bytes-4 10 111075871 ns/op 4.72 MB/s BenchmarkMVCCDeleteRange1Version256Bytes-4 50 32043937 ns/op 16.36 MB/s ok github.com/cockroachdb/cockroach/storage/engine 5.719s $ go test ./storage/engine -run - -bench MVCCDeleteRange -memprofilerate=1 -memprofile mem.out 2>/dev/null ... $ go tool pprof --alloc_objects engine.test mem.out Entering interactive mode (type "help" for commands) (pprof) top10 934147 of 1136965 total (82.16%) Dropped 142 nodes (cum <= 5684) Showing top 10 nodes out of 34 (cum >= 534539) flat flat% sum% cum cum% 133418 11.73% 11.73% 133418 11.73% github.com/cockroachdb/cockroach/roachpb.(*Value).Unmarshal 133418 11.73% 23.47% 133418 11.73% github.com/cockroachdb/cockroach/storage/engine.(*MVCCMetadata).Marshal 133418 11.73% 35.20% 133418 11.73% github.com/cockroachdb/cockroach/storage/engine.(*MVCCValue).Marshal 133418 11.73% 46.94% 333545 29.34% github.com/cockroachdb/cockroach/storage/engine.(*RocksDB).getProtoInternal 66913 5.89% 52.82% 401833 35.34% github.com/cockroachdb/cockroach/storage/engine.setupMVCCData 66726 5.87% 58.69% 66726 5.87% github.com/cockroachdb/cockroach/storage/engine.mvccEncodeTimestamp 66709 5.87% 64.56% 66744 5.87% github.com/cockroachdb/cockroach/roachpb.(*Value).InitChecksum 66709 5.87% 70.43% 200127 17.60% github.com/cockroachdb/cockroach/storage/engine.(*MVCCValue).Unmarshal 66709 5.87% 76.29% 66709 5.87% github.com/cockroachdb/cockroach/storage/engine.(*rocksDBBatch).GetProto 66709 5.87% 82.16% 534539 47.01% github.com/cockroachdb/cockroach/storage/engine.MVCCIterate ```
Review status: all files reviewed at latest revision, 3 unresolved discussions. storage/engine/rocksdb_test.go, line 511 [r3] (raw file): Comments from the review on Reviewable.io |
storage/engine: benchmark MVCCDeleteRange
Motivated by #3103. cc @petermattis @mrtracy