From 4297b82edb9d528928fb168cb14abd4955f8664b Mon Sep 17 00:00:00 2001 From: David 'Digit' Turner Date: Wed, 4 May 2011 19:18:15 +0200 Subject: Fix snapshot save pathetic speed. It turns out that the 'snapshot' property must be turned on on the block device corresponding to the snapshot storage file. Otherwise, the file is mounted O_DIRECT, which on my speedy machine limits the operation to a max of about 2.5 MB/s. This explains why saving snapshots was so pathetic. With this change, the save throughput is up to 278 MB/s on the same machine! Change-Id: I77c792114171a4ecaf3e3f08f64d8b3a30709f23 --- vl-android.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'vl-android.c') diff --git a/vl-android.c b/vl-android.c index e151cc0..b024bef 100644 --- a/vl-android.c +++ b/vl-android.c @@ -5090,9 +5090,14 @@ int main(int argc, char **argv, char **envp) PANIC("Snapshot storage file does not exist: %s", spath); } if (filelock_create(spath) == NULL) { - PANIC("Snapshot storag already in use: %s", spath); + PANIC("Snapshot storage already in use: %s", spath); } hdb_opts = drive_add(spath, HD_ALIAS, 1); + /* VERY IMPORTANT: + * Set this property or the file will be mounted with O_DIRECT, + * which will slow down snapshot saving.x100 ! + */ + qemu_opt_set(hdb_opts, "snapshot", "on"); } } -- cgit v1.1