mirror of
https://github.com/minio/minio.git
synced 2025-01-23 20:53:18 -05:00
increase drive OBD blocksize to 4MB (#9258)
This commit is contained in:
parent
3ea1be3c52
commit
44decbeae0
@ -79,7 +79,7 @@ func GetOBDInfo(ctx context.Context, endpoint string) (Latency, Throughput, erro
|
||||
// }
|
||||
// }
|
||||
|
||||
blockSize := 1 * mb
|
||||
blockSize := 4 * mb
|
||||
fileSize := 256 * mb
|
||||
|
||||
latencies := make([]float64, fileSize/blockSize)
|
||||
|
@ -236,6 +236,7 @@ func (adm *AdminClient) ServerOBDInfo(ctx context.Context, obdDataTypes []OBDDat
|
||||
v.Set(string(d), "true")
|
||||
}
|
||||
var OBDInfoMessage OBDInfo
|
||||
OBDInfoMessage.TimeStamp = time.Now()
|
||||
|
||||
if v.Get(string(OBDDataTypeMinioInfo)) == "true" {
|
||||
info, err := adm.ServerInfo(ctx)
|
||||
@ -259,8 +260,10 @@ func (adm *AdminClient) ServerOBDInfo(ctx context.Context, obdDataTypes []OBDDat
|
||||
respChan <- OBDInfo{
|
||||
Error: err.Error(),
|
||||
}
|
||||
close(respChan)
|
||||
return
|
||||
}
|
||||
|
||||
// Check response http status code
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
respChan <- OBDInfo{
|
||||
@ -268,10 +271,13 @@ func (adm *AdminClient) ServerOBDInfo(ctx context.Context, obdDataTypes []OBDDat
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// Unmarshal the server's json response
|
||||
decoder := json.NewDecoder(resp.Body)
|
||||
for {
|
||||
err := decoder.Decode(&OBDInfoMessage)
|
||||
OBDInfoMessage.TimeStamp = time.Now()
|
||||
|
||||
if err == io.EOF {
|
||||
break
|
||||
}
|
||||
@ -283,7 +289,6 @@ func (adm *AdminClient) ServerOBDInfo(ctx context.Context, obdDataTypes []OBDDat
|
||||
respChan <- OBDInfoMessage
|
||||
}
|
||||
|
||||
OBDInfoMessage.TimeStamp = time.Now()
|
||||
respChan <- OBDInfoMessage
|
||||
close(respChan)
|
||||
}()
|
||||
|
Loading…
x
Reference in New Issue
Block a user