mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
warn issues about large block I/O performance for Linux older than 4.0.0 (#14524)
This PR simply adds a warning message when it detects older kernel versions and warn's them about potential performance issues on this kernel. The issue can be seen only with parallel I/O across all drives on denser setups such as 90 drives or 45 drives per server configurations.
This commit is contained in:
@@ -21,10 +21,28 @@ import (
|
||||
"runtime"
|
||||
"runtime/debug"
|
||||
|
||||
"github.com/minio/minio/internal/kernel"
|
||||
"github.com/minio/minio/internal/logger"
|
||||
"github.com/minio/pkg/sys"
|
||||
)
|
||||
|
||||
func oldLinux() bool {
|
||||
currentKernel, err := kernel.CurrentVersion()
|
||||
if err != nil {
|
||||
// Could not probe the kernel version
|
||||
return false
|
||||
}
|
||||
|
||||
if currentKernel == 0 {
|
||||
// We could not get any valid value return false
|
||||
return false
|
||||
}
|
||||
|
||||
// legacy linux indicator for printing warnings
|
||||
// about older Linux kernels and Go runtime.
|
||||
return currentKernel < kernel.Version(4, 0, 0)
|
||||
}
|
||||
|
||||
func setMaxResources() (err error) {
|
||||
// Set the Go runtime max threads threshold to 90% of kernel setting.
|
||||
sysMaxThreads, mErr := sys.GetMaxThreads()
|
||||
|
||||
Reference in New Issue
Block a user