{"id":2527,"date":"2012-04-06T17:56:35","date_gmt":"2012-04-06T14:56:35","guid":{"rendered":"http:\/\/skeletor.org.ua\/?p=2527"},"modified":"2015-07-28T09:45:25","modified_gmt":"2015-07-28T06:45:25","slug":"%d1%83%d0%bf%d1%80%d0%b0%d0%b2%d0%bb%d0%b5%d0%bd%d0%b8%d0%b5-swap%d0%be%d0%bc","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=2527","title":{"rendered":"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 swap&#8217;\u043e\u043c"},"content":{"rendered":"<p>\u0412 <strong>Solaris 11<\/strong> \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0435 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u0433\u043e <strong>swap&#8217;a<\/strong>. \u0410 \u0432\u0441\u0451 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043e\u043d\u0438 \u043e\u0442\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b<\/p>\n<table border=\"0\" summary=\"The following table identifies ZFS swap and dump volume sizes for different system types.\" width=\"100%\" cellspacing=\"1\" cellpadding=\"0\">\n<tbody>\n<tr>\n<th scope=\"col\" align=\"left\" valign=\"top\">\n<div>System Type<\/div>\n<\/th>\n<th scope=\"col\" align=\"left\" valign=\"top\">\n<div>Swap Volume Size<\/div>\n<\/th>\n<th scope=\"col\" align=\"left\" valign=\"top\">\n<div>Dump Volume Size<\/div>\n<\/th>\n<\/tr>\n<tr>\n<td scope=\"row\" align=\"left\" valign=\"top\">\n<div>System with about 4 GB of physical memory<\/div>\n<\/td>\n<td align=\"left\" valign=\"top\">\n<div>1 GB<\/div>\n<\/td>\n<td align=\"left\" valign=\"top\">\n<div>2 GB<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td scope=\"row\" align=\"left\" valign=\"top\">\n<div>Mid-range server with about 8 GB of physical memory<\/div>\n<\/td>\n<td align=\"left\" valign=\"top\">\n<div>2 GB<\/div>\n<\/td>\n<td align=\"left\" valign=\"top\">\n<div>4 GB<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td scope=\"row\" align=\"left\" valign=\"top\">\n<div>High-end server with about 16 to 128 GB of physical memory<\/div>\n<\/td>\n<td align=\"left\" valign=\"top\">\n<div>4 GB<\/div>\n<\/td>\n<td align=\"left\" valign=\"top\">\n<div>8-64 GB<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td scope=\"row\" align=\"left\" valign=\"top\">\n<div>High-end server with more than 128 GB of physical memory<\/div>\n<\/td>\n<td align=\"left\" valign=\"top\">\n<div>1\/4 of physical memory size<\/div>\n<\/td>\n<td align=\"left\" valign=\"top\">\n<div>1\/2 of physical memory size<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u041d\u043e \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 <strong>swap&#8217;a<\/strong>?<\/p>\n<p><!--more-->\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e.<\/p>\n<p><em><span style=\"color: #ff6600;\">&#8211; \u0443\u0437\u043d\u0430\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 swap&#8217;a:<\/span><\/em><\/p>\n<p><code># zfs get volsize rpool\/swap<br \/>\nNAME PROPERTY VALUE SOURCE<br \/>\nrpool\/swap volsize 1G local<\/code><\/p>\n<p><em><span style=\"color: #ff6600;\">&#8211; \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 swap&#8217;a:<\/span><\/em><\/p>\n<p><code># zfs set volsize=2g rpool\/swap<br \/>\n# zfs get volsize rpool\/swap<br \/>\nNAME PROPERTY VALUE SOURCE<br \/>\nrpool\/swap volsize 2G local<\/code><\/p>\n<p><em><span style=\"color: #ff6600;\">&#8211; \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d swap:<\/span><\/em><\/p>\n<p><code># zfs create -V 2G rpool\/swap2<br \/>\n# swap -a \/dev\/zvol\/dsk\/rpool\/swap2<br \/>\n# swap -l<br \/>\nswapfile dev swaplo blocks free<br \/>\n\/dev\/zvol\/dsk\/rpool\/swap 124,2 8 2097144 2097144<br \/>\n\/dev\/zvol\/dsk\/rpool\/swap2 124,3 8 4194296 4194296<\/code><\/p>\n<p><em><span style=\"color: #ff6600;\">&#8211; \u0443\u0434\u0430\u043b\u0438\u0442\u044c<\/span><\/em><\/p>\n<p><code># swap -l<br \/>\nswapfile dev swaplo blocks free<br \/>\n\/dev\/zvol\/dsk\/rpool\/swap 124,2 8 2097144 2097144<br \/>\n\/dev\/zvol\/dsk\/rpool\/swap2 124,3 8 4194296 4194296<br \/>\n# swap -d \/dev\/zvol\/dsk\/rpool\/swap2<br \/>\n# swap -l<br \/>\nswapfile dev swaplo blocks free<br \/>\n\/dev\/zvol\/dsk\/rpool\/swap 124,2 8 2097144 2097144<\/code><\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435.<\/p>\n<p>\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c, \u0447\u0442\u043e \u0432 Solaris, \/tmp &#8211; \u044d\u0442\u043e tmpfs, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u043e \u0441\u0443\u0442\u0438 swap. \u041e \u0442\u043e\u043c, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0435\u0433\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043e \u043d\u0451\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0435\u0441\u0442\u044c <a href=\"http:\/\/www.tune-it.ru\/web\/myaut\/home\/-\/blogs\/%D0%BA%D1%82%D0%BE-%D1%81%D1%8A%D0%B5%D0%BB-%D0%B2%D0%B5%D1%81%D1%8C-%D1%82%D0%BE%D1%80%D1%82-%D0%B8%D0%BB%D0%B8-%D0%BD%D0%B5%D0%BC%D0%BD%D0%BE%D0%B3%D0%BE-%D0%BE-tmpfs\" target=\"_blank\">\u0437\u0434\u0435\u0441\u044c<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 Solaris 11 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0435 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u0433\u043e swap&#8217;a. \u0410 \u0432\u0441\u0451 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043e\u043d\u0438 \u043e\u0442\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b System Type Swap Volume Size Dump Volume Size System with about 4 GB of physical memory 1 GB 2 GB Mid-range server with about 8 GB of physical memory 2 GB 4 GB [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-2527","post","type-post","status-publish","format-standard","hentry","category-solaris"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/2527","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=2527"}],"version-history":[{"count":4,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/2527\/revisions"}],"predecessor-version":[{"id":4837,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/2527\/revisions\/4837"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}