matrixone
matrixone copied to clipboard
fifocache: refine key hash func and optimize evict
What type of PR is this?
- [ ] API-change
- [ ] BUG
- [x] Improvement
- [ ] Documentation
- [ ] Feature
- [ ] Test and CI
- [ ] Code Refactoring
Which issue(s) this PR fixes:
issue #19453
What this PR does / why we need it:
refine key shard function and optimize evict benchstat:
goos: linux
goarch: amd64
pkg: github.com/matrixorigin/matrixone/pkg/fileservice/fifocache
cpu: AMD Ryzen 9 7900 12-Core Processor
│ b1 │ b2 │
│ sec/op │ sec/op vs base │
SequentialSet-24 130.7n ± ∞ ¹ 137.0n ± ∞ ¹ ~ (p=0.100 n=3) ²
ParallelSet-24 27.22n ± ∞ ¹ 27.57n ± ∞ ¹ ~ (p=0.100 n=3) ²
Get-24 19.43n ± ∞ ¹ 19.86n ± ∞ ¹ ~ (p=0.200 n=3) ²
ParallelGet-24 5.083n ± ∞ ¹ 5.169n ± ∞ ¹ ~ (p=0.400 n=3) ²
ParallelGetOrSet-24 20.35n ± ∞ ¹ 19.89n ± ∞ ¹ ~ (p=0.400 n=3) ²
ParallelEvict-24 226.4n ± ∞ ¹ 140.0n ± ∞ ¹ ~ (p=0.100 n=3) ²
EnsureNBytesAndSet-24 34.11n ± ∞ ¹ 35.13n ± ∞ ¹ ~ (p=0.100 n=3) ²
geomean 34.24n 32.46n -5.22%