I’m running OpenBSD on top of bHyve using virtual disks allocated out of ZFS 
pools.  While not the same setup, some concepts carry over…

I have two types of pools:

  1) an “expensive" pool for fast random IO:
        - this pool is made up stripes of SSD-based vdevs.
        - ZFS is configured to use a 16K recordsize for this pool.
        - good for small files (guest OS, DBs, web/mail/dns files, etc.)
        - When ZFS is told to use the SSD, it starts the partition
           on sector 256 (not the default sector 34) to ensure good
           SSD NAND alignment.

  2) a less-expensive pool for large sequential IO:
        - this pool is a single RAIDZ2-based vdev using spinning rust.
        - ZFS is configured to use a 1M recordsize for this pool.
        - good for large files (movies, high-res images, backups, etc.)

Virtual disks are exposed to the OpenBSD guests from both pools.  The guest’s 
root-disk is always allocated from pool #1.  Typically, a second 
application-specific disk is also allocated from pool #1 (e.g., /var/www/sites 
on a web server, /home on a mail server, etc.).  Only in special circumstances 
(e.g., a media server) is a disk allocated from pool #2. 

This arrangement steps around needing to read/write 1M blocks for each small 
file access, and also the possibility that a guest accessing a given block will 
span more than a single physical block.

Can VMWare virtual disks be configured similarly?

K.


> On Apr 21, 2021, at 12:35 PM, Tom Smyth <tom.sm...@wirelessconnect.eu> wrote:
> 
> Christian, Otto, Thanks for your feedback on this one....
> 
> Ill research it further,
> but NTFS has 4K, 8K 32K and 64K Allocation units on the
> filessystem and for Microsoft  windows running Exchange or Database workloads
> they were recommending alignment of the NTFS partitions
> on the 1MB offset also.
> 
> From Otto's, explanation (Thanks) of 1/16  blocks would potentially
> cross a boundary  of the
> storage subsystem,
> 6.25% of reads(or writes)  could result in a double Read ( or double write)
> 
> of course the write issue is a bigger problem for the SSDs..
> 
> I can configure the partitions how I want ,for now anyway,
> 
> Ill do a little digging on FFS and FFS2 and see how the filesystem
> database (or table)
> is structured...
> 
> Thanks for the feedback it is very helpful to me....
> 
> All the best,
> 
> Tom Smyth
> 
> 
> 
> On Wed, 21 Apr 2021 at 15:25, Christian Weisgerber <na...@mips.inka.de> wrote:
>> 
>> Tom Smyth:
>> 
>>> if you were to have a 1MB file or  a database that needed to read 1MB
>>> of data,  i
>>> f the partitions are not aligned then
>>> your underlying storage system need to load 2 chunks  or write 2
>>> chunks for 1 MB of data, written,
>> 
>> You seem to assume that FFS2 would align a 1MB file on an 1MB border
>> within the filesystem.  That is not case.  That 1MB file will be
>> aligned on a blocksize border (16/32/64 kB, depending on filesystem
>> size).  Aligning the partition on n*blocksize has no effect on this.
>> 
>> --
>> Christian "naddy" Weisgerber                          na...@mips.inka.de
> 
> 
> 
> -- 
> Kindest regards,
> Tom Smyth.
> 

Reply via email to