Bug 684786

Summary: cache, aio defaults not applied to disks added via 'add hardware'
Product: Red Hat Enterprise Linux 6 Reporter: Cole Robinson <crobinso>
Component: python-virtinstAssignee: Cole Robinson <crobinso>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: dyuan, hjiang, mzhan, rwu, troels
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Optimal cache and aio defaults were only applied at guest creation time, but not to disk devices added to an existing guest. Consequence: Disk performance was sub optimal for disks added to existing guests. Fix: Make sure optimal defaults are applied to new disks for existing guests. Result: Better performance!
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 16:15:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Cole Robinson 2011-03-14 13:51:48 UTC
We aren't applying RHEL6 cache/aio defaults to disks added after install time. Mentioned in an community members performance analysis:

http://www.ilsistemista.net/index.php/virtualization/11-kvm-io-slowness-on-rhel-6.html?start=7

Comment 1 RHEL Program Management 2011-04-04 02:15:21 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 2 Cole Robinson 2011-04-07 17:18:16 UTC
As much as I'd like to get this in, it could possibly cause regressions, so deferring to 6.2

Comment 3 Cole Robinson 2011-07-21 21:50:29 UTC
Fixed upstream in virtinst with a build time switch for rhel6 defaults:

http://git.fedorahosted.org/git?p=python-virtinst.git;a=commit;h=0075dd8730adaf8aa3d7f90655d0626374fdd5b4

Comment 4 Cole Robinson 2011-07-28 15:33:47 UTC
Fixed in python-virtinst-0.600.0-1.el6

Comment 6 Huming Jiang 2011-08-03 11:19:44 UTC
verified with the following components:
rplibvirt-0.9.4-0rc1.2.el6.x86_64
qemu-kvm-0.12.1.2-2.175.el6.x86_64
python-virtinst-0.600.0-2.el6.noarch
kernel-2.6.32-171.el6.x86_64


Steps:
# virt-install -n test -r 512 --disk path=/var/lib/libvirt/images/test.img,cache=none,io=threads --disk path=/dev/sda1 -c /home/en_windows_xp_professional_x64.iso --vnc

#virsh dumpxml test
...
 <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='threads'/>
      <source file='/var/lib/libvirt/images/test.img'/>
      <target dev='hda' bus='ide'/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' unit='0'/>
    </disk>
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native'/>
      <source dev='/dev/sda1'/>
      <target dev='hdb' bus='ide'/>
      <alias name='ide0-0-1'/>
      <address type='drive' controller='0' bus='0' unit='1'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/home/en_windows_xp_professional_x64.iso'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <alias name='ide0-1-0'/>
      <address type='drive' controller='0' bus='1' unit='0'/>
    </disk>
...
Additional info: Reference to Bug 690750, and Bug 722938

Comment 7 Cole Robinson 2011-11-07 17:09:45 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause:
Optimal cache and aio defaults were only applied at guest creation time, but not to disk devices added to an existing guest.

Consequence:
Disk performance was sub optimal for disks added to existing guests.

Fix:
Make sure optimal defaults are applied to new disks for existing guests.

Result:
Better performance!

Comment 8 errata-xmlrpc 2011-12-06 16:15:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1643.html