[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [Bug 1686980] Re: qemu is very slow when adding 16, 384 vir
From: |
Daniel Berrange |
Subject: |
[Qemu-devel] [Bug 1686980] Re: qemu is very slow when adding 16, 384 virtio-scsi drives |
Date: |
Fri, 28 Apr 2017 10:53:08 -0000 |
I instrumented drive_new to time how long 1000 creations took with
current code:
1000 drive_new() in 0 secs
1000 drive_new() in 2 secs
1000 drive_new() in 18 secs
1000 drive_new() in 61 secs
As a quick hack you can just disable the drive_get() calls when if=none.
They're mostly just used to fill in default unit_id, but that's not
really required for if=none. That said, if no id= parameter is set, then
the code does expect unit_id to be valid, so not sure how to fully fix
that.
Anyway, with this hack applied it is much faster, but there is still
some kind of N*N complexity going on, because drive_new() gets slower &
slower as each drive is created - just not nearly as badly as before.
1000 drive_new() in 0 secs
1000 drive_new() in 0 secs
1000 drive_new() in 0 secs
1000 drive_new() in 1 secs
1000 drive_new() in 1 secs
1000 drive_new() in 1 secs
1000 drive_new() in 2 secs
1000 drive_new() in 2 secs
1000 drive_new() in 2 secs
1000 drive_new() in 4 secs
1000 drive_new() in 4 secs
1000 drive_new() in 6 secs
1000 drive_new() in 8 secs
1000 drive_new() in 8 secs
** Patch added: "Hack to avoid drive_new() when if=none"
https://bugs.launchpad.net/qemu/+bug/1686980/+attachment/4869119/+files/skip-drive-get-if-none.patch
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1686980
Title:
qemu is very slow when adding 16,384 virtio-scsi drives
Status in QEMU:
New
Bug description:
qemu runs very slowly when adding many virtio-scsi drives. I have
attached a small reproducer shell script which demonstrates this.
Using perf shows the following stack trace taking all the time:
72.42% 71.15% qemu-system-x86 qemu-system-x86_64 [.] drive_get
|
--72.32%--drive_get
|
--1.24%--__irqentry_text_start
|
--1.22%--smp_apic_timer_interrupt
|
--1.00%--local_apic_timer_interrupt
|
--1.00%--hrtimer_interrupt
|
--0.83%--__hrtimer_run_queues
|
--0.64%--tick_sched_timer
21.70% 21.34% qemu-system-x86 qemu-system-x86_64 [.]
blk_legacy_dinfo
|
---blk_legacy_dinfo
3.65% 3.59% qemu-system-x86 qemu-system-x86_64 [.] blk_next
|
---blk_next
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1686980/+subscriptions