From 25666b7895fefe4947f2a1fb7a77f4e20de6d905 Mon Sep 17 00:00:00 2001 From: Qu Xuan Date: Tue, 19 Oct 2021 10:55:12 +0800 Subject: [PATCH] optimized(region): improve img convert speed --- pkg/hostman/storageman/imagecache_rbd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/hostman/storageman/imagecache_rbd.go b/pkg/hostman/storageman/imagecache_rbd.go index 7cd22c9106..1194707e90 100644 --- a/pkg/hostman/storageman/imagecache_rbd.go +++ b/pkg/hostman/storageman/imagecache_rbd.go @@ -80,7 +80,7 @@ func (r *SRbdImageCache) Acquire(ctx context.Context, zone, srcUrl, format, chec if r.Load() != nil { log.Infof("convert local image %s to rbd pool %s", r.imageId, r.Manager.GetPath()) err := procutils.NewRemoteCommandAsFarAsPossible(qemutils.GetQemuImg(), - "convert", "-O", "raw", localImageCache.GetPath(), r.GetPath()).Run() + "convert", "-W", "-m", "16", "-O", "raw", localImageCache.GetPath(), r.GetPath()).Run() if err != nil { return errors.Wrapf(err, "convert loca image %s to rbd pool %s at host %s", r.imageId, r.Manager.GetPath(), options.HostOptions.Hostname) }