From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46477) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHkth-0000Zd-9k for qemu-devel@nongnu.org; Thu, 05 Sep 2013 21:31:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHkta-0002p2-0H for qemu-devel@nongnu.org; Thu, 05 Sep 2013 21:31:41 -0400 Date: Fri, 6 Sep 2013 09:31:20 +0800 From: xuanmao_001 Mime-Version: 1.0 Message-ID: <2013090609312026502832@163.com> Content-Type: multipart/alternative; boundary="----=_001_NextPart565374250043_=----" Subject: [Qemu-devel] savevm too slow Reply-To: xuanmao_001 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-discuss , qemu-devel Cc: Kevin Wolf This is a multi-part message in MIME format. ------=_001_NextPart565374250043_=---- Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: base64 SGksIHFlbXVlcnM6DQoNCkkgZm91bmQgdGhhdCB0aGUgZ3Vlc3QgZGlzayBmaWxlIGNhY2hlIG1v ZGUgd2lsbCBhZmZlY3QgdG8gdGhlIHRpbWUgb2Ygc2F2ZXZtLg0KDQp0aGUgY2FjaGUgJ3dyaXRl YmFjaycgdG9vIHNsb3cuIGJ1dCB0aGUgY2FjaGUgJ3Vuc2FmZScgaXMgYXMgZmFzdCBhcyBpdCBj YW4sIGxlc3MgdGhhbiAxMCBzZWNvbmRzLg0KDQpoZXJlIGlzIHRoZSBleGFtcGxlIEkgdXNlIHZp cnNoOg0KQGNhY2hlIHdpdGggd3JpdGViYWNrOg0KI3RoZSBmaXJzdCBzbmFwc2hvdA0KcmVhbCAg ICAwbTIxLjkwNHMNCnVzZXIgICAgMG0wLjAwNnMNCnN5cyAgICAgMG0wLjAwOHMNCg0KI3RoZSBz ZWNvbmRhcnkgc25hcHNob3QNCnJlYWwgICAgMm0xMS42MjRzDQp1c2VyICAgIDBtMC4wMTNzDQpz eXMgICAgIDBtMC4wMDhzDQoNCkBjYWNoZSB3aXRoIHVuc2FmZToNCiN0aGUgZmlyc3Qgc25hcHNo b3QNCnJlYWwgICAgMG0wLjczMHMNCnVzZXIgICAgMG0wLjAwNnMNCnN5cyAgICAgMG0wLjAwNXMN Cg0KI3RoZSBzZWNvbmRhcnkgc25hcHNob3QNCnJlYWwgICAgMG0xLjI5NnMNCnVzZXIgICAgMG0w LjAwMnMNCnN5cyAgICAgMG0wLjAwOHMNCg0Kc28sIHdoYXQgdGhlIGRpZmZlcmVuY2UgYmV0d2Vl biB0aGVtIHdoZW4gdXNpbmcgZGlmZmVyZW50IGNhY2hlLg0KDQp0aGUgb3RoZXIgcXVlc3Rpb246 IHdoZW4gSSBjaGFuZ2UgdGhlIGJ1ZmZlciBzaXplICNkZWZpbmUgSU9fQlVGX1NJWkUgMzI3Njgg DQp0byAjZGVmaW5lIElPX0JVRl9TSVpFICgxICogMTAyNCAqIDEwMjQpLCB0aGUgc2F2ZXZtIGlz IG1vcmUgcXVpY2tseS4NCg0KDQp0aGFua3MuDQoNCg0KDQp4dWFubWFvXzAwMQ== ------=_001_NextPart565374250043_=---- Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Hi, qemuers:
 
I found that the guest disk file cache mode will affec= t to=20 the time of savevm.
 
the cache 'writeback' too slow. but the cache 'unsafe' is as fast as = it=20 can, less than 10 seconds.
 
here is the example I use virsh:
@cache with writeback:
#the first snapshot
real    0m21.904s
user    0m0.006s
sys     0m0.008s
 
#the secondary snapshot
real    2m11.624s
user    0m0.013s
sys     0m0.008s
 
@cache with unsafe:
#the first snapshot
real    0m0.730s
user    0m0.006s
sys     0m0.005s
 
#the secondary snapshot
real    0m1.296s
user    0m0.002s
sys     0m0.008s
 
so, what the difference between them when using different cache.
 
the other question: when I change the buffer size=20 #define IO_BUF_SIZE 32768
to #define IO_BUF_SIZE (1 * 1024 * 1024), the savevm is mor= e=20 quickly.
 
 
thanks.

xuanmao_001
------=_001_NextPart565374250043_=------