On Sat, 11 Aug 2018 18:09:15 +0200 Martin Husemann <mar...@duskware.de> wrote:
> On Sat, Aug 11, 2018 at 04:02:44PM +0100, Sad Clouds wrote: > > Hi, so you're saying that with ucb_direct read/write on mounted file > > system should also speed things up compared to NetBSD-8? I see > > terrible I/O performance with NetBSD running as a VM on a > > VirtualBox, just reading/writing regular files is quite slow > > compared to Linux VMs on the same hardware. I've never been able to > > figure out the reasons for it, maybe Linux has better integration > > with VirtualBox and better optimisations. > > We had a similar discussion on some list a while back and I did some > timings. My values were close to the ones others cited for Linux and > others said their NetBSD timings were a lot worse than mine. > > I use SATA and NVMe emulations in virtual box, and mount all > filesystems on the emulated SATA drives with "log". > > Don't think I had to tweak anything special on the host or in virtual > box. > > Martin Yes we did, however I only get about 50 MB/sec on a NetBSD VM, file system mounted with "log", while Debian physical host that runs VirtualBox-5.2.16 is capable of around 800 MB/sec: $ dd if=/dev/zero of=out bs=1M count=10000 conv=fsync 10000+0 records in 10000+0 records out 10485760000 bytes (10 GB, 9.8 GiB) copied, 13.0382 s, 804 MB/s Yes there will be some virtualisation overhead, but not this much. I started comparing raw device I/O on NetBSD VM and got around 200 MB/sec, but that is still somewhat less than what I was expecting. But if I boot NetBSD on this physical hardware from a second disk and read raw device that contains Debian on RAID0 SSDs, I get around 890 MB/sec. So there is something weird about running NetBSD in a VirtualBox. Linux VMs don't seem to have such issues. There are a few other things I'm going to try, but at the moment I just don't know what causes this.