From 1d29f67c021cd7370b5eeb6c2010b8739ea7f7ae Mon Sep 17 00:00:00 2001 From: Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> Date: Mon, 1 Aug 2022 14:29:41 +0500 Subject: [PATCH] revert disk stats --- weed/server/volume_grpc_vacuum.go | 9 --------- weed/topology/topology_vacuum.go | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/weed/server/volume_grpc_vacuum.go b/weed/server/volume_grpc_vacuum.go index 9b0b9d9f3..96386d68d 100644 --- a/weed/server/volume_grpc_vacuum.go +++ b/weed/server/volume_grpc_vacuum.go @@ -6,7 +6,6 @@ import ( "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" "github.com/chrislusf/seaweedfs/weed/storage/needle" "github.com/prometheus/procfs" - "github.com/prometheus/procfs/blockdevice" "math" "runtime" ) @@ -35,7 +34,6 @@ func (vs *VolumeServer) VacuumVolumeCompact(req *volume_server_pb.VacuumVolumeCo reportInterval := int64(1024 * 1024 * 128) nextReportTarget := reportInterval fs, fsErr := procfs.NewDefaultFS() - bd, bdErr := blockdevice.NewDefaultFS() var sendErr error err := vs.store.CompactVolume(needle.VolumeId(req.VolumeId), req.Preallocate, vs.compactionBytePerSecond, func(processed int64) bool { if processed > nextReportTarget { @@ -45,13 +43,6 @@ func (vs *VolumeServer) VacuumVolumeCompact(req *volume_server_pb.VacuumVolumeCo resp.PercentLoadAvg_1M = uint32(math.Round(fsLa.Load1 * 100 / float64(numCPU))) } } - if bdErr == nil { - if bdStats, err := bd.ProcDiskstats(); err == nil { - for _, stat := range bdStats { - glog.V(0).Infof("vacuum id: processed ProcDiskstats: %+v", req.VolumeId, stat) - } - } - } if sendErr = stream.Send(resp); sendErr != nil { return false } diff --git a/weed/topology/topology_vacuum.go b/weed/topology/topology_vacuum.go index dfe719ea4..f9fbd3db0 100644 --- a/weed/topology/topology_vacuum.go +++ b/weed/topology/topology_vacuum.go @@ -89,7 +89,7 @@ func (t *Topology) batchVacuumVolumeCompact(grpcDialOption grpc.DialOption, vl * return recvErr } } - glog.V(0).Infof("%d vacuum %d on %s processed %d bytes, percentage loadAvg %v", + glog.V(0).Infof("%d vacuum %d on %s processed %d bytes, loadAvg %v%%", index, vid, url, resp.ProcessedBytes, resp.PercentLoadAvg_1M) } return nil