mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-03-21 15:45:01 +00:00
lib/storage: consistency renaming: getMaxRawRowsPerPartition -> getMaxRawRowsPerShard
This commit is contained in:
parent
d06c0e7a94
commit
eb335d2c29
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.
|
// Higher number of shards reduces CPU contention and increases the max bandwidth on multi-core systems.
|
||||||
var rawRowsShardsPerPartition = (cgroup.AvailableCPUs() + 7) / 8
|
var rawRowsShardsPerPartition = (cgroup.AvailableCPUs() + 7) / 8
|
||||||
|
|
||||||
// getMaxRowsPerPartition returns the maximum number of rows that haven't been converted into parts yet.
|
// getMaxRawRowsPerShard returns the maximum number of rows that haven't been converted into parts yet.
|
||||||
func getMaxRawRowsPerPartition() int {
|
func getMaxRawRowsPerShard() int {
|
||||||
maxRawRowsPerPartitionOnce.Do(func() {
|
maxRawRowsPerPartitionOnce.Do(func() {
|
||||||
n := memory.Allowed() / rawRowsShardsPerPartition / 256 / int(unsafe.Sizeof(rawRow{}))
|
n := memory.Allowed() / rawRowsShardsPerPartition / 256 / int(unsafe.Sizeof(rawRow{}))
|
||||||
if n < 1e4 {
|
if n < 1e4 {
|
||||||
|
@ -515,7 +515,7 @@ type rawRows struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func getRawRowsMaxSize() *rawRows {
|
func getRawRowsMaxSize() *rawRows {
|
||||||
size := getMaxRawRowsPerPartition()
|
size := getMaxRawRowsPerShard()
|
||||||
return getRawRowsWithSize(size)
|
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) {
|
func benchmarkTableSearch(b *testing.B, rowsCount, tsidsCount, tsidsSearch int, fetchData bool) {
|
||||||
startTimestamp := timestampFromTime(time.Now()) - 365*24*3600*1000
|
startTimestamp := timestampFromTime(time.Now()) - 365*24*3600*1000
|
||||||
rowsPerInsert := getMaxRawRowsPerPartition()
|
rowsPerInsert := getMaxRawRowsPerShard()
|
||||||
|
|
||||||
tb := openBenchTable(b, startTimestamp, rowsPerInsert, rowsCount, tsidsCount)
|
tb := openBenchTable(b, startTimestamp, rowsPerInsert, rowsCount, tsidsCount)
|
||||||
tr := TimeRange{
|
tr := TimeRange{
|
||||||
|
|
Loading…
Reference in a new issue