SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
remove percent
Konstantin Lebedev5209ebbeef3c
diff --git a/weed/pb/volume_server.proto b/weed/pb/volume_server.protoindex 28dabd0838..393819dabd 100644--- a/weed/pb/volume_server.proto+++ b/weed/pb/volume_server.proto@@ -147,7 +147,7 @@ message VacuumVolumeCompactRequest {}message VacuumVolumeCompactResponse {int64 processed_bytes = 1;- uint32 percent_load_avg_1m = 2;+ float percent_load_avg_1m = 2;}message VacuumVolumeCommitRequest {diff --git a/weed/pb/volume_server_pb/volume_server.pb.go b/weed/pb/volume_server_pb/volume_server.pb.goindex 8489e87f9b..0313141660 100644--- a/weed/pb/volume_server_pb/volume_server.pb.go+++ b/weed/pb/volume_server_pb/volume_server.pb.go@@ -394,8 +394,8 @@ type VacuumVolumeCompactResponse struct {sizeCache protoimpl.SizeCacheunknownFields protoimpl.UnknownFields- ProcessedBytes int64 `protobuf:"varint,1,opt,name=processed_bytes,json=processedBytes,proto3" json:"processed_bytes,omitempty"`- PercentLoadAvg_1M uint32 `protobuf:"varint,2,opt,name=percent_load_avg_1m,json=percentLoadAvg1m,proto3" json:"percent_load_avg_1m,omitempty"`+ ProcessedBytes int64 `protobuf:"varint,1,opt,name=processed_bytes,json=processedBytes,proto3" json:"processed_bytes,omitempty"`+ PercentLoadAvg_1M float32 `protobuf:"fixed32,2,opt,name=percent_load_avg_1m,json=percentLoadAvg1m,proto3" json:"percent_load_avg_1m,omitempty"`}func (x *VacuumVolumeCompactResponse) Reset() {@@ -437,7 +437,7 @@ func (x *VacuumVolumeCompactResponse) GetProcessedBytes() int64 {return 0}-func (x *VacuumVolumeCompactResponse) GetPercentLoadAvg_1M() uint32 {+func (x *VacuumVolumeCompactResponse) GetPercentLoadAvg_1M() float32 {if x != nil {return x.PercentLoadAvg_1M}@@ -5625,7 +5625,7 @@ var file_volume_server_proto_rawDesc = []byte{0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01,0x28, 0x03, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x42, 0x79, 0x74,0x65, 0x73, 0x12, 0x2d, 0x0a, 0x13, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x6f,- 0x61, 0x64, 0x5f, 0x61, 0x76, 0x67, 0x5f, 0x31, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52,+ 0x61, 0x64, 0x5f, 0x61, 0x76, 0x67, 0x5f, 0x31, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52,0x10, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x41, 0x76, 0x67, 0x31,0x6d, 0x22, 0x38, 0x0a, 0x19, 0x56, 0x61, 0x63, 0x75, 0x75, 0x6d, 0x56, 0x6f, 0x6c, 0x75, 0x6d,0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b,diff --git a/weed/server/volume_grpc_vacuum.go b/weed/server/volume_grpc_vacuum.goindex 40ff1eabdf..7d9846808a 100644--- a/weed/server/volume_grpc_vacuum.go+++ b/weed/server/volume_grpc_vacuum.go@@ -7,7 +7,6 @@ import ("github.com/seaweedfs/seaweedfs/weed/glog""github.com/seaweedfs/seaweedfs/weed/pb/volume_server_pb""github.com/seaweedfs/seaweedfs/weed/storage/needle"- "math""runtime")@@ -41,7 +40,7 @@ func (vs *VolumeServer) VacuumVolumeCompact(req *volume_server_pb.VacuumVolumeCoresp.ProcessedBytes = processedif fsErr == nil && numCPU > 0 {if fsLa, err := fs.LoadAvg(); err == nil {- resp.PercentLoadAvg_1M = uint32(math.Round(fsLa.Load1 * 100 / float64(numCPU)))+ resp.PercentLoadAvg_1M = float32(fsLa.Load1 / float64(numCPU))}}if sendErr = stream.Send(resp); sendErr != nil {diff --git a/weed/topology/topology_vacuum.go b/weed/topology/topology_vacuum.goindex ad466b208c..5b5483f6da 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, loadAvg %v%%",+ glog.V(0).Infof("%d vacuum %d on %s processed %d bytes, loadAvg %.0f%%",index, vid, url, resp.ProcessedBytes, resp.PercentLoadAvg_1M)}return nil