Performance

From OpenZFS on OS X
Revision as of 10:41, 13 August 2014 by 174.70.143.102 (Talk)

Jump to: navigation, search

Status

Currently OpenZFS on OS X is active development, with priority being given to stability and integration enhancements, before performance.

Performance Tuning

Memory Utilization

ZFS uses memory caching to improve performance. Filesystem meta-data, data, and the De-duplication Tables (DDT) are stored in the ARC, allowing frequently accessed data to be accessed many times faster than possible from hard disk media. The performance that you experience with ZFS can be directly linked to the amount of memory that is allocated to the ARC.

O3X 1.3.0 sets the default maximum ARC size to just 25% of your computer's main memory, as opposed to illumos, which sets it at 75%, and ZFS on Linux, which sets it at 50%. Due to space efficiency limitations in the O3X allocator, this will result in up to 40% of your computer's memory being occupied by ZFS.

O3X uses Wired (non-pageable) memory for the ARC. Activity Monitor and Top can display the total amount of Wired memory allocated. The spl.kmem_bytes_total sysctl contains the amount of memory allocated by ZFS. The difference between these figures reflects memory use by the kernel and the efficiency factor of the allocator. A real world example, a 32GB iMac, has ARC set to 8GB. Approximately 7GB RAM allocated by ZFS, results in approximately 10.5GB of Wired RAM in use.

The size of the ARC is controllable by altering the value stored in the sysctl zfs.arc_max which can be set by:

sudo sysctl -w zfs.arc_max=<arc size in bytes>

When configuring large amount of ARC storage, the total allocated memory should be carefully monitored as the machines performance may suffer if too much memory is allocated.

Future improvements to the allocator will improve its space efficiency for small allocations, which will address some of the limitations present in current code.

Current Benchmarks

In order to establish a baseline of current performance of OpenZFS on OS X, measurements have been made using the iozone [1] benchmarking tool. The benchmark consists of running various ZFS implementations inside a VMware 6.0.2 VM on a 2011 iMac. Each VM is provisioned with 8GB of RAM, an OS boot drive, and a 5 GB second HDD containing a ZFS dataset. The HDDs are standard VMware .vmx files.

The test zpool was created using the following command:

zpool create -o ashift=12 -f tank <disk device name>

The benchmark consists of the following steps:

  1. Start the VM.
  2. Import the tank dataset
  3. Execute -> mkdir /tank/tmp && cd /tank/tmp
  4. Execute -> time iozone -a
  5. Record Time 1
  6. Execute -> time iozone -a
  7. Record time 2
  8. Terminate the VM and VMware before moving to the next ZFS implementation/OS combination.


The results are as follows:


Comparison of ZFS implementations