forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kv/tscache: dynamically size intervalSkl pages
Addresses a suggestion from Peter: cockroachdb#48058 (comment). This change updates `intervalSkl` to dynamically grow the size of its pages as pages are rotated. This allows the structure to start off small (128 KB per page) and grow logarithmically to a maximum size (32 MB per page) as it is used. The pages start small to limit the memory footprint of the data structure for short-lived tests but will settle upon the maximum page size under steady-state on a long-lived process. This does not appear to have an impact on benchmarks: ``` ➜ benchdiff --run='BenchmarkJoinReader/reqOrdering=false/matchratio=onetothirtytwo/lookuprows=16384' ./pkg/sql/rowexec checking out 'f575fa8' building benchmark binaries for 'f575fa8' 1/1 - checking out '3d46054' building benchmark binaries for '3d46054' 1/1 / pkg=1/1 iter=10/10 cockroachdb/cockroach/pkg/sql/rowexec | name old time/op new time/op delta JoinReader/reqOrdering=false/matchratio=onetothirtytwo/lookuprows=16384-16 1.34s ± 2% 1.34s ± 4% ~ (p=1.000 n=9+10) name old speed new speed delta JoinReader/reqOrdering=false/matchratio=onetothirtytwo/lookuprows=16384-16 3.23MB/s ± 2% 3.23MB/s ± 3% ~ (p=0.953 n=9+10) name old alloc/op new alloc/op delta JoinReader/reqOrdering=false/matchratio=onetothirtytwo/lookuprows=16384-16 72.1MB ± 0% 73.9MB ± 0% +2.44% (p=0.000 n=10+10) name old allocs/op new allocs/op delta JoinReader/reqOrdering=false/matchratio=onetothirtytwo/lookuprows=16384-16 556k ± 0% 556k ± 0% ~ (p=0.781 n=10+10) ```
- Loading branch information
1 parent
f575fa8
commit a753bf2
Showing
10 changed files
with
210 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.