improve obd tests and optimize network (#9378)

- keep long running obd network tests alive
- fix error - wrong number of parents in process OBD info
- ensure that osinfo does not error out when inside containers
- remove limit on max number of connections per client transport

The generic client transport uses a default limit of 64 conns per transport.
This could end up limiting and throttling usage, and artificially slowing
down the performance of MinIO even on hardware capable of doing better.
master
Sidhartha Mani 5 years ago committed by GitHub
parent b54c0f0ef3
commit 3e78ea8acc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      cmd/obdinfo.go
  2. 6
      cmd/peer-rest-client.go
  3. 3
      cmd/peer-rest-server.go
  4. 1
      cmd/utils.go

@ -317,16 +317,14 @@ func getLocalProcOBD(ctx context.Context) madmin.ServerProcOBDInfo {
sysProc.PageFaults = pageFaults
parent, err := proc.ParentWithContext(ctx)
if err != nil {
return errProcInfo(err)
}
if err == nil {
sysProc.Parent = parent.Pid
}
ppid, err := proc.PpidWithContext(ctx)
if err != nil {
return errProcInfo(err)
}
if err == nil {
sysProc.Ppid = ppid
}
rlimit, err := proc.RlimitWithContext(ctx)
if err != nil {
@ -404,13 +402,8 @@ func getLocalOsInfoOBD(ctx context.Context) madmin.ServerOsOBDInfo {
}
}
users, err := host.UsersWithContext(ctx)
if err != nil {
return madmin.ServerOsOBDInfo{
Addr: addr,
Error: err.Error(),
}
}
// ignore user err, as it cannot be obtained reliably inside containers
users, _ := host.UsersWithContext(ctx)
return madmin.ServerOsOBDInfo{
Addr: addr,

@ -374,7 +374,11 @@ func (client *peerRESTClient) DispatchNetOBDInfo(ctx context.Context) (info madm
return
}
defer http.DrainBody(respBody)
err = gob.NewDecoder(respBody).Decode(&info)
waitReader, err := waitForHTTPResponse(respBody)
if err != nil {
return
}
err = gob.NewDecoder(waitReader).Decode(&info)
return
}

@ -403,9 +403,12 @@ func (s *peerRESTServer) DispatchNetOBDInfoHandler(w http.ResponseWriter, r *htt
return
}
done := keepHTTPResponseAlive(w)
ctx := newContext(r, w, "DispatchNetOBDInfo")
info := globalNotificationSys.NetOBDInfo(ctx)
done()
logger.LogIf(ctx, gob.NewEncoder(w).Encode(info))
w.(http.Flusher).Flush()
}

@ -471,7 +471,6 @@ func newCustomHTTPTransport(tlsConfig *tls.Config, dialTimeout time.Duration) fu
DialContext: newCustomDialContext(dialTimeout, 15*time.Second),
MaxIdleConnsPerHost: 16,
MaxIdleConns: 16,
MaxConnsPerHost: 64, // This is used per drive/rpc host. More requests will block until free.
IdleConnTimeout: 1 * time.Minute,
ResponseHeaderTimeout: 3 * time.Minute, // Set conservative timeouts for MinIO internode.
TLSHandshakeTimeout: 10 * time.Second,

Loading…
Cancel
Save