[vbox-dev] disk i/o optimization info

Huihong Luo huisinro at yahoo.com
Thu Apr 9 09:12:42 PDT 2009


Hi,
 
I'd like to understand more on how carefully vbox virtual disk is designed to achieve high performance. Can someone shed some lights?  (I know i could digg into the source code)
 
These are some of my rough ideas, pls correct me:
 
(1) fixed look up time. When disk i/o arrives, it will first look up the grain table directory, grain tables, and then perform the real i/o. So the worst scenario, one disk i/o from vm will cause 2 (or 3) disk i/o on host. The lookup time is fixed and fast. For writes, it might need one more i/o to save the grain table.
 
(2) lookup cache. I could imagine some lookup entries must be cached in memory to avoid reloading from disk. If so, how large is such memory being allocated?
 
(3) disk sector cache? Any caching mechasim for the real sectors fetched? Perhaps, you use the file API for disk access, so the host OS might have cached the disk sectors.
 
(4) BIOS access to virtual disk. On boot time, bios access disk in emulation mode, anything special is done to accelerate disk i/o? Is it possible raw disk (directly r/w to a hd or parition) boots slowly than .vdi or .vmdk files? Because there isn't much to be done for raw disk.
 
(5) "Preserving" Disk scheduling algorithm. These algorithms are operated assuming a real hard disk, however, since vbox uses virtual disks, would these algorithms still work? For example, on virtual disk, originally contiguous may be no longer so, sectors with smaller offsets might be actually lie at the end, etc. Anything special is done on this area?
 
Thanks,
 
Huihong
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.virtualbox.org/pipermail/vbox-dev/attachments/20090409/6a7479d9/attachment-0001.html 


More information about the vbox-dev mailing list