Virtualbox guest處理file io很慢 - Linux

Table of Contents

※ 引述《aMaa (aMa)》之銘言:
: 環境 host: windows7 RAM 4G 64bit 硬碟1T
: guest: ubuntu 12.04 RAM 2G 32bit 硬碟480G
: https://github.com/nexgenta/opencaster/blob/master/tools/tscbrmuxer/tscbrmuxer.c
: 這支程式純linux架構執行大約3秒, virtualbox ubuntu gest須花10秒左右 @@
: 請大家給我意見, thanks

host和guest OS有各自的I/O cache
host=windows時,guest應該可以設定讓Vbox停用host I/O cache

除了在host fs下建立虛擬磁碟image,vbox也支援把整顆硬碟或整個分割區建立成虛擬磁碟
意即直接在硬碟上建立guest fs,理論上會快一點。當然搭配VT-d虛擬化更好

host RAM才4G就分了一半給guest,所以也可能是windows page in/out花去了時間

另外可以善用linux的tmpfs (/dev/shm),先寫到記憶體中,最後再一次搬回硬碟

--

Nice to meld you.

--

All Comments

Tristan Cohan avatarTristan Cohan2015-10-28
記憶體不是無限大,而且是跟 host shared