{"id":3137,"date":"2026-07-29T15:01:15","date_gmt":"2026-07-29T06:01:15","guid":{"rendered":"https:\/\/bokumin.org\/blog\/?p=3137"},"modified":"2026-07-30T10:50:12","modified_gmt":"2026-07-30T01:50:12","slug":"freebsd%e3%81%a7zfs%e3%82%92mysql%e5%90%91%e3%81%91%e3%81%ab%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/bokumin.org\/blog\/2026\/07\/29\/freebsd%e3%81%a7zfs%e3%82%92mysql%e5%90%91%e3%81%91%e3%81%ab%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%81%99%e3%82%8b\/","title":{"rendered":"FreeBSD\u3067ZFS\u3092MySQL\u5411\u3051\u306b\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3059\u308b"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>Tuning MySQL on ZFS with FreeBSD<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u306f\u3058\u3081\u306b<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u79c1\u306eWeb\u30b5\u30fc\u30d0\u306fFreeBSD\u306eZFS\u3092\u4f7f\u3063\u3066\u3044\u3066\u3001<code>atime=off<\/code>\u304f\u3089\u3044\u306f\u3084\u3063\u3066\u3044\u305f\u3082\u306e\u306e\u3001\u6b63\u76f4MySQL\u307e\u308f\u308a\u306f\u4f55\u3082\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3057\u3066\u304a\u3089\u305a\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306erecordsize(128k)\u306e\u307e\u307eInnoDB\u3092\u52d5\u304b\u3057\u3066\u3044\u305f\u72b6\u614b\u3067\u3057\u305f\u3002<br>\u3044\u3044\u52a0\u6e1b\u898b\u76f4\u305d\u3046\u3068\u601d\u3063\u3066\u8abf\u3079\u3066\u3044\u305f\u3089\u3001DB\u7528\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3092\u304b\u306a\u308a\u5177\u4f53\u7684\u306b\u307e\u3068\u3081\u3066\u3044\u308b<a href=\"https:\/\/freebsd.seirios.org\/doku.php?id=os:zfs_tips\" target=\"_blank\" rel=\"noreferrer noopener\">\u826f\u8a18\u4e8b<\/a>\u3092\u898b\u3064\u3051\u305f\u306e\u3067\u3001\u305d\u3053\u3067\u7d39\u4ecb\u3055\u308c\u3066\u3044\u308b\u8003\u3048\u65b9\u3092\u53c2\u8003\u306b\u81ea\u5206\u306e\u74b0\u5883\u306b\u3082\u5f53\u3066\u306f\u3081\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u74b0\u5883<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>FreeBSD 14.4-RELEASE-p7<\/li>\n\n\n\n<li>MariaDB 10.11.18 (<code>mysql<\/code>\u30b3\u30de\u30f3\u30c9\u3067\u53e9\u3044\u3066\u3044\u308b\u304c\u5b9f\u4f53\u306fMariaDB\u3002InnoDB\u307e\u308f\u308a\u306e\u8a71\u306a\u306e\u3067\u57fa\u672c\u7684\u306bMySQL\u3068\u5171\u901a)<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:.875rem;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>mysql --version\n# mysql  Ver 15.1 Distrib 10.11.18-MariaDB, for FreeBSD14.3 (amd64) using  EditLine wrapper<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #DCDCAA\">mysql<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">--version<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6A9955\"># mysql  Ver 15.1 Distrib 10.11.18-MariaDB, for FreeBSD14.3 (amd64) using  EditLine wrapper<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u73fe\u72b6\u78ba\u8a8d<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u307e\u305a\u73fe\u5728\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u69cb\u6210\u3092\u78ba\u8a8d\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:.875rem;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>zfs list -r zroot\/var\n\nNAME                 USED  AVAIL  REFER  MOUNTPOINT\nzroot\/var           1.06G   433G    96K  \/var\nzroot\/var\/audit       96K   433G    96K  \/var\/audit\nzroot\/var\/crash       96K   433G    96K  \/var\/crash\nzroot\/var\/db        1.06G   433G  1.06G  \/var\/db\nzroot\/var\/log       7.29M   433G  7.29M  \/var\/log\nzroot\/var\/mail       360K   433G   360K  \/var\/mail\nzroot\/var\/tmp         96K   433G    96K  \/var\/tmp<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #DCDCAA\">zfs<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">list<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">-r<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">zroot\/var<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">NAME<\/span><span style=\"color: #D4D4D4\">                 <\/span><span style=\"color: #CE9178\">USED<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #CE9178\">AVAIL<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #CE9178\">REFER<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #CE9178\">MOUNTPOINT<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">zroot\/var<\/span><span style=\"color: #D4D4D4\">           <\/span><span style=\"color: #B5CEA8\">1.06<\/span><span style=\"color: #CE9178\">G<\/span><span style=\"color: #D4D4D4\">   <\/span><span style=\"color: #B5CEA8\">433<\/span><span style=\"color: #CE9178\">G<\/span><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #B5CEA8\">96<\/span><span style=\"color: #CE9178\">K<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #CE9178\">\/var<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">zroot\/var\/audit<\/span><span style=\"color: #D4D4D4\">       <\/span><span style=\"color: #B5CEA8\">96<\/span><span style=\"color: #CE9178\">K<\/span><span style=\"color: #D4D4D4\">   <\/span><span style=\"color: #B5CEA8\">433<\/span><span style=\"color: #CE9178\">G<\/span><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #B5CEA8\">96<\/span><span style=\"color: #CE9178\">K<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #CE9178\">\/var\/audit<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">zroot\/var\/crash<\/span><span style=\"color: #D4D4D4\">       <\/span><span style=\"color: #B5CEA8\">96<\/span><span style=\"color: #CE9178\">K<\/span><span style=\"color: #D4D4D4\">   <\/span><span style=\"color: #B5CEA8\">433<\/span><span style=\"color: #CE9178\">G<\/span><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #B5CEA8\">96<\/span><span style=\"color: #CE9178\">K<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #CE9178\">\/var\/crash<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">zroot\/var\/db<\/span><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #B5CEA8\">1.06<\/span><span style=\"color: #CE9178\">G<\/span><span style=\"color: #D4D4D4\">   <\/span><span style=\"color: #B5CEA8\">433<\/span><span style=\"color: #CE9178\">G<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #B5CEA8\">1.06<\/span><span style=\"color: #CE9178\">G<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #CE9178\">\/var\/db<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">zroot\/var\/log<\/span><span style=\"color: #D4D4D4\">       <\/span><span style=\"color: #B5CEA8\">7.29<\/span><span style=\"color: #CE9178\">M<\/span><span style=\"color: #D4D4D4\">   <\/span><span style=\"color: #B5CEA8\">433<\/span><span style=\"color: #CE9178\">G<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #B5CEA8\">7.29<\/span><span style=\"color: #CE9178\">M<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #CE9178\">\/var\/log<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">zroot\/var\/mail<\/span><span style=\"color: #D4D4D4\">       <\/span><span style=\"color: #B5CEA8\">360<\/span><span style=\"color: #CE9178\">K<\/span><span style=\"color: #D4D4D4\">   <\/span><span style=\"color: #B5CEA8\">433<\/span><span style=\"color: #CE9178\">G<\/span><span style=\"color: #D4D4D4\">   <\/span><span style=\"color: #B5CEA8\">360<\/span><span style=\"color: #CE9178\">K<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #CE9178\">\/var\/mail<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">zroot\/var\/tmp<\/span><span style=\"color: #D4D4D4\">         <\/span><span style=\"color: #B5CEA8\">96<\/span><span style=\"color: #CE9178\">K<\/span><span style=\"color: #D4D4D4\">   <\/span><span style=\"color: #B5CEA8\">433<\/span><span style=\"color: #CE9178\">G<\/span><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #B5CEA8\">96<\/span><span style=\"color: #CE9178\">K<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #CE9178\">\/var\/tmp<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><code>\/var\/db<\/code>\u81ea\u4f53\u304c\u5c02\u7528\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u306a\u3063\u3066\u304a\u3089\u305a\u3001<code>zroot\/var<\/code>\u306b\u305d\u306e\u307e\u307e\u540c\u5c45\u3057\u3066\u3044\u308b\u72b6\u614b\u3067\u3057\u305f\u3002<br>\u3053\u308c\u3060\u3068MySQL\u7528\u306brecordsize\u306a\u3069\u3092\u500b\u5225\u8a2d\u5b9a\u3067\u304d\u306a\u3044\u306e\u3067\u3001\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3068\u3057\u3066\u5207\u308a\u51fa\u3059\u3068\u3053\u308d\u304b\u3089\u59cb\u3081\u308b\u5fc5\u8981\u304c\u3042\u308b\u611f\u3058\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\/var\/db \u3092\u5c02\u7528\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3078\u5207\u308a\u51fa\u3057<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\/var\/db\u95a2\u9023\u306e\u30b5\u30fc\u30d3\u30b9\u505c\u6b62<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:.875rem;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>service mysql-server stop\n# \u4ed6\u306b\/var\/db\u3092\u4f7f\u3063\u3066\u3044\u308b\u30b5\u30fc\u30d3\u30b9\u304c\u3042\u308c\u3070\u5408\u308f\u305b\u3066\u505c\u6b62<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #DCDCAA\">service<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">mysql-server<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">stop<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6A9955\"># \u4ed6\u306b\/var\/db\u3092\u4f7f\u3063\u3066\u3044\u308b\u30b5\u30fc\u30d3\u30b9\u304c\u3042\u308c\u3070\u5408\u308f\u305b\u3066\u505c\u6b62<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u5ff5\u306e\u305f\u3081\u30d0\u30c3\u30af\u30a2\u30c3\u30d7<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:.875rem;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>tar -czf ~\/var_db_backup_$(date +%Y%m%d).tar.gz -C \/var -- db<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #DCDCAA\">tar<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">-czf<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">~\/var_db_backup_$(<\/span><span style=\"color: #DCDCAA\">date<\/span><span style=\"color: #CE9178\"> +%Y%m%d).tar.gz<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">-C<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">\/var<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">--<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">db<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u65e2\u5b58\u306e\/var\/db\u3092\u9000\u907f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u89aa\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u5185\u3067\u306e<code>mv<\/code>\u306a\u306e\u3067\u5b9f\u4f53\u30b3\u30d4\u30fc\u306f\u767a\u751f\u305b\u305a\u4e00\u77ac\u3067\u7d42\u308f\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:.875rem;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>mv \/var\/db \/var\/db_orig<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #DCDCAA\">mv<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">\/var\/db<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">\/var\/db_orig<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u65b0\u3057\u3044\u7a7a\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u4f5c\u6210<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u7a7a\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u30922\u3064\u307e\u3068\u3081\u3066\u4f5c\u3063\u3066\u304a\u304d\u307e\u3059\u3002\u3053\u306e\u6bb5\u968e\u3067mysql\u7528\u3082\u5206\u3051\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:.875rem;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>zfs create zroot\/var\/db\nzfs create -o mountpoint=\/var\/db\/mysql zroot\/var\/db\/mysql<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #DCDCAA\">zfs<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">create<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">zroot\/var\/db<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">zfs<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">create<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">-o<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">mountpoint=\/var\/db\/mysql<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">zroot\/var\/db\/mysql<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">ZFS\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u9069\u7528<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u304c\u5207\u308a\u51fa\u305b\u305f\u306e\u3067\u3001\u3053\u3053\u304b\u3089\u304c\u672c\u984c\u306e\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3067\u3059\u3002InnoDB\u306e\u30c7\u30fc\u30bf\u7528\u3068\u3057\u3066\u4ee5\u4e0b\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:.875rem;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>zfs set recordsize=16k zroot\/var\/db\/mysql\nzfs set primarycache=metadata zroot\/var\/db\/mysql\nzfs set logbias=throughput zroot\/var\/db\/mysql\nzfs set compression=lz4 zroot\/var\/db\/mysql<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #DCDCAA\">zfs<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">set<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">recordsize=<\/span><span style=\"color: #B5CEA8\">16<\/span><span style=\"color: #CE9178\">k<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">zroot\/var\/db\/mysql<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">zfs<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">set<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">primarycache=metadata<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">zroot\/var\/db\/mysql<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">zfs<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">set<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">logbias=throughput<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">zroot\/var\/db\/mysql<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">zfs<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">set<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">compression=lz4<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">zroot\/var\/db\/mysql<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u9069\u7528\u5f8c\u306e\u78ba\u8a8d\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:.875rem;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>zfs get recordsize,primarycache,logbias,compression zroot\/var\/db\/mysql\n\nNAME                PROPERTY      VALUE           SOURCE\nzroot\/var\/db\/mysql  recordsize    16K             local\nzroot\/var\/db\/mysql  primarycache  metadata        local\nzroot\/var\/db\/mysql  logbias       throughput      local\nzroot\/var\/db\/mysql  compression   lz4             local<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #DCDCAA\">zfs<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">get<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">recordsize,primarycache,logbias,compression<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">zroot\/var\/db\/mysql<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">NAME<\/span><span style=\"color: #D4D4D4\">                <\/span><span style=\"color: #CE9178\">PROPERTY<\/span><span style=\"color: #D4D4D4\">      <\/span><span style=\"color: #CE9178\">VALUE<\/span><span style=\"color: #D4D4D4\">           <\/span><span style=\"color: #CE9178\">SOURCE<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">zroot\/var\/db\/mysql<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #CE9178\">recordsize<\/span><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #B5CEA8\">16<\/span><span style=\"color: #CE9178\">K<\/span><span style=\"color: #D4D4D4\">             <\/span><span style=\"color: #CE9178\">local<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">zroot\/var\/db\/mysql<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #CE9178\">primarycache<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #CE9178\">metadata<\/span><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #CE9178\">local<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">zroot\/var\/db\/mysql<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #CE9178\">logbias<\/span><span style=\"color: #D4D4D4\">       <\/span><span style=\"color: #CE9178\">throughput<\/span><span style=\"color: #D4D4D4\">      <\/span><span style=\"color: #CE9178\">local<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">zroot\/var\/db\/mysql<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #CE9178\">compression<\/span><span style=\"color: #D4D4D4\">   <\/span><span style=\"color: #CE9178\">lz4<\/span><span style=\"color: #D4D4D4\">             <\/span><span style=\"color: #CE9178\">local<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u30ed\u30b0\u7528(ib_logfile\u7b49)\u306f\u4eca\u56de\u306f\u5206\u3051\u305a\u306b\u540c\u3058\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u307e\u307e\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br>\u203b\u30ed\u30b0\u3092\u5206\u3051\u308b\u304b\u3069\u3046\u304b\u3001<code>innodb_flush_log_at_trx_commit<\/code>\u306e\u5024\u3068\u30bb\u30c3\u30c8\u3067\u8003\u3048\u308b\u3079\u304d\u3067\u3001<code>=2<\/code>\u904b\u7528\u4e2d\u306e\u81ea\u5206\u306b\u3068\u3063\u3066recordsize\u306e\u4e0d\u4e00\u81f4\u4ee5\u5916\u306f\u3055\u307b\u3069\u52b9\u304b\u306a\u3044\u3068\u601d\u3044\u4eca\u56de\u306f\u898b\u9001\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u9000\u907f\u3057\u3066\u3044\u305f\u4e2d\u8eab\u3092\u623b\u3059<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u304c\u5148\u306b\u5206\u304b\u308c\u3066\u3044\u308b\u306e\u3067\u3001rsync\u306f1\u56de\u3067\u6e08\u307f\u307e\u3059\u3002\u6240\u6709\u6a29\u3082\u5ff5\u306e\u305f\u3081\u6700\u5f8c\u306b\u63c3\u3048\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:.875rem;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>rsync -aAXH \/var\/db_orig\/ \/var\/db\/\nchown -R mysql:mysql \/var\/db\/mysql<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #DCDCAA\">rsync<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">-aAXH<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">\/var\/db_orig\/<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">\/var\/db\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">chown<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">-R<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">mysql:mysql<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">\/var\/db\/mysql<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u8d77\u52d5\u78ba\u8a8d<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:.875rem;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>zfs list -r zroot\/var\nNAME                 USED  AVAIL  REFER  MOUNTPOINT\nzroot\/var           1.06G   433G    96K  \/var\nzroot\/var\/audit       96K   433G    96K  \/var\/audit\nzroot\/var\/crash       96K   433G    96K  \/var\/crash\nzroot\/var\/db        1.05G   433G  45.6M  \/var\/db\nzroot\/var\/db\/mysql  1.01G   433G  1.01G  \/var\/db\/mysql\nzroot\/var\/log       7.29M   433G  7.29M  \/var\/log\nzroot\/var\/mail       360K   433G   360K  \/var\/mail\nzroot\/var\/tmp         96K   433G    96K  \/var\/tmp<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #DCDCAA\">zfs<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">list<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">-r<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">zroot\/var<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">NAME<\/span><span style=\"color: #D4D4D4\">                 <\/span><span style=\"color: #CE9178\">USED<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #CE9178\">AVAIL<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #CE9178\">REFER<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #CE9178\">MOUNTPOINT<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">zroot\/var<\/span><span style=\"color: #D4D4D4\">           <\/span><span style=\"color: #B5CEA8\">1.06<\/span><span style=\"color: #CE9178\">G<\/span><span style=\"color: #D4D4D4\">   <\/span><span style=\"color: #B5CEA8\">433<\/span><span style=\"color: #CE9178\">G<\/span><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #B5CEA8\">96<\/span><span style=\"color: #CE9178\">K<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #CE9178\">\/var<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">zroot\/var\/audit<\/span><span style=\"color: #D4D4D4\">       <\/span><span style=\"color: #B5CEA8\">96<\/span><span style=\"color: #CE9178\">K<\/span><span style=\"color: #D4D4D4\">   <\/span><span style=\"color: #B5CEA8\">433<\/span><span style=\"color: #CE9178\">G<\/span><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #B5CEA8\">96<\/span><span style=\"color: #CE9178\">K<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #CE9178\">\/var\/audit<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">zroot\/var\/crash<\/span><span style=\"color: #D4D4D4\">       <\/span><span style=\"color: #B5CEA8\">96<\/span><span style=\"color: #CE9178\">K<\/span><span style=\"color: #D4D4D4\">   <\/span><span style=\"color: #B5CEA8\">433<\/span><span style=\"color: #CE9178\">G<\/span><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #B5CEA8\">96<\/span><span style=\"color: #CE9178\">K<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #CE9178\">\/var\/crash<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">zroot\/var\/db<\/span><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #B5CEA8\">1.05<\/span><span style=\"color: #CE9178\">G<\/span><span style=\"color: #D4D4D4\">   <\/span><span style=\"color: #B5CEA8\">433<\/span><span style=\"color: #CE9178\">G<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #B5CEA8\">45.6<\/span><span style=\"color: #CE9178\">M<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #CE9178\">\/var\/db<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">zroot\/var\/db\/mysql<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #B5CEA8\">1.01<\/span><span style=\"color: #CE9178\">G<\/span><span style=\"color: #D4D4D4\">   <\/span><span style=\"color: #B5CEA8\">433<\/span><span style=\"color: #CE9178\">G<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #B5CEA8\">1.01<\/span><span style=\"color: #CE9178\">G<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #CE9178\">\/var\/db\/mysql<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">zroot\/var\/log<\/span><span style=\"color: #D4D4D4\">       <\/span><span style=\"color: #B5CEA8\">7.29<\/span><span style=\"color: #CE9178\">M<\/span><span style=\"color: #D4D4D4\">   <\/span><span style=\"color: #B5CEA8\">433<\/span><span style=\"color: #CE9178\">G<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #B5CEA8\">7.29<\/span><span style=\"color: #CE9178\">M<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #CE9178\">\/var\/log<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">zroot\/var\/mail<\/span><span style=\"color: #D4D4D4\">       <\/span><span style=\"color: #B5CEA8\">360<\/span><span style=\"color: #CE9178\">K<\/span><span style=\"color: #D4D4D4\">   <\/span><span style=\"color: #B5CEA8\">433<\/span><span style=\"color: #CE9178\">G<\/span><span style=\"color: #D4D4D4\">   <\/span><span style=\"color: #B5CEA8\">360<\/span><span style=\"color: #CE9178\">K<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #CE9178\">\/var\/mail<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">zroot\/var\/tmp<\/span><span style=\"color: #D4D4D4\">         <\/span><span style=\"color: #B5CEA8\">96<\/span><span style=\"color: #CE9178\">K<\/span><span style=\"color: #D4D4D4\">   <\/span><span style=\"color: #B5CEA8\">433<\/span><span style=\"color: #CE9178\">G<\/span><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #B5CEA8\">96<\/span><span style=\"color: #CE9178\">K<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #CE9178\">\/var\/tmp<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u7121\u4e8b\u306bzroot\/var\/db\u3001zroot\/var\/db\/mysql\u304c\u30de\u30a6\u30f3\u30c8\u3055\u308c\u3066\u3044\u308b\u306e\u304c\u308f\u304b\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:.875rem;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>service mysql-server start\nservice mysql-server status\nmysql -e \"SHOW DATABASES;\"<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #DCDCAA\">service<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">mysql-server<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">start<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">service<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">mysql-server<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">status<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">mysql<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">-e<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">&quot;SHOW DATABASES;&quot;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><code>mysql -e<\/code>\u306f\u63a5\u7d9a\u30e6\u30fc\u30b6\u30fc\u306b\u3088\u3063\u3066\u306f\u6a29\u9650\u30a8\u30e9\u30fc\u306b\u306a\u3063\u305f\u306e\u3067\u3001\u78ba\u8a8d\u306froot\u30e6\u30fc\u30b6\u3067\u884c\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u554f\u984c\u306a\u3051\u308c\u3070\u9000\u907f\u5206\u3092\u524a\u9664<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u8d77\u52d5\u3068DB\u4e00\u89a7\u78ba\u8a8d\u304c\u53d6\u308c\u3066\u304b\u3089\u3057\u3070\u3089\u304f\u306f<code>mysql_orig<\/code>\u3068tar\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u6b8b\u3057\u3066\u304a\u3044\u3066\u3001\u554f\u984c\u306a\u3055\u305d\u3046\u3060\u3068\u601d\u3063\u305f\u3089\u524a\u9664\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:.875rem;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>rm -rf \/var\/db_orig\/\nrm -rf \/var\/db\/mysql_orig\nrm ~\/var_db_backup_*.tar.gz<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #DCDCAA\">rm<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">-rf<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">\/var\/db_orig\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">rm<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">-rf<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">\/var\/db\/mysql_orig<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">rm<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">~\/var_db_backup_<\/span><span style=\"color: #569CD6\">*<\/span><span style=\"color: #CE9178\">.tar.gz<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">my.cnf\u5074\u306e\u5909\u66f4<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><code>[mysqld]<\/code>\u30bb\u30af\u30b7\u30e7\u30f3\u3001<code>innodb_flush_log_at_trx_commit<\/code>\u306e\u4e0b\u3042\u305f\u308a\u306b\u8ffd\u52a0\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:.875rem;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>&#91;mysqld&#93;\ninnodb_flush_log_at_trx_commit = 2\ninnodb_doublewrite = 0<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">&#91;mysqld&#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">innodb_flush_log_at_trx_commit<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">=<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #B5CEA8\">2<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">innodb_doublewrite<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">=<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #B5CEA8\">0<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u30b5\u30fc\u30d3\u30b9\u306e\u518d\u8d77\u52d5\u30fb\u8a2d\u5b9a\u78ba\u8a8d\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:.875rem;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>service mysql-server restart\nmysql -e \"SHOW VARIABLES LIKE 'innodb_doublewrite';\"   # OFF\u306b\u306a\u3063\u3066\u3044\u308c\u3070OK<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #DCDCAA\">service<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">mysql-server<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">restart<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">mysql<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">-e<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">&quot;SHOW VARIABLES LIKE &#39;innodb_doublewrite&#39;;&quot;<\/span><span style=\"color: #D4D4D4\">   <\/span><span style=\"color: #6A9955\"># OFF\u306b\u306a\u3063\u3066\u3044\u308c\u3070OK<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u5404\u8a2d\u5b9a\u306e\u7406\u7531<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u8a2d\u5b9a<\/th><th>\u7406\u7531<\/th><\/tr><\/thead><tbody><tr><td>recordsize=16k<\/td><td>InnoDB\u306eI\/O\u5358\u4f4d\u306b\u5408\u308f\u305b\u3066\u3001128k\u306e\u307e\u307e\u3060\u3063\u305f\u7121\u99c4\u306a\u8aad\u307f\u66f8\u304d\u3092\u6e1b\u3089\u3059<\/td><\/tr><tr><td>primarycache=metadata<\/td><td>InnoDB\u30d0\u30c3\u30d5\u30a1\u30d7\u30fc\u30eb\u5074\u3067\u5341\u5206\u30ad\u30e3\u30c3\u30b7\u30e5\u3057\u3066\u3044\u308b\u306e\u3067\u3001ARC\u5074\u306f\u4e8c\u91cd\u30ad\u30e3\u30c3\u30b7\u30e5\u305b\u305a\u7bc0\u7d04<\/td><\/tr><tr><td>logbias=throughput<\/td><td>REDO\u30ed\u30b0\u306fInnoDB\u5074\u306b\u3042\u308b\u306e\u3067\u3001ZFS\u5074\u306e\u540c\u671f\u66f8\u304d\u8fbc\u307f\u6700\u9069\u5316(latency\u5bc4\u308a)\u306f\u4e0d\u8981<\/td><\/tr><tr><td>innodb_doublewrite=0<\/td><td>Copy on Write\u306a\u306e\u3067\u90e8\u5206\u66f8\u304d\u8fbc\u307f\u304c\u8d77\u304d\u305a\u3001doublewrite\u306b\u3088\u308b\u4fdd\u8b77\u304c\u5197\u9577\u306b\u306a\u308b<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u30d9\u30f3\u30c1\u30de\u30fc\u30af\u7d50\u679c<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><code>mysqlslap<\/code>\u3092\u4f7f\u3044\u3001\u4ee5\u4e0b\u306e\u6761\u4ef6\u3067\u8ca0\u8377\u3092\u304b\u3051\u3066\u8a08\u6e2c\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u540c\u6642\u63a5\u7d9a\u6570(concurrency): 8<\/li>\n\n\n\n<li>1\u63a5\u7d9a\u3042\u305f\u308a\u306e\u30af\u30a8\u30ea\u6570: 2000<\/li>\n\n\n\n<li>\u4e0a\u8a18\u30921\u30bb\u30c3\u30c8\u3068\u3057\u3066\u3001\u5404\u8a2d\u5b9a\u30673\u56de\u305a\u3064\u5b9f\u884c<\/li>\n\n\n\n<li>\u30c6\u30fc\u30d6\u30eb\u30fb\u30c7\u30fc\u30bf\u306f<code>--auto-generate-sql<\/code>\u3067\u81ea\u52d5\u751f\u6210\u3057\u305f\u72ec\u7acb\u30c6\u30b9\u30c8\u7528\u30b9\u30ad\u30fc\u30de<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u4eca\u56de\u306f\u300c\u5909\u66f4\u524d\u300d\u300cZFS\u5143\u8a2d\u5b9a\u306e\u307e\u307emy.cnf\u3060\u3051\u5909\u66f4\u300d\u300cZFS\u30fbmy.cnf\u4e21\u65b9\u5909\u66f4\u300d\u306e3\u30d1\u30bf\u30fc\u30f3\u3092\u6bd4\u8f03\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5909\u66f4\u524d(ZFS\u5143\u8a2d\u5b9a + my.cnf\u5143\u8a2d\u5b9a)<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u56de\u6570<\/th><th>\u5e73\u5747\u5b9f\u884c\u6642\u9593<\/th><th>\u6700\u5c0f<\/th><th>\u6700\u5927<\/th><th>fsyncs\u5897\u5206<\/th><th>read_requests\u5897\u5206<\/th><th>data_writes\u5897\u5206<\/th><\/tr><\/thead><tbody><tr><td>1<\/td><td>3.312\u79d2<\/td><td>3.282\u79d2<\/td><td>3.389\u79d2<\/td><td>2,122<\/td><td>94,187<\/td><td>66<\/td><\/tr><tr><td>2<\/td><td>3.982\u79d2<\/td><td>3.816\u79d2<\/td><td>4.236\u79d2<\/td><td>2,119<\/td><td>96,602<\/td><td>65<\/td><\/tr><tr><td>3<\/td><td>7.785\u79d2<\/td><td>3.885\u79d2<\/td><td>13.644\u79d2<\/td><td>2,142<\/td><td>105,437<\/td><td>65<\/td><\/tr><tr><td><strong>\u5e73\u5747<\/strong><\/td><td><strong>5.026\u79d2<\/strong><\/td><td><strong>3.661\u79d2<\/strong><\/td><td><strong>7.090\u79d2<\/strong><\/td><td><strong>2,127.7<\/strong><\/td><td><strong>98,742<\/strong><\/td><td><strong>65.3<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">ZFS\u5143\u8a2d\u5b9a + my.cnf\u3060\u3051\u5909\u66f4\u5f8c<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u56de\u6570<\/th><th>\u5e73\u5747\u5b9f\u884c\u6642\u9593<\/th><th>\u6700\u5c0f<\/th><th>\u6700\u5927<\/th><th>fsyncs\u5897\u5206<\/th><th>read_requests\u5897\u5206<\/th><th>data_writes\u5897\u5206<\/th><\/tr><\/thead><tbody><tr><td>1<\/td><td>0.154\u79d2<\/td><td>0.139\u79d2<\/td><td>0.185\u79d2<\/td><td>207<\/td><td>68,895<\/td><td>66<\/td><\/tr><tr><td>2<\/td><td>0.151\u79d2<\/td><td>0.144\u79d2<\/td><td>0.172\u79d2<\/td><td>204<\/td><td>75,707<\/td><td>65<\/td><\/tr><tr><td>3<\/td><td>0.154\u79d2<\/td><td>0.145\u79d2<\/td><td>0.179\u79d2<\/td><td>202<\/td><td>68,475<\/td><td>65<\/td><\/tr><tr><td><strong>\u5e73\u5747<\/strong><\/td><td><strong>0.153\u79d2<\/strong><\/td><td><strong>0.143\u79d2<\/strong><\/td><td><strong>0.179\u79d2<\/strong><\/td><td><strong>204.3<\/strong><\/td><td><strong>71,026<\/strong><\/td><td><strong>65.3<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">\u5909\u66f4\u5f8c(ZFS\u5909\u66f4\u5f8c + my.cnf\u5909\u66f4\u5f8c\u3001\u672c\u6765\u306e\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u8a2d\u5b9a)<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u56de\u6570<\/th><th>\u5e73\u5747\u5b9f\u884c\u6642\u9593<\/th><th>\u6700\u5c0f<\/th><th>\u6700\u5927<\/th><th>fsyncs\u5897\u5206<\/th><th>read_requests\u5897\u5206<\/th><th>data_writes\u5897\u5206<\/th><\/tr><\/thead><tbody><tr><td>1<\/td><td>0.137\u79d2<\/td><td>0.125\u79d2<\/td><td>0.177\u79d2<\/td><td>204<\/td><td>67,548<\/td><td>65<\/td><\/tr><tr><td>2<\/td><td>0.192\u79d2<\/td><td>0.136\u79d2<\/td><td>0.352\u79d2<\/td><td>206<\/td><td>69,993<\/td><td>66<\/td><\/tr><tr><td>3<\/td><td>0.136\u79d2<\/td><td>0.125\u79d2<\/td><td>0.172\u79d2<\/td><td>202<\/td><td>68,219<\/td><td>65<\/td><\/tr><tr><td>4<\/td><td>0.187\u79d2<\/td><td>0.125\u79d2<\/td><td>0.344\u79d2<\/td><td>205<\/td><td>68,415<\/td><td>66<\/td><\/tr><tr><td><strong>\u5e73\u5747<\/strong><\/td><td><strong>0.163\u79d2<\/strong><\/td><td><strong>0.128\u79d2<\/strong><\/td><td><strong>0.261\u79d2<\/strong><\/td><td><strong>204.3<\/strong><\/td><td><strong>68,544<\/strong><\/td><td><strong>65.5<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u203b<code>Innodb_buffer_pool_reads<\/code>\u306e\u5897\u5206\u306f\u3059\u3079\u3066\u306e\u8a2d\u5b9a\u30670\u3067\u3057\u305f\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u8003\u5bdf<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u7d50\u679c\u3001<strong>\u300cZFS\u5143\u8a2d\u5b9a + my.cnf\u3060\u3051\u5909\u66f4\u300d\u304c\u300cZFS\u5909\u66f4\u5f8c + my.cnf\u5909\u66f4\u5f8c\u300d\u3068\u307b\u307c\u540c\u3058\u6570\u5b57\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><\/th><th>\u5e73\u5747\u5b9f\u884c\u6642\u9593<\/th><th>fsyncs\u5897\u5206<\/th><th>data_writes\u5897\u5206<\/th><\/tr><\/thead><tbody><tr><td>\u5909\u66f4\u524d<\/td><td>5.026\u79d2<\/td><td>2,127.7<\/td><td>65.3<\/td><\/tr><tr><td><strong>my.cnf\u3060\u3051\u5909\u66f4<\/strong><\/td><td><strong>0.153\u79d2<\/strong><\/td><td><strong>204.3<\/strong><\/td><td><strong>65.3<\/strong><\/td><\/tr><tr><td>ZFS+my.cnf\u4e21\u65b9\u5909\u66f4<\/td><td>0.163\u79d2<\/td><td>204.3<\/td><td>65.5<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">fsyncs\u306e\u5897\u5206\u306f\u3069\u3061\u3089\u3082204\u53f0\u3067\u4e00\u81f4\u3057\u3001\u5e73\u5747\u5b9f\u884c\u6642\u9593\u30820.153\u79d2 \u5bfe 0.163\u79d2\u3068\u307b\u307c\u8aa4\u5dee\u306e\u7bc4\u56f2\u3067\u3059\u3002\u3064\u307e\u308a\u4eca\u56de\u306e\u300c\u7d0432\u500d\u300d\u3068\u3044\u3046\u5dee\u306f\u3001<strong>\u307b\u307c\u5168\u3066\u304c<code>innodb_flush_log_at_trx_commit<\/code>\u30921\u304b\u30892\u306b\u5909\u3048\u305f\u3053\u3068(\u304a\u3088\u3073<code>innodb_doublewrite=0<\/code>)\u306b\u3088\u308b\u3082\u306e<\/strong>\u3067\u3001<code>recordsize<\/code>\u3084<code>primarycache<\/code>\u3001<code>logbias<\/code>\u3001<code>compression<\/code>\u3068\u3044\u3063\u305fZFS\u5074\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u5909\u66f4\u306f\u3001\u3053\u306e\u8ca0\u8377\u30c6\u30b9\u30c8\u306b\u304a\u3044\u3066\u306f\u6e2c\u5b9a\u3067\u304d\u308b\u307b\u3069\u306e\u5dee\u3092\u751f\u3093\u3067\u3044\u306a\u304b\u3063\u305f\u3001\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4eca\u56de\u4f7f\u3063\u305f\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u306fInnoDB\u30d0\u30c3\u30d5\u30a1\u30d7\u30fc\u30eb\u306b\u5341\u5206\u53ce\u307e\u308b\u30b5\u30a4\u30ba\u3060\u3063\u305f\u305f\u3081\u3001<code>primarycache=metadata<\/code>\u306e\u3088\u3046\u306bARC\u5074\u306e\u4e8c\u91cd\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u524a\u308b\u8a2d\u5b9a\u306e\u52b9\u679c\u306f\u305d\u3082\u305d\u3082\u51fa\u3065\u3089\u3044\u6761\u4ef6\u3060\u3063\u305f\u3068\u8003\u3048\u3089\u308c\u307e\u3059\u3002\u307e\u305f<code>recordsize<\/code>\u306e\u52b9\u679c\u3082\u3001\u65e2\u306b\u30d0\u30c3\u30d5\u30a1\u30d7\u30fc\u30eb\u3067\u30d2\u30c3\u30c8\u3057\u3066\u3044\u308b\u8aad\u307f\u66f8\u304d\u304c\u4e2d\u5fc3\u3060\u3068\u8868\u306b\u51fa\u306b\u304f\u3044\u306f\u305a\u3067\u3059\u3002ZFS\u5074\u306e\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u304c\u3069\u308c\u3060\u3051\u52b9\u304f\u304b\u3092\u6b63\u3057\u304f\u898b\u308b\u306a\u3089\u3001\u30d0\u30c3\u30d5\u30a1\u30d7\u30fc\u30eb\u306b\u4e57\u308a\u5207\u3089\u306a\u3044\u898f\u6a21\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3067\u3001\u5b9f\u969b\u306b\u30c7\u30a3\u30b9\u30af\u3078\u306e\u8aad\u307f\u8fbc\u307f\u304c\u767a\u751f\u3059\u308b\u3088\u3046\u306a\u8ca0\u8377\u3067\u8a08\u6e2c\u3057\u76f4\u3059\u5fc5\u8981\u304c\u3042\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u306a\u304a<code>innodb_flush_log_at_trx_commit=2<\/code>\u306f\u3001\u30b3\u30df\u30c3\u30c8\u6bce\u306efsync\u3092\u3084\u3081\u30661\u79d2\u3054\u3068\u306e\u30d5\u30e9\u30c3\u30b7\u30e5\u306b\u5909\u3048\u308b\u8a2d\u5b9a\u306a\u306e\u3067\u3001OS\u30af\u30e9\u30c3\u30b7\u30e5\u3084\u96fb\u6e90\u65ad\u304c\u8d77\u304d\u305f\u5834\u5408\u3001\u76f4\u8fd1\u6700\u59271\u79d2\u5206\u306e\u30b3\u30df\u30c3\u30c8\u6e08\u307f\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304c\u5931\u308f\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059(mysqld\u30d7\u30ed\u30bb\u30b9\u3060\u3051\u304c\u30af\u30e9\u30c3\u30b7\u30e5\u3057\u305f\u5834\u5408\u306f\u554f\u984c\u3042\u308a\u307e\u305b\u3093)\u3002\u4eca\u56de\u306e\u691c\u8a3c\u3067\u901f\u5ea6\u306e\u4e3b\u8981\u56e0\u304c\u3053\u306e\u8a2d\u5b9a\u3060\u3068\u308f\u304b\u3063\u305f\u4ee5\u4e0a\u3001\u6027\u80fd\u3068\u5f15\u304d\u63db\u3048\u306b\u3053\u306e\u30ea\u30b9\u30af\u3092\u8a31\u5bb9\u3067\u304d\u308b\u304b\u3069\u3046\u304b\u306f\u3001\u305d\u308c\u305e\u308c\u306e\u74b0\u5883\u3067\u6539\u3081\u3066\u5224\u65ad\u3057\u3066\u3082\u3089\u3048\u308c\u3070\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">ZFS\u5074\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u5909\u66f4(recordsize=16k\u3001primarycache=metadata\u3001logbias=throughput\u3001compression=lz4)\u81ea\u4f53\u306f\u3001InnoDB\u306eI\/O\u7279\u6027\u306b\u6cbf\u3063\u305f\u7406\u306b\u304b\u306a\u3063\u305f\u8a2d\u5b9a\u3060\u3068\u4eca\u3082\u601d\u3063\u3066\u3044\u307e\u3059\u3057\u3001<code>compression=lz4<\/code>\u306f\u30c7\u30a3\u30b9\u30af\u4f7f\u7528\u91cf\u306e\u524a\u6e1b\u306b\u3082\u3064\u306a\u304c\u308b\u306e\u3067\u3001\u4eca\u56de\u306e\u7d50\u679c\u3060\u3051\u3067\u610f\u5473\u304c\u306a\u304b\u3063\u305f\u3068\u3044\u3046\u3053\u3068\u3067\u306b\u306f\u306a\u3089\u306a\u3044\u3067\u3059\u3002\u305f\u3060\u300c32\u500d\u901f\u304f\u306a\u3063\u305f\u300d\u3068\u3044\u3046\u6570\u5b57\u306e\u89e3\u91c8\u306b\u306f\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3001\u305d\u306e\u5927\u90e8\u5206\u306fmy.cnf\u5074\u306e\u5909\u66f4\u306b\u3088\u308b\u3082\u306e\u3060\u3063\u305f\u3001\u3068\u3044\u3046\u306e\u304c\u4eca\u56de\u306e\u8ffd\u52a0\u691c\u8a3c\u3067\u306e\u7d50\u8ad6\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u308c\u307e\u3067\u306fZFS\u306fatime\u5207\u3063\u3066\u304a\u3051\u3070OK\u304f\u3089\u3044\u306e\u96d1\u306a\u7406\u89e3\u3067\u4f7f\u3063\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u5b9f\u969b\u306b<code>\/var\/db<\/code>\u3092\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3068\u3057\u3066\u5207\u308a\u51fa\u3059\u3068\u3053\u308d\u304b\u3089\u3084\u3063\u3066\u307f\u308b\u3068\u3001\u601d\u3063\u3066\u3044\u305f\u3088\u308a\u624b\u9806\u81ea\u4f53\u306f\u30b7\u30f3\u30d7\u30eb\u3060\u3063\u305f\u306a\u3068\u611f\u3058\u307e\u3057\u305f\u3002<code>mv<\/code>\u2192<code>zfs create<\/code>\u2192<code>rsync<\/code>\u306e\u7c21\u5358\u306a\u624b\u9806\u3067\u3001\u9014\u4e2d\u3067\u30c7\u30fc\u30bf\u3092\u58ca\u3059\u5fc3\u914d\u3082\u307b\u307c\u306a\u3044\u306e\u3067\u826f\u304d\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30d1\u30e9\u30e1\u30fc\u30bf\u5074\u3082\u3001recordsize\u3084primarycache\u306f\u306a\u3093\u3068\u306a\u304f\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u307e\u307e\u3067\u3057\u305f\u304c\u3001\u4e00\u3064\u305a\u3064\u7406\u7531\u3092\u78ba\u8a8d\u3057\u306a\u304c\u3089\u5f53\u3066\u306f\u3081\u308b\u306e\u304c\u7d0d\u5f97\u3067\u304d\u3066\u3088\u304b\u3063\u305f\u3068\u601d\u3044\u307e\u3057\u305f\u3002\u7279\u306binnodb_doublewrite\u3092\u30aa\u30d5\u306b\u3067\u304d\u308b\u7406\u5c48(CoW\u3060\u304b\u3089\u90e8\u5206\u66f8\u304d\u8fbc\u307f\u304c\u8d77\u304d\u306a\u3044)\u306f\u3001\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u5074\u306e\u4ed5\u7d44\u307f\u3068DB\u5074\u306e\u4ed5\u7d44\u307f\u304c\u3061\u3083\u3093\u3068\u565b\u307f\u5408\u3063\u3066\u3044\u308b\u611f\u3058\u304c\u3057\u3066\u5730\u5473\u306b\u611f\u52d5\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">ZFS\u306f\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u5358\u4f4d\u3067\u3053\u3046\u3044\u3046\u7d30\u304b\u3044\u8abf\u6574\u304c\u3067\u304d\u308b\u306e\u304c\u672c\u5f53\u306b\u697d\u3067\u3059\u306d\u3002\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5168\u4f53\u3067\u4e00\u5f8b\u306e\u8a2d\u5b9a\u306b\u305b\u3056\u308b\u3092\u5f97\u306a\u3044\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3060\u3068\u3001\u3053\u3046\u306f\u3044\u304b\u306a\u3044\u3067\u3059\u3002\u7528\u9014\u3054\u3068\u306b\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u5207\u3063\u3066\u3001\u305d\u308c\u305e\u308c\u306b\u6700\u9069\u306a\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u5f53\u3066\u308b\u3001\u3068\u3044\u3046\u904b\u7528\u304c\u3059\u3093\u306a\u308a\u3067\u304d\u308b\u306e\u306f\u3084\u3063\u3071\u308a\u4fbf\u5229\u3060\u3068\u518d\u8a8d\u8b58\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u304a\u308f\u308a<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u53c2\u8003\u306b\u3057\u305f\u8a18\u4e8b<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/freebsd.seirios.org\/doku.php?id=os:zfs_tips\">ZFS Tips [Share FreeBSD based information]<\/a>\uff08\u4eca\u56de\u306e\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u306e\u5143\u30cd\u30bf\uff09<\/li>\n\n\n\n<li>SirDice, &#8220;<a href=\"https:\/\/forums.freebsd.org\/threads\/zfs-for-mysql-separate-data-and-logs-what-logs-where-are-these-logs.93371\/\">zfs for mysql &#8211; separate data and logs? what logs? where are these logs?<\/a>&#8220;, FreeBSD Forums, 2024\u5e745\u6708\uff08\u30ed\u30b0\u3092\u5206\u96e2\u3057\u306a\u304b\u3063\u305f\u7406\u7531\u306e\u53c2\u8003\uff09<\/li>\n<\/ul>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Tuning MySQL on ZFS with FreeBSD \u306f\u3058\u3081\u306b \u79c1\u306eWeb\u30b5\u30fc\u30d0\u306fFreeBSD\u306eZFS\u3092\u4f7f\u3063\u3066\u3044\u3066\u3001atime=off\u304f\u3089\u3044\u306f\u3084\u3063\u3066\u3044\u305f\u3082\u306e\u306e\u3001\u6b63\u76f4MySQL\u307e\u308f\u308a\u306f\u4f55\u3082\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3057\u3066\u304a\u3089 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"cybocfi_hide_featured_image":"","footnotes":""},"categories":[108,18,243],"tags":[246,21,244,245],"class_list":["post-3137","post","type-post","status-publish","format-standard","hentry","category-freebsd","category-mysql","category-zfs","tag-innodb","tag-mysql","tag-zfs","tag-245"],"_links":{"self":[{"href":"https:\/\/bokumin.org\/blog\/wp-json\/wp\/v2\/posts\/3137","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bokumin.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bokumin.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bokumin.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bokumin.org\/blog\/wp-json\/wp\/v2\/comments?post=3137"}],"version-history":[{"count":19,"href":"https:\/\/bokumin.org\/blog\/wp-json\/wp\/v2\/posts\/3137\/revisions"}],"predecessor-version":[{"id":3166,"href":"https:\/\/bokumin.org\/blog\/wp-json\/wp\/v2\/posts\/3137\/revisions\/3166"}],"wp:attachment":[{"href":"https:\/\/bokumin.org\/blog\/wp-json\/wp\/v2\/media?parent=3137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bokumin.org\/blog\/wp-json\/wp\/v2\/categories?post=3137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bokumin.org\/blog\/wp-json\/wp\/v2\/tags?post=3137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}