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:
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
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.
(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
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.
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.