I know that Wubi is slower in disk IO, but I can't find anything about it online other than vague statements such as "slightly slower disk seeks". Has anyone done any benchmarks to quantify the speed difference?
You've inspired an article on Phoronix, entitled The Performance Impact Of Ubuntu's Wubi Windows Installer, which on the 2nd, 3rd and 4th pages has a series of benchmarks that show quite clearly the performance impact, see an example below:
I found this on the forums, You can read it in it's original post here
Disk performance is slightly slower. You should not be able to notice any difference under normal circumstances. The problem becomes more evident if you have little memory and use swap a lot or if your windows partition is very fragmented. It should be still far faster than under a typical VM or LiveCD.
The filesystem is less reliable than in a real installation. This is because you have 2 filesystems nested within each other which makes it more vulnerable than ntfs or ext3 taken individually. This can be an issue if you hard reboot (unplugging the power). Hard reboots are never ever a good idea, but even less so in wubi. We have taken some measures to minimize the risk (and will add a couple of tricks to next build), so that hard reboots can be better tolerated, but the rule of thumb is: do not hard reboot. In linux there are alt+sysrq key combinations if you get stack for any reason.
Hibernation / Suspend does not work properly. We are looking into this with the help of some ubuntu kernel devs. Either we'll fix that or we will disable hibernation/suspend.
A side issue is that with wubi people tend to allocate less disk space than they would with a normal installation (since they take it as a trial and then keep using it). Of course if the free space is over, it is going to create issues, but that is hardly our fault. We are looking into ways to expand virtual disks, but that would be a separate app anyway. That said in linux you can create a link from a folder within a real partition to a folder within a virtual disk, thus alleviating the pain.
In short: allocate enough space, do not hard reboot and do not suspend/hibernate. Other than that it should be the full monty: same speed (other than for #1), same hardware support/detection, same behaviour, same software. A small trade-off considering that we* provide what can possibly be considered the easiest OS installer ever created, whatever the OS.
As for long term use, I would consider wubi as a mid-term solution. You can use it happily for weeks and months, but because of the 3 issues above, if you find yourself using Ubuntu quite heavily, you might want to do a full installation later on. That said we have a tool to migrate virtual disks to a real partition (LVPM by tuxcantfly). So migration should be quite smooth (that should result in an installation which is 100% identical to a standard one while keeping your data and settings).
If you have a free partition or a spare hard disk and are confident about partitioning and ISO burning there is no much reason to use Wubi, just go straight for the full installation via live CD. But for people that do not know what a partition is, wubi is probably the best solution to date, particularly once tools such as LVPM reach final status. I hope that wubi will bring a small revolution to Linux installers and hence to Linux adoption, similar to what Knoppix/LiveCD did a few years ago', and I would not be too surprised to see Wubi clones implemented by other *nix distros in the near future.
FYI: Wubi will hopefully become an official installation method by next Ubuntu release and we will "merge" with Ubuntu. Even though the recommended long term installation will still be based on the current LiveCD installer (with partitioning), Wubi installer will also be available on the official CD and as a separate download. By Gutsy we will use the LiveCD ISO as opposed to the Alternate ISO as a source of packages and the installer will be fully "graphical".
- A big chunk of the merit goes to the people that gave us the possibility to boot linux from within windows (grub4dos) and provided us with r/w access to ntfs (ntfs-3g), without such technologies wubi would not be possible today.
Well, two things. One, EXT4 is faster than NTFS, here is a proof : http://www.phoronix.com/scan.php?page=news_item&px=ODIxNw
Two, with NTFS there is fragmentation and even if it's difficult to determine how much it will slower the system you know that it will eventually slow it down.
Three (because there is always a three), don't install Ubuntu on Windows, you don't want to use non free software to start your system that will eventually get an update from Microsoft one day and you won't be able to start Ubuntu again.
I have benchmarked the differences. It also depends on the system but the primary reason for the performance hit is ext3 and the fact that the disk image is a file.
These are four things you can do, however, to increase performance on a Wubi install:
- Convert the filesystem of the disk image from ext3 to ext4. Don't forget to change your /etc/mtab file line to the following, first:
/dev/loop0 / ext4 rw 0 0
If you don't, you won't boot. You can even change that line without doing anything else (and performance will gradually get better with any new files added) but I used the following method, which works even better and gives the benefits of ext4 immediately for all files (you can make your root.disk file larger at the same time, like I did):
Defragment your root.disk and swap.disk files from within Windows using sysinternals' contig command. Just download it for free from the Microsoft TechNet website. Or, you can use any other program that can defragment a single, large file. This made a big impact on improving performance for me, too.
Use the threadirqs kernel line parameter. Your mileage may vary but this worked well for me on my dual core Dell system I use most.
If a program seems still to cause the system to slow down and take a performance hit when you run it, you can add parameters to the offending program in the desktop file like so (this example uses software updater but it will work with others):
ionice -c 3 nice -n 19 /usr/bin/update-manager
Maker sure you have the ionice command installed or this step will do nothing except throw an error.
After doing these four things, the performance hits are a lot less than before. I haven't had much of any issue since and have been very happy with my Wubi install thus far. Hope this is helpful.