Thanks for the helpful response. 

FYI, I did some more research and discovered that Hyper-V doesn’t support 
booting from virtual SCSI drives, so that solves that. 

I have another vm running on my laptop under KVM that runs substantially faster 
than the hyper-v vm.  My laptop is far below the hyper-v server in most 
respects performance-wise, but it does have an SSD.  I’d be curious to find out 
how much of that is raw disk IO performance and how much is KVM vs Hyper-V and 
openbsd’s respective drivers for each. 

I’ll give the softdeps suggestion a shot. 

Sent from my iPhone

> On Oct 23, 2017, at 7:25 PM, Nick Holland <n...@holland-consulting.net> wrote:
> 
>> On 10/23/17 17:41, Daniel Boyd wrote:
>> Is there a recommended configuration for virtual disks in Hyper-V?  I
>> have a virtual machine that I set up recently running 6.2 that has
>> *very* slow disk performance.  It took well over an hour to untar
>> ports.tar.gz.  The host server is a few years old, but it's running 3
>> RAID-5 7200rpm drives, quad-core Xeon and 32 GB RAM... so not exactly a
>> slow machine.  And this is the only Hyper-V VM it's hosting.
> 
> actually...raid5 is slow on writes (write one block = read existing
> block.  Read parity block.  Write data, write parity.  Hopefully, you
> have a write cache that's on and working), 7200rpm drives are slow by
> any standards these days.  That's a heavy-lifting drive, not anything to
> mention in the same sentence as "not slow".
> 
> (don't get me wrong, I got a lot of heavy-lifting drives.  And I'm kinda
> slow.  But I try to be realistic about it).
> 
>> I've got the virtual disk configured as IDE / VHDX / Expanding (the
>> Hyper-V defaults). 
> 
> "expanding" means not preallocating the disk, I'm guessing?  Again, not
> a performance choice.  Your file system fragments are going to be
> fragmented.
> 
>> The controller can be IDE or SCSI.  The disk format
>> can be VHD or VHDX.  And the disk can be configured as fixed or
>> expanding.  I'm going to try converting the disk to fixed and
>> defragging my NTFS.
>> 
>> Any thoughts on IDE vs SCSI and VHD vs VHDX?
> 
> Neat thing: OpenBSD doesn't care much.  You can change it at the
> hypervisor level, reboot, and see for yourself how it works. This isn't
> Windows or Linux which will have a cow if you change the disk type or
> controller type after load. (before DUIDs, you might have to change your
> /etc/fstab, but as long as you are using DUIDs, you should be in good
> shape there).
> 
> But ... for unpacking ports, make sure that file system is mounted (at
> the OpenBSD level) with softdeps.  Yes, it's really a huge difference
> for lots of tiny files, which is exactly what the ports tree is.  This
> will matter more than hypervisor knobs, I suspect.
> 
> Nick.
> 

Reply via email to