RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1017636 - PATCH: fix qemu using 50% host cpu when audio is playing
Summary: PATCH: fix qemu using 50% host cpu when audio is playing
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Miroslav Rezanina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-10 09:27 UTC by Hans de Goede
Modified: 2014-06-18 03:39 UTC (History)
10 users (show)

Fixed In Version: qemu-kvm-1.5.3-38.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 11:31:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Hans de Goede 2013-10-10 09:27:59 UTC
qemu-1.5 has a regression where the audio_timer tries to expires every nano second, which gets rate limited to every 250 us by the timer subsys, resulting in 4000 wakeups per seconds for vms with audio active.

Here is an upstream patch fixing this:
http://lists.nongnu.org/archive/html/qemu-devel/2013-10/msg01204.html

Dropping host cpu load to a much better 13%. And here is a follow up patch further limiting the wakeup rate from 250 / second (which is a bit much) to 100 / second:
http://lists.nongnu.org/archive/html/qemu-devel/2013-10/msg01205.html

Further reducing the host cpu load for playing audio to 9%.

Comment 2 Hans de Goede 2013-12-04 09:23:24 UTC
(In reply to Miroslav Rezanina from comment #1)
> Using patches lower cpu consumption to less then half of the consumption
> without them. However, only one of patches applied upstream, waiting for
> second to be applied.

The second one may cause issues with Windows guests (this needs more testing), which is why it was not applied. Most of the benefits come from the first patch, so I suggest just moving forward with only the 1st patch, the 2nd patches may very well never get applied upstream.

Comment 3 Hans de Goede 2013-12-11 08:15:09 UTC
Quick update on this, the second patch has been accepted upstream now:
http://git.qemu.org/?p=qemu.git;a=commitdiff;h=40a814b0b1789b94c483190b3208729b5182e5bd

There also is a related patch which we should probably also pick up (although it is unlikely to impact typical RHEL qemu use):
http://git.qemu.org/?p=qemu.git;a=commitdiff;h=0e8ae611bda0dfb038da2d865801d8adbd692bad

Comment 5 Miroslav Rezanina 2014-01-17 13:27:04 UTC
Fix included in qemu-kvm-1.5.3-38.el7

Comment 7 Qian Guo 2014-02-11 02:14:20 UTC
Hi, Miroslav

Does this bug related with virtual sound deivces, do we qe need test this bug with which sound deivce (AC97/intel-hda)?
And should we test both windows/linux guests?


Thanks,

Comment 8 Miroslav Rezanina 2014-02-11 04:26:39 UTC
Hi Qian,
this should be applicable to both sound device on both windows/linux guests to see full impact of patches (I was able to test only with linux).

Comment 9 Qian Guo 2014-02-19 08:19:47 UTC
Test this bug with qemu-kvm-1.5.3-30.el7.x86_64 and qemu-kvm-1.5.3-48.el7.x86_64, and guests I used rhel7  and win7, the following matrix is the result that I got:

1.Reproduce this bug with  qemu-kvm-1.5.3-30.el7.x86_64, the value is the cpu usage:

            | RHEl7       |        Win7  
------------|-------------|-------------------------------------------   
intel-hda   | 42%~55%     |        25%~34%
------------|-------------|-------------------------------------------
AC97        | 40%~55%     |        Windows not support AC97 by default



2.Verify this bug with  qemu-kvm-1.5.3-48.el7.x86_64:

            | RHEl7       |        Win7  
------------|-------------|-------------------------------------------   
intel-hda   | 17%~25%     |        11%~15%
------------|-------------|-------------------------------------------
AC97        | 15%~25%     |        Windows not support AC97 by default


Hi, Miroslav

windows can not use AC97 sound device, and accoridng to above, can it verify this bug?

thanks

Comment 10 Miroslav Rezanina 2014-02-19 08:42:53 UTC
Hi Qian,

yes, these numbers verify the fix is working.


Mirek

Comment 11 Qian Guo 2014-02-19 08:50:41 UTC
Thank Mirek for the quick response.

So according to comment #9 and comment #10, this bug is fixed by qemu-kvm-1.5.3-48.el7.x86_64

Comment 13 Ludek Smid 2014-06-13 11:31:41 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


Note You need to log in before you can comment on or make changes to this bug.