Difference between revisions of "Performance"

From OpenZFS on OS X
Jump to: navigation, search
(Current Benchmarks)
Line 4: Line 4:
 
Currently OpenZFS on OS X is active development, with priority being given to stability and integration enhancements, before performance.
 
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.2.0 sets the ARC size to just 6% of your computers main memory. This design decision was made for stability reasons as its not hard to exhaust the built in kernel memory allocator, which allocates memory from a pool that defaults to 25% of your computers main memory.
 +
 +
The O3X project will soon release a version of the code that contains a replacement memory allocator that can access much more of your computers memory. The allocator was recently integrated into the 'master' branch in the source repository. With the introduction of the new allocator, the default ARC size has been raised to 25% of main memory. This has resulted in significant performance improvements. Due to space efficiency limitations in the allocator, this will result in up to 40% of your computers 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 word 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 ==
 
== Current Benchmarks ==
  

Revision as of 23:46, 12 April 2014

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.2.0 sets the ARC size to just 6% of your computers main memory. This design decision was made for stability reasons as its not hard to exhaust the built in kernel memory allocator, which allocates memory from a pool that defaults to 25% of your computers main memory.

The O3X project will soon release a version of the code that contains a replacement memory allocator that can access much more of your computers memory. The allocator was recently integrated into the 'master' branch in the source repository. With the introduction of the new allocator, the default ARC size has been raised to 25% of main memory. This has resulted in significant performance improvements. Due to space efficiency limitations in the allocator, this will result in up to 40% of your computers 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 word 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