diff options
| author | guol-fnst <guol-fnst@fujitsu.com> | 2022-07-14 10:37:13 +0800 |
|---|---|---|
| committer | guol-fnst <guol-fnst@fujitsu.com> | 2022-07-14 14:06:46 +0800 |
| commit | 300b383cdf7ab607c92417256dfdc5ca52ea24b0 (patch) | |
| tree | c2be78f28561975e7dae0292486bfbe1109c2310 | |
| parent | 308a48c0c20627ea47ddbfe9ba092d1235ab965b (diff) | |
| download | seaweedfs-300b383cdf7ab607c92417256dfdc5ca52ea24b0.tar.xz seaweedfs-300b383cdf7ab607c92417256dfdc5ca52ea24b0.zip | |
use 10 or numCPU workers if env is not found
| -rw-r--r-- | weed/storage/disk_location.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/storage/disk_location.go b/weed/storage/disk_location.go index 69d249259..8af8ea663 100644 --- a/weed/storage/disk_location.go +++ b/weed/storage/disk_location.go @@ -217,6 +217,10 @@ func (l *DiskLocation) loadExistingVolumes(needleMapKind NeedleMapKind) { glog.Warningf("failed to set worker number from GOMAXPROCS , set to default:10") } workerNum = num + } else { + if workerNum <= 10 { + workerNum = 10 + } } l.concurrentLoadingVolumes(needleMapKind, workerNum) glog.V(0).Infof("Store started on dir: %s with %d volumes max %d", l.Directory, len(l.volumes), l.MaxVolumeCount) |
