mirror of
https://github.com/minio/minio.git
synced 2025-11-26 04:26:12 -05:00
disable disk-usage when export is root mount path (#6091)
disk usage crawling is not needed when a tenant is not sharing the same disk for multiple other tenants. This PR adds an optimization when we see a setup uses entire disk, we simply rely on statvfs() to give us total usage. This PR also additionally adds low priority scheduling for usage check routine, such that other go-routines blocked will be automatically unblocked and prioritized before usage.
This commit is contained in:
committed by
Dee Koder
parent
abf209b1dd
commit
25de775560
@@ -59,7 +59,12 @@ type Server struct {
|
||||
listenerMutex *sync.Mutex // to guard 'listener' field.
|
||||
listener *httpListener // HTTP listener for all 'Addrs' field.
|
||||
inShutdown uint32 // indicates whether the server is in shutdown or not
|
||||
requestCount int32 // counter holds no. of request in process.
|
||||
requestCount int32 // counter holds no. of request in progress.
|
||||
}
|
||||
|
||||
// GetRequestCount - returns number of request in progress.
|
||||
func (srv *Server) GetRequestCount() int32 {
|
||||
return atomic.LoadInt32(&srv.requestCount)
|
||||
}
|
||||
|
||||
// Start - start HTTP server
|
||||
|
||||
Reference in New Issue
Block a user