Hi,
It's helpful to configure Windows guests so the amount of data the OS writes to disk is minimised. When using a dynamically-expanding VDI file, that prevents the VDI from growing larger than necessary. I submitted a ticket suggesting an option to do that in the guest additions installer, see http://www.virtualbox.org/ticket/5628
I've pasted some of the text of that ticket here, since I figure people might want to know how to manually configure their Windows VMs.
When using dynamically-expanding hard disk files, it's really useful to reduce the amount of writes performed by the guest OS. That reduces the size of the VDI file on the host and improves performance. Doing that is also useful for use when the host drive is a flash-based SSD. For example, optimisations performed automatically by Windows XP and later move the location of data on the disk for faster access. That would most likely actually reduce performance, as well as waste disk space, when using a dynamically-expanding VDI in VirtualBox.
Some changes which reduce the amount of disk writes:
* Disable the NTFS change journal. That can be done using the command fsutil.exe usn deletejournal C:
See http://www.microsoft.com/resources/docu ... l_usn.mspx
* On Vista, disable SuperFetch.
* Disable the Windows XP prefetcher:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters] "EnablePrefetcher"=dword:00000000 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction] "Enable"="N"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion?\OptimalLayout] "EnableAutoLayout"=dword:00000000
* Using the Microsoft dskcache.exe tool, enable the "power protected" write cache option. Get that via http://support.microsoft.com/kb/Q811392
Use it like this: dskcache.exe +p c:
There is probably a registry key which can be changed, instead of having to use that Microsoft program.
* Disable hibernation in the guest OS (optional, but there isn't much need for it and doing that prevents the user accidentally hibernating and causing a lot of data to be written to disk).
* Disable System Restore (optional)
* Disable 8.3 filename creation on NTFS partitions: fsutil.exe behavior set disable8dot3 1
In Windows 2000 and earlier you need to change a registry value: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem] Change NtfsDisable8dot3NameCreation from 0 to 1.
- Disable updating file last-accessed timestamps: fsutil.exe behavior set disablelastaccess 1
- Disable indexing on all drives
Has anyone got any other ideas?
How to minimise the amount of writes in a Windows guest
-
MarkCranness
- Volunteer
- Posts: 875
- Joined: 10. Oct 2009, 06:27
- Primary OS: MS Windows 7
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows Server 2008 R2; Ubuntu 11.04; Windows 2000 Server; Windows XP
Re: How to minimise the amount of writes in a Windows guest
That's a pretty good list.
On pre-WinXP systems not having fsutil.exe (Windows 2000 at least), free software Everything can delete/disable the USN Journal: http://www.voidtools.com/Everything/wik ... leshooting
... Or Microsoft seem to condone copying fsutil.exe from XP to Windows 2000: http://support.microsoft.com/kb/176970
On pre-WinXP systems not having fsutil.exe (Windows 2000 at least), free software Everything can delete/disable the USN Journal: http://www.voidtools.com/Everything/wik ... leshooting
... Or Microsoft seem to condone copying fsutil.exe from XP to Windows 2000: http://support.microsoft.com/kb/176970