mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user