Bug 505263 - virtual machine installation very slow if "allocate entire virtual disk" not checked
virtual machine installation very slow if "allocate entire virtual disk" not ...
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: virt-manager (Show other bugs)
5.3
i686 Linux
low Severity medium
: rc
: ---
Assigned To: Cole Robinson
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-11 05:01 EDT by Simon Xu
Modified: 2009-12-14 16:19 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-06-11 05:08:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Simon Xu 2009-06-11 05:01:58 EDT
Description of problem:

In virtual machine manager, during the creating a new virtual machine, if "Allocate entire virtual disk now?" is not checked, creating the image file dynamically will be very slow, and installation will also be very slow.


Version-Release number of selected component (if applicable):

RHEL5.3 (no update package installed) i686


How reproducible:

Always


Steps to Reproduce:

boot to xen kernel (2.6.18-128.el5)
# /etc/init.d/xend restart
# /etc/init.d/libvirtd restart
# virt-manager

* select para-virt, configure the number of memory: 1G, the number of CPU: 2 logical CPU
* start installing guest os, after configuring the guest os (do not check "allocate entire virtual disk now?", it will goes to "format filesystem" interface, and then

Actual results:
during "write super block", it is extremely slow (more than 20 minutes), and during "install package", there is no response.

Expected results:
Formatting filesystem and installation should be very fast.
it should format filesystem correctly and finish installion.


Additional info:
Comment 1 Chris Lalancette 2009-06-11 05:08:09 EDT
In point of fact, this is why we have the "Allocate entire disk now" checked by default.  The problem is that when you uncheck this box, a sparse file is created.  Any data that needs to be written to the device needs to do a full metadata update, which makes formatting and other operations extremely slow.  Switching to another filesystem like ext4 *may* improve the situation, but the basic recommendation is always to use non-sparse files.

I'm going to close this as NOTABUG, since it's a known performance problem with sparse files.

Chris Lalancette
Comment 2 Simon Xu 2009-06-11 05:17:12 EDT
But on x86_64 RHEL5.3, checking "Allocate entire disk now" or not does not make a difference, it is very fast in both ways.
Comment 3 Chris Lalancette 2009-06-11 05:25:21 EDT
(In reply to comment #2)
> But on x86_64 RHEL5.3, checking "Allocate entire disk now" or not does not make
> a difference, it is very fast in both ways.  

Is this on the same hardware?  I've found that the choice of hardware can affect sparse file performance.  However, if it's on exactly the same hardware, then that would be interesting to know.

Chris Lalancette
Comment 4 Stephen Tweedie 2009-06-11 15:37:45 EDT
Other factors that will impact the performance are reuse of an existing file for a new installation, or use of a block device or LVM volume instead of a file.

If the performance is markedly different between 32- and 64-bit in like-for-like testing --- installing to a brand new file on the same filesystem --- then that is definitely something we need to investigate.
Comment 5 Simon Xu 2009-06-18 00:10:08 EDT
I have found that, on two x86_64 machines, both 32- and 64-bit RHEL5.3 (2.6.18-128.el5) have the problem, i.e. it'll be very very slow during "write super block" if "allocate entire virtual disk now?" not checked, and during "install package", there is no response.

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