From e3b40959cf81f8f121f59ae9196a2b9a35dd8c97 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 bd47b4ab1a..95491f080e 100644 --- a/pkg/hostman/storageman/imagecache_rbd.go +++ b/pkg/hostman/storageman/imagecache_rbd.go @@ -76,7 +76,7 @@ func (r *SRbdImageCache) Acquire(ctx context.Context, zone, srcUrl, format, chec if !r.Load() { 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 { log.Errorf("failed to convert image %s", err) return false