From: Michael Tokarev <mjt@tls.msk.ru>
To: KVM list <kvm@vger.kernel.org>
Subject: *terrible* speed of savevm/loadvm/delvm
Date: Wed, 12 Nov 2008 20:15:55 +0300 [thread overview]
Message-ID: <491B0F4B.9060502@msgid.tls.msk.ru> (raw)
Somewhere between kvm-75 and kvm-78, the
mentioned commands has been slowed down
to insane levels. By "insane" I mean to
take about 10 minutes(!) to save/load a
128MB RAM/1GB HDD VM's state. It used
to require several seconds for much larger
VMs...
Here's a typical sequence of system calls
during savevm:
select(12, [11], [], NULL, NULL) = 1 (in [11])
read(11,
"\f\0\0\0\0\0\0\0\374\377\377\3771s\0\0\350\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
128) = 128
close(21) = 0
_llseek(12, 1669340278, [1669340278], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340280, [1669340280], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340282, [1669340282], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340284, [1669340284], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340286, [1669340286], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340288, [1669340288], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340290, [1669340290], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340292, [1669340292], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1674259520, [1674259520], SEEK_SET) = 0
write(12,
"\200\0\0\0c\343\260\0\200\0\0\0c\343\300\0\200\0\0\0c\343\320\0\200\0\0\0c\343\340\0\200"...,
64) = 64
dup(12) = 21
futex(0xf7d621a4, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0xf7d621a0, {FUTEX_OP_SET, 0,
FUTEX_OP_CMP_GT, 1}) = 1
futex(0xf7d62120, FUTEX_WAKE_PRIVATE, 1) = 1
select(12, [11], [], NULL, NULL) = 1 (in [11])
read(11,
"\f\0\0\0\0\0\0\0\374\377\377\3771s\0\0\350\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
128) = 128
close(21) = 0
_llseek(12, 1669340294, [1669340294], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340296, [1669340296], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340298, [1669340298], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340300, [1669340300], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340302, [1669340302], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340304, [1669340304], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340306, [1669340306], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340308, [1669340308], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1674259584, [1674259584], SEEK_SET) = 0
write(12,
"\200\0\0\0c\3440\0\200\0\0\0c\344@\0\200\0\0\0c\344P\0\200\0\0\0c\344`\0\200"...,
64) = 64
dup(12) = 21
futex(0xf7d621a4, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0xf7d621a0, {FUTEX_OP_SET, 0,
FUTEX_OP_CMP_GT, 1}) = 1
select(12, [11], [], NULL, NULL) = 1 (in [11])
read(11,
"\f\0\0\0\0\0\0\0\374\377\377\3771s\0\0\350\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
128) = 128
close(21) = 0
_llseek(12, 1669340310, [1669340310], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340312, [1669340312], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340314, [1669340314], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340316, [1669340316], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340318, [1669340318], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340320, [1669340320], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340322, [1669340322], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340324, [1669340324], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1674259648, [1674259648], SEEK_SET) = 0
write(12,
"\200\0\0\0c\344\260\0\200\0\0\0c\344\300\0\200\0\0\0c\344\320\0\200\0\0\0c\344\340\0\200"...,
64) = 64
dup(12) = 21
futex(0xf7d621a4, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0xf7d621a0, {FUTEX_OP_SET, 0,
FUTEX_OP_CMP_GT, 1}) = 1
futex(0xf7d62120, FUTEX_WAKE_PRIVATE, 1) = 1
select(12, [11], [], NULL, NULL) = 1 (in [11])
read(11,
"\f\0\0\0\0\0\0\0\374\377\377\3771s\0\0\350\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
128) = 128
close(21) = 0
_llseek(12, 1669340326, [1669340326], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340328, [1669340328], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340330, [1669340330], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340332, [1669340332], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340334, [1669340334], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340336, [1669340336], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340338, [1669340338], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1669340340, [1669340340], SEEK_SET) = 0
write(12, "\0\1"..., 2) = 2
_llseek(12, 1674259712, [1674259712], SEEK_SET) = 0
write(12,
"\200\0\0\0c\3450\0\200\0\0\0c\345@\0\200\0\0\0c\345P\0\200\0\0\0c\345`\0\200"...,
64) = 64
dup(12) = 21
futex(0xf7d621a4, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0xf7d621a0, {FUTEX_OP_SET, 0,
FUTEX_OP_CMP_GT, 1}) = 1
futex(0xf7d62120, FUTEX_WAKE_PRIVATE, 1) = 1
select(12, [11], [], NULL, NULL^C <unfinished ...>
As you see, it writes 2 bytes, llseeks to THE SAME
position, writes next 2 bytes and so on. This takes
HUGE amount of time, and can be done, in most cases,
in a single write without any seeks.
Is it just me or are savevm/loadvm/delvm really THAT
broken?
And since migration to disk has been removed too,
there's no way currently to save the VM state...
Thanks!
/mjt
next reply other threads:[~2008-11-12 17:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-12 17:15 Michael Tokarev [this message]
2008-11-13 12:33 ` *terrible* speed of savevm/loadvm/delvm Avi Kivity
2008-11-20 19:08 ` Michael Tokarev
2008-11-23 13:51 ` Avi Kivity
2008-11-23 20:08 ` Michael Tokarev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=491B0F4B.9060502@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.