* [Qemu-devel] [Bug 1253563] [NEW] bad performance with rng-egd backend
@ 2013-11-21 9:24 Amos Kong
2013-11-21 11:01 ` Launchpad Bug Tracker
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Amos Kong @ 2013-11-21 9:24 UTC (permalink / raw)
To: qemu-devel
Public bug reported:
1. create listen socket
# cat /dev/random | nc -l localhost 1024
2. start vm with rng-egd backend
./x86_64-softmmu/qemu-system-x86_64 --enable-kvm -mon chardev=qmp,mode=control,pretty=on -chardev socket,id=qmp,host=localhost,port=1234,server,nowait -m 2000 -device virtio-net-pci,netdev=h1,id=vnet0 -netdev tap,id=h1 -vnc :0 -drive file=/images/RHEL-64-virtio.qcow2 \
-chardev socket,host=localhost,port=1024,id=chr0 \
-object rng-egd,chardev=chr0,id=rng0 \
-device virtio-rng-pci,rng=rng0,max-bytes=1024000,period=1000
(guest) # dd if=/dev/hwrng of=/dev/null
note: cancelling dd process by Ctrl+c, it will return the read speed.
Problem: the speed is around 1k/s
===================
If I use rng-random backend (filename=/dev/random), the speed is about
350k/s).
It seems that when the request entry is added to the list, we don't read the data from queue list immediately.
The chr_read() is delayed, the virtio_notify() is delayed. the next request will also be delayed. It effects the speed.
I tried to change rng_egd_chr_can_read() always returns 1, the speed is
improved to (about 400k/s)
Problem: we can't poll the content in time currently
Any thoughts?
Thanks, Amos
** Affects: qemu
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1253563
Title:
bad performance with rng-egd backend
Status in QEMU:
New
Bug description:
1. create listen socket
# cat /dev/random | nc -l localhost 1024
2. start vm with rng-egd backend
./x86_64-softmmu/qemu-system-x86_64 --enable-kvm -mon chardev=qmp,mode=control,pretty=on -chardev socket,id=qmp,host=localhost,port=1234,server,nowait -m 2000 -device virtio-net-pci,netdev=h1,id=vnet0 -netdev tap,id=h1 -vnc :0 -drive file=/images/RHEL-64-virtio.qcow2 \
-chardev socket,host=localhost,port=1024,id=chr0 \
-object rng-egd,chardev=chr0,id=rng0 \
-device virtio-rng-pci,rng=rng0,max-bytes=1024000,period=1000
(guest) # dd if=/dev/hwrng of=/dev/null
note: cancelling dd process by Ctrl+c, it will return the read speed.
Problem: the speed is around 1k/s
===================
If I use rng-random backend (filename=/dev/random), the speed is about
350k/s).
It seems that when the request entry is added to the list, we don't read the data from queue list immediately.
The chr_read() is delayed, the virtio_notify() is delayed. the next request will also be delayed. It effects the speed.
I tried to change rng_egd_chr_can_read() always returns 1, the speed
is improved to (about 400k/s)
Problem: we can't poll the content in time currently
Any thoughts?
Thanks, Amos
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1253563/+subscriptions
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] [Bug 1253563] [NEW] bad performance with rng-egd backend
2013-11-21 9:24 [Qemu-devel] [Bug 1253563] [NEW] bad performance with rng-egd backend Amos Kong
@ 2013-11-21 11:01 ` Launchpad Bug Tracker
2013-11-26 15:57 ` Amos Kong
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Launchpad Bug Tracker @ 2013-11-21 11:01 UTC (permalink / raw)
To: qemu-devel
You have been subscribed to a public bug by Amos Kong (amoskong):
1. create listen socket
# cat /dev/random | nc -l localhost 1024
2. start vm with rng-egd backend
./x86_64-softmmu/qemu-system-x86_64 --enable-kvm -mon chardev=qmp,mode=control,pretty=on -chardev socket,id=qmp,host=localhost,port=1234,server,nowait -m 2000 -device virtio-net-pci,netdev=h1,id=vnet0 -netdev tap,id=h1 -vnc :0 -drive file=/images/RHEL-64-virtio.qcow2 \
-chardev socket,host=localhost,port=1024,id=chr0 \
-object rng-egd,chardev=chr0,id=rng0 \
-device virtio-rng-pci,rng=rng0,max-bytes=1024000,period=1000
(guest) # dd if=/dev/hwrng of=/dev/null
note: cancelling dd process by Ctrl+c, it will return the read speed.
Problem: the speed is around 1k/s
===================
If I use rng-random backend (filename=/dev/random), the speed is about
350k/s).
It seems that when the request entry is added to the list, we don't read the data from queue list immediately.
The chr_read() is delayed, the virtio_notify() is delayed. the next request will also be delayed. It effects the speed.
I tried to change rng_egd_chr_can_read() always returns 1, the speed is
improved to (about 400k/s)
Problem: we can't poll the content in time currently
Any thoughts?
Thanks, Amos
** Affects: qemu
Importance: Undecided
Status: New
--
bad performance with rng-egd backend
https://bugs.launchpad.net/bugs/1253563
You received this bug notification because you are a member of qemu-devel-ml, which is subscribed to the bug report.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [Bug 1253563] [NEW] bad performance with rng-egd backend
2013-11-21 9:24 [Qemu-devel] [Bug 1253563] [NEW] bad performance with rng-egd backend Amos Kong
2013-11-21 11:01 ` Launchpad Bug Tracker
@ 2013-11-26 15:57 ` Amos Kong
2020-08-07 10:05 ` [Bug 1253563] " Thomas Huth
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Amos Kong @ 2013-11-26 15:57 UTC (permalink / raw)
To: Amos Kong; +Cc: Amit Shah, Paolo Bonzini, qemu-devel, aliguori
On Thu, Nov 21, 2013 at 09:24:11AM -0000, Amos Kong wrote:
> Public bug reported:
>
>
> 1. create listen socket
> # cat /dev/random | nc -l localhost 1024
>
> 2. start vm with rng-egd backend
>
> ./x86_64-softmmu/qemu-system-x86_64 --enable-kvm -mon chardev=qmp,mode=control,pretty=on -chardev socket,id=qmp,host=localhost,port=1234,server,nowait -m 2000 -device virtio-net-pci,netdev=h1,id=vnet0 -netdev tap,id=h1 -vnc :0 -drive file=/images/RHEL-64-virtio.qcow2 \
> -chardev socket,host=localhost,port=1024,id=chr0 \
> -object rng-egd,chardev=chr0,id=rng0 \
> -device virtio-rng-pci,rng=rng0,max-bytes=1024000,period=1000
>
> (guest) # dd if=/dev/hwrng of=/dev/null
>
> note: cancelling dd process by Ctrl+c, it will return the read speed.
>
> Problem: the speed is around 1k/s
>
> ===================
>
> If I use rng-random backend (filename=/dev/random), the speed is about
> 350k/s).
>
> It seems that when the request entry is added to the list, we don't read the data from queue list immediately.
> The chr_read() is delayed, the virtio_notify() is delayed. the next request will also be delayed. It effects the speed.
Currently we have a request queue to cache un-processed request,
but new request_entropy is only comming when last request is processed
(chr dev data is filled to request->data, copied to VQ, and notify
virtio.
So the queue always has 0 or 1 items. The request process is designed
to sync, but it doesn't work.
Does this limitation come from virtio-rng driver in guest?
> I tried to change rng_egd_chr_can_read() always returns 1, the speed is
> improved to (about 400k/s)
>
> Problem: we can't poll the content in time currently
> Any thoughts?
>
> Thanks, Amos
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 1253563] Re: bad performance with rng-egd backend
2013-11-21 9:24 [Qemu-devel] [Bug 1253563] [NEW] bad performance with rng-egd backend Amos Kong
2013-11-21 11:01 ` Launchpad Bug Tracker
2013-11-26 15:57 ` Amos Kong
@ 2020-08-07 10:05 ` Thomas Huth
2020-08-19 8:07 ` Amos Jianjun Kong
2020-10-19 4:17 ` Launchpad Bug Tracker
4 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2020-08-07 10:05 UTC (permalink / raw)
To: qemu-devel
Looking through old bug tickets... is this still an issue with the
latest version of QEMU? Or could we close this ticket nowadays?
** Changed in: qemu
Status: New => Incomplete
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1253563
Title:
bad performance with rng-egd backend
Status in QEMU:
Incomplete
Bug description:
1. create listen socket
# cat /dev/random | nc -l localhost 1024
2. start vm with rng-egd backend
./x86_64-softmmu/qemu-system-x86_64 --enable-kvm -mon chardev=qmp,mode=control,pretty=on -chardev socket,id=qmp,host=localhost,port=1234,server,nowait -m 2000 -device virtio-net-pci,netdev=h1,id=vnet0 -netdev tap,id=h1 -vnc :0 -drive file=/images/RHEL-64-virtio.qcow2 \
-chardev socket,host=localhost,port=1024,id=chr0 \
-object rng-egd,chardev=chr0,id=rng0 \
-device virtio-rng-pci,rng=rng0,max-bytes=1024000,period=1000
(guest) # dd if=/dev/hwrng of=/dev/null
note: cancelling dd process by Ctrl+c, it will return the read speed.
Problem: the speed is around 1k/s
===================
If I use rng-random backend (filename=/dev/random), the speed is about
350k/s).
It seems that when the request entry is added to the list, we don't read the data from queue list immediately.
The chr_read() is delayed, the virtio_notify() is delayed. the next request will also be delayed. It effects the speed.
I tried to change rng_egd_chr_can_read() always returns 1, the speed
is improved to (about 400k/s)
Problem: we can't poll the content in time currently
Any thoughts?
Thanks, Amos
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1253563/+subscriptions
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 1253563] Re: bad performance with rng-egd backend
2013-11-21 9:24 [Qemu-devel] [Bug 1253563] [NEW] bad performance with rng-egd backend Amos Kong
` (2 preceding siblings ...)
2020-08-07 10:05 ` [Bug 1253563] " Thomas Huth
@ 2020-08-19 8:07 ` Amos Jianjun Kong
2020-10-19 4:17 ` Launchpad Bug Tracker
4 siblings, 0 replies; 6+ messages in thread
From: Amos Jianjun Kong @ 2020-08-19 8:07 UTC (permalink / raw)
To: qemu-devel
Let's close this bug, it's passed 6 years.
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1253563
Title:
bad performance with rng-egd backend
Status in QEMU:
Incomplete
Bug description:
1. create listen socket
# cat /dev/random | nc -l localhost 1024
2. start vm with rng-egd backend
./x86_64-softmmu/qemu-system-x86_64 --enable-kvm -mon chardev=qmp,mode=control,pretty=on -chardev socket,id=qmp,host=localhost,port=1234,server,nowait -m 2000 -device virtio-net-pci,netdev=h1,id=vnet0 -netdev tap,id=h1 -vnc :0 -drive file=/images/RHEL-64-virtio.qcow2 \
-chardev socket,host=localhost,port=1024,id=chr0 \
-object rng-egd,chardev=chr0,id=rng0 \
-device virtio-rng-pci,rng=rng0,max-bytes=1024000,period=1000
(guest) # dd if=/dev/hwrng of=/dev/null
note: cancelling dd process by Ctrl+c, it will return the read speed.
Problem: the speed is around 1k/s
===================
If I use rng-random backend (filename=/dev/random), the speed is about
350k/s).
It seems that when the request entry is added to the list, we don't read the data from queue list immediately.
The chr_read() is delayed, the virtio_notify() is delayed. the next request will also be delayed. It effects the speed.
I tried to change rng_egd_chr_can_read() always returns 1, the speed
is improved to (about 400k/s)
Problem: we can't poll the content in time currently
Any thoughts?
Thanks, Amos
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1253563/+subscriptions
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 1253563] Re: bad performance with rng-egd backend
2013-11-21 9:24 [Qemu-devel] [Bug 1253563] [NEW] bad performance with rng-egd backend Amos Kong
` (3 preceding siblings ...)
2020-08-19 8:07 ` Amos Jianjun Kong
@ 2020-10-19 4:17 ` Launchpad Bug Tracker
4 siblings, 0 replies; 6+ messages in thread
From: Launchpad Bug Tracker @ 2020-10-19 4:17 UTC (permalink / raw)
To: qemu-devel
[Expired for QEMU because there has been no activity for 60 days.]
** Changed in: qemu
Status: Incomplete => Expired
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1253563
Title:
bad performance with rng-egd backend
Status in QEMU:
Expired
Bug description:
1. create listen socket
# cat /dev/random | nc -l localhost 1024
2. start vm with rng-egd backend
./x86_64-softmmu/qemu-system-x86_64 --enable-kvm -mon chardev=qmp,mode=control,pretty=on -chardev socket,id=qmp,host=localhost,port=1234,server,nowait -m 2000 -device virtio-net-pci,netdev=h1,id=vnet0 -netdev tap,id=h1 -vnc :0 -drive file=/images/RHEL-64-virtio.qcow2 \
-chardev socket,host=localhost,port=1024,id=chr0 \
-object rng-egd,chardev=chr0,id=rng0 \
-device virtio-rng-pci,rng=rng0,max-bytes=1024000,period=1000
(guest) # dd if=/dev/hwrng of=/dev/null
note: cancelling dd process by Ctrl+c, it will return the read speed.
Problem: the speed is around 1k/s
===================
If I use rng-random backend (filename=/dev/random), the speed is about
350k/s).
It seems that when the request entry is added to the list, we don't read the data from queue list immediately.
The chr_read() is delayed, the virtio_notify() is delayed. the next request will also be delayed. It effects the speed.
I tried to change rng_egd_chr_can_read() always returns 1, the speed
is improved to (about 400k/s)
Problem: we can't poll the content in time currently
Any thoughts?
Thanks, Amos
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1253563/+subscriptions
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-10-19 4:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-21 9:24 [Qemu-devel] [Bug 1253563] [NEW] bad performance with rng-egd backend Amos Kong
2013-11-21 11:01 ` Launchpad Bug Tracker
2013-11-26 15:57 ` Amos Kong
2020-08-07 10:05 ` [Bug 1253563] " Thomas Huth
2020-08-19 8:07 ` Amos Jianjun Kong
2020-10-19 4:17 ` Launchpad Bug Tracker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).