Skip to content

Instantly share code, notes, and snippets.

@stevenwilliamson
Created November 20, 2015 09:38
Show Gist options
  • Save stevenwilliamson/4f1cc125091c9bf2e750 to your computer and use it in GitHub Desktop.
Save stevenwilliamson/4f1cc125091c9bf2e750 to your computer and use it in GitHub Desktop.
# Enable LZ4 on the root delegated dataset, so incoming zfs send | recv
# operations inherit it.
zfs { $delegated_root: compression => 'lz4' }
zfs { $mysql_dataset:
atime => 'off', # disable atime (it probably is for the entire pool, but lets be sure!)
compression => 'lz4', # http://don.blogs.smugmug.com/2008/10/13/zfs-mysqlinnodb-compression-update/
primarycache => 'metadata', # ZFS ARC is just doubling the InnoDB buffer pool in memory, so leave it to do it's thing.
devices => 'off',
exec => 'off',
logbias => 'latency',
mountpoint => $mysql::server::config::mysql_data_root,
recordsize => "16K" # https://blogs.oracle.com/realneel/entry/mysql_innodb_zfs_best_practices
}
zfs { $mysql_log_dataset:
atime => 'off', # disable atime (it probably is for the entire pool, but lets be sure!)
compression => 'lz4', # http://don.blogs.smugmug.com/2008/10/13/zfs-mysqlinnodb-compression-update/
devices => 'off',
exec => 'off',
logbias => 'latency',
recordsize => "128K", # https://blogs.oracle.com/realneel/entry/mysql_innodb_zfs_best_practices
mountpoint => $mysql_log_root
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment