diff options
author | David 'Digit' Turner <digit@google.com> | 2011-05-04 19:18:15 +0200 |
---|---|---|
committer | David 'Digit' Turner <digit@google.com> | 2011-05-04 19:18:15 +0200 |
commit | 4297b82edb9d528928fb168cb14abd4955f8664b (patch) | |
tree | 942278e8603daeaf6f2c27774ed3180aeb07402b | |
parent | 46fd095b9f5d7e2434cebd407435e662f8e2df54 (diff) | |
download | external_qemu-4297b82edb9d528928fb168cb14abd4955f8664b.zip external_qemu-4297b82edb9d528928fb168cb14abd4955f8664b.tar.gz external_qemu-4297b82edb9d528928fb168cb14abd4955f8664b.tar.bz2 |
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
-rw-r--r-- | vl-android.c | 7 |
1 files changed, 6 insertions, 1 deletions
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"); } } |