{"id":3189,"date":"2012-12-04T16:21:23","date_gmt":"2012-12-04T14:21:23","guid":{"rendered":"http:\/\/skeletor.org.ua\/?p=3189"},"modified":"2021-02-03T11:39:47","modified_gmt":"2021-02-03T09:39:47","slug":"zfs-%d0%bd%d0%b0%d1%87%d0%b8%d0%bd%d0%b0%d0%b5%d1%82-%d1%82%d1%83%d0%bf%d0%b8%d1%82%d1%8c-%d0%bf%d1%80%d0%b8-%d0%b7%d0%b0%d0%bf%d0%be%d0%bb%d0%bd%d0%b5%d0%bd%d0%b8%d0%b8-%d0%bf%d0%be%d1%87%d1%82%d0%b8","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=3189","title":{"rendered":"zfs \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0442\u0443\u043f\u0438\u0442\u044c\/\u043f\u0440\u0438\u0442\u043e\u0440\u043c\u0430\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435\u0433\u043e \u043f\u0443\u043b\u0430"},"content":{"rendered":"<p>\u041f\u0440\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u043f\u0443\u043b\u0430 \u043f\u043e\u0447\u0442\u0438 \u043d\u0430 90% (\u0432\u043e\u043e\u0431\u0449\u0435-\u0442\u043e \u0443 \u0432\u0441\u0435\u0445 \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443: \u0443 \u043a\u043e\u0433\u043e-\u0442\u043e \u0438 \u0432 70%, \u0430 \u0443 \u043a\u043e\u0433\u043e-\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 98%) <strong>Zfs<\/strong> \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0442\u043e\u0440\u043c\u0430\u0436\u0438\u0432\u0430\u0442\u044c, \u0442\u043e\u0447\u043d\u0435\u0435 \u0438\u0441\u043a\u0430\u0442\u044c \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0432 \u043f\u0443\u043b\u0435, \u043a\u0443\u0434\u0430-\u0431\u044b \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c. \u0421\u0432\u044f\u0437\u0430\u043d\u043e \u044d\u0442\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430&nbsp;<strong>metaslab_min_alloc_size<\/strong>.<\/p>\n<p><!--more--><\/p>\n<h2><strong><span style=\"color: #0000ff;\">FreeBSD<\/span><\/strong><\/h2>\n<p>\u0422\u0435\u043a\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<p><code> # kgdb -w<br>\n....<br>\n(kgdb) print metaslab_min_alloc_size<br>\n$1 = 10485760<br>\n<\/code><\/p>\n<p>\u041d\u0430\u043b\u0435\u0442\u0443 \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u043c \u043d\u0443\u0436\u043d\u043e\u0435 (\u0447\u0435\u0440\u0435\u0437 <strong>kernel debugger &#8211; kgdb<\/strong>)<\/p>\n<p><code># kgdb -w<br>\n....<br>\n(kgdb) set metaslab_min_alloc_size=4096<br>\n(kgdb) print metaslab_min_alloc_size<br>\n$1 = 4096<\/code><\/p>\n<p>\u0414\u043b\u044f \u043f\u0435\u0440\u043c\u0430\u043d\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0438\u0434\u0438\u043c\u043e \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u044f\u0434\u0440\u043e. \u041d\u0430\u0448\u0451\u043b \u043a\u043e\u043c\u043c\u0438\u0442 http:\/\/gitorious.org\/~avg\/freebsd\/avgbsd\/commit\/026055dd0ee0e837470fc51c8f5f4dc1447d42ab \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u043d\u0435\u0441\u0442\u0438 \u043f\u0430\u0442\u0447 \u0441 \u043f\u043e\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0434\u0435\u0444\u043e\u043b\u0442\u0443 <strong>0x1000<\/strong> (\u0432\u043c\u0435\u0441\u0442\u043e \u0440\u0430\u043d\u0435\u0435 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u0433\u043e <strong>10485760<\/strong>) . \u0422\u0430\u043a \u0447\u0442\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043c\u0435\u043d\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439&nbsp;<strong>metaslab_min_alloc_size<\/strong> \u0432 \u0444\u0430\u0439\u043b\u0435 <strong>sys\/cddl\/contrib\/opensolaris\/uts\/common\/fs\/zfs\/metaslab.c<\/strong> \u0441 <strong>DMU_MAX_ACCESS<\/strong> \u043d\u0430 <strong>0x1000<\/strong><\/p>\n<h2><strong><span style=\"color: #0000ff;\">Solaris<\/span><\/strong><\/h2>\n<p>\u0422\u0435\u043a\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<p><code>#echo metaslab_min_alloc_size::print | mdb -k<br>\n0x1800000<\/code><\/p>\n<p>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e\u0442 \u0441\u0442\u0430\u0432\u0438\u0442\u044c <strong>0x1000<\/strong>. \u041d\u0430\u043b\u0435\u0442\u0443 \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a:<\/p>\n<p><code>#echo \"metaslab_min_alloc_size\/Z 1000\" | mdb -kw<br>\nmetaslab_min_alloc_size: 0x1800000 = 0x1000<\/code><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0432\u0438\u0434\u0438\u043c \u0441\u0442\u0430\u0440\u043e\u0435 \u0438 \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0437\u0430\u043d\u043e\u0441\u0438\u043c \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 <strong>\/etc\/system<\/strong><\/p>\n<p><code>set zfs:metaslab_min_alloc_size=0x1000<\/code><\/p>\n<p>\u0415\u0449\u0451 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 (\u043d\u043e \u0435\u0433\u043e \u0443\u0436\u0435 \u0443\u0431\u0440\u0430\u043b\u0438 \u0432 <strong>Solaris 10<\/strong>,&nbsp;<a href=\"https:\/\/updates.oracle.com\/readme\/147441-15\">Patch-ID# 147441-15<\/a>, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043d\u0435\u0442 \u0438 \u0432 <strong>Oracle Solaris 11<\/strong>, \u043d\u043e \u0435\u0441\u0442\u044c \u0432 <strong>OpenSolaris<\/strong> )<\/p>\n<p><code>set zfs:metaslab_smo_bonus_pct=0xc8<\/code><\/p>\n\n\n<p>\u0412\u043e\u0442 \u043a\u0440\u0430\u0442\u043a\u043e\u0435 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0438\u0437 <a href=\"https:\/\/zfs-discuss.opensolaris.narkive.com\/cONq3f63\/extremely-slow-zpool-scrub-performance\" target=\"_blank\" rel=\"noreferrer noopener\">\u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0438<\/a>:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>This is used to add more weight (i.e. preference) to specific<br>metaslabs. A metaslab receives this bonus if it has an offset which is<br>lower than a previously use metaslab. Sorry this is somewhat<br>complicated and hard to explain without a whiteboard. \ud83d\ude42<\/p><\/blockquote>\n\n\n\n<p>\u041d\u0435\u043c\u0430\u043b\u043e\u0432\u0430\u0436\u043d\u044b\u043c \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u043c \u0435\u0449\u0451 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043c\u0435\u0440 <strong>recordsize<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 <strong>ZFS<\/strong>. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443, <strong>ZFS<\/strong> \u044d\u0442\u043e <strong>COW<\/strong>, \u0442\u043e \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u043b\u043e\u043a\u0430, \u0442\u0435\u043c \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u043d\u0430\u0439\u0442\u0438 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0439 \u0431\u043b\u043e\u043a \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430. \u041a\u0430\u043a \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0441\u0442\u043e\u0438\u0442 <strong>1\u041c<\/strong>, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0434\u043e <strong>128\u041a<\/strong>, \u0438\u043b\u0438, \u0434\u043e <strong>32\u041a<\/strong>, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u0440\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u043f\u0443\u043b\u0430 \u043f\u043e\u0447\u0442\u0438 \u043d\u0430 90% (\u0432\u043e\u043e\u0431\u0449\u0435-\u0442\u043e \u0443 \u0432\u0441\u0435\u0445 \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443: \u0443 \u043a\u043e\u0433\u043e-\u0442\u043e \u0438 \u0432 70%, \u0430 \u0443 \u043a\u043e\u0433\u043e-\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 98%) Zfs \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0442\u043e\u0440\u043c\u0430\u0436\u0438\u0432\u0430\u0442\u044c, \u0442\u043e\u0447\u043d\u0435\u0435 \u0438\u0441\u043a\u0430\u0442\u044c \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0432 \u043f\u0443\u043b\u0435, \u043a\u0443\u0434\u0430-\u0431\u044b \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c. \u0421\u0432\u044f\u0437\u0430\u043d\u043e \u044d\u0442\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430&nbsp;metaslab_min_alloc_size.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,24],"tags":[],"class_list":["post-3189","post","type-post","status-publish","format-standard","hentry","category-freebsd","category-solaris"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/3189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3189"}],"version-history":[{"count":13,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/3189\/revisions"}],"predecessor-version":[{"id":5696,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/3189\/revisions\/5696"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}