Bug 505263 - virtual machine installation very slow if "allocate entire virtual disk" not checked
Summary: virtual machine installation very slow if "allocate entire virtual disk" not ...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: virt-manager
Version: 5.3
Hardware: i686
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Cole Robinson
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-06-11 09:01 UTC by Simon Xu
Modified: 2009-12-14 21:19 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-06-11 09:08:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Simon Xu 2009-06-11 09:01:58 UTC
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 09:08:09 UTC
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 09:17:12 UTC
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 09:25:21 UTC
(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 19:37:45 UTC
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 04:10:08 UTC
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.