choose starting concurrency based on number of local disks (#15428)

smaller setups may have less drives per server choosing
the concurrency based on number of local drives, and let
the MinIO server change the overall concurrency as
necessary.
This commit is contained in:
Harshavardhana
2022-07-29 00:00:06 -07:00
committed by GitHub
parent 7ac53c07af
commit 916f274c83
3 changed files with 51 additions and 24 deletions

View File

@@ -292,6 +292,19 @@ func (l EndpointServerPools) LocalDisksPaths() []string {
return disks
}
// NLocalDisksPathsPerPool returns the disk paths of the local disks per pool
func (l EndpointServerPools) NLocalDisksPathsPerPool() []int {
localDisksCount := make([]int, len(l))
for i, ep := range l {
for _, endpoint := range ep.Endpoints {
if endpoint.IsLocal {
localDisksCount[i]++
}
}
}
return localDisksCount
}
// FirstLocal returns true if the first endpoint is local.
func (l EndpointServerPools) FirstLocal() bool {
return l[0].Endpoints[0].IsLocal