mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/storage: consistency renaming: getMaxRawRowsPerPartition -> getMaxRawRowsPerShard
This commit is contained in:
parent
044ab46824
commit
69b1482bdb
2 changed files with 4 additions and 4 deletions
|
@ -79,8 +79,8 @@ const finalPartsToMerge = 3
|
|||
// Higher number of shards reduces CPU contention and increases the max bandwidth on multi-core systems.
|
||||
var rawRowsShardsPerPartition = (cgroup.AvailableCPUs() + 7) / 8
|
||||
|
||||
// getMaxRowsPerPartition returns the maximum number of rows that haven't been converted into parts yet.
|
||||
func getMaxRawRowsPerPartition() int {
|
||||
// getMaxRawRowsPerShard returns the maximum number of rows that haven't been converted into parts yet.
|
||||
func getMaxRawRowsPerShard() int {
|
||||
maxRawRowsPerPartitionOnce.Do(func() {
|
||||
n := memory.Allowed() / rawRowsShardsPerPartition / 256 / int(unsafe.Sizeof(rawRow{}))
|
||||
if n < 1e4 {
|
||||
|
@ -515,7 +515,7 @@ type rawRows struct {
|
|||
}
|
||||
|
||||
func getRawRowsMaxSize() *rawRows {
|
||||
size := getMaxRawRowsPerPartition()
|
||||
size := getMaxRawRowsPerShard()
|
||||
return getRawRowsWithSize(size)
|
||||
}
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ func createBenchTable(b *testing.B, path string, startTimestamp int64, rowsPerIn
|
|||
|
||||
func benchmarkTableSearch(b *testing.B, rowsCount, tsidsCount, tsidsSearch int, fetchData bool) {
|
||||
startTimestamp := timestampFromTime(time.Now()) - 365*24*3600*1000
|
||||
rowsPerInsert := getMaxRawRowsPerPartition()
|
||||
rowsPerInsert := getMaxRawRowsPerShard()
|
||||
|
||||
tb := openBenchTable(b, startTimestamp, rowsPerInsert, rowsCount, tsidsCount)
|
||||
tr := TimeRange{
|
||||
|
|
Loading…
Reference in a new issue