Make separate datasets for InnoDB's data files and log files. Set recordsize=16K on InnoDB's data files to avoid expensive partial record writes and leave recordsize=128K on the log files. Set primarycache=metadata on both to prefer InnoDB's caching.[https://www.patpro.net/blog/index.php/2014/03/09/2617-mysql-on-zfs-on-freebsd/] Set logbias=throughput on the data to stop ZIL from writing twice.
Set skip-innodb_doublewrite in my.cnf to prevent innodb from
also writing twice. The double writes are a data integrity feature meant to protect against partially-written pages, but those are not possible on ZFS.[https://www.percona.com/blog/2014/05/23/improve-innodb-performance-write-bound-loads/] WARNING: The source now says, "Update: do not do this, this has been proven to corrupt data !"
On Linux, the driver's AIO implementation is a compatibility shim that just barely passes the POSIX standard. InnoDB performance suffers when using its default AIO codepath. Set innodb_use_native_aio=0 and innodb_use_atomic_writes=0 in my.cnf to disable AIO. Both of these settings must be disabled to disable AIO.