{"id":15779,"date":"2022-06-20T08:04:28","date_gmt":"2022-06-19T23:04:28","guid":{"rendered":"https:\/\/je1sgh.mydns.jp\/je1sghblog\/?p=15779"},"modified":"2022-06-20T08:04:28","modified_gmt":"2022-06-19T23:04:28","slug":"zram-4-%e8%a8%ad%e5%ae%9a%e3%81%ae%e5%a0%b4%e6%89%80","status":"publish","type":"post","link":"https:\/\/je1sgh.mydns.jp\/je1sghblog\/?p=15779","title":{"rendered":"zram (4) \u8a2d\u5b9a\u306e\u5834\u6240"},"content":{"rendered":"\n<p>&#12394;&#12435;&#12391;&#12418;&#19968;&#36890;&#12426;&#21205;&#12369;&#12400;&#65292;&#12354;&#12392;&#12399;&#12356;&#12376;&#12427;&#12371;&#12392;&#12418;&#12394;&#12367;&#12394;&#12427;&#12398;&#12391;&#65292;&#35373;&#23450;&#12501;&#12449;&#12452;&#12523;&#12395;&#12388;&#12356;&#12390;&#12399;&#12376;&#12365;&#12395;&#12381;&#12398;&#22580;&#25152;&#12377;&#12425;&#24536;&#12428;&#12390;&#12375;&#12414;&#12356;&#65292;&#27425;&#12395;&#24517;&#35201;&#12392;&#12394;&#12387;&#12383;&#26178;&#12414;&#12383;&#12476;&#12525;&#12363;&#12425;&#12399;&#12376;&#12417;&#12427;&#12392;&#12356;&#12358;&#12398;&#12364;&#19990;&#12398;&#24120;&#12391;&#12377;&#128531;<\/p>\n\n\n\n<p>&#23569;&#12394;&#12367;&#12392;&#12418;&#26908;&#32034;&#12364;&#33258;&#24049;&#23436;&#32080;&#12391;&#12365;&#12427;&#12424;&#12358;&#12395;&#65292;&#12513;&#12514;&#12387;&#12390;&#12362;&#12365;&#12414;&#12377;&#65294;&#12392;&#12356;&#12358;&#12363;&#65292;&#26082;&#12395;&#24536;&#12428;&#12399;&#12376;&#12417;&#12390;&#12356;&#12427;&#12398;&#12391;&#24489;&#32722;&#12391;&#12377;&#65294;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">&#20849;&#36890;&#20107;&#38917;<\/h3>\n\n\n\n<p>&#20849;&#36890;&#12398;&#12518;&#12540;&#12486;&#12451;&#12522;&#12486;&#12451;&#12540;&#12392;&#12375;&#12390;&#12399;&#65292;zramctl&#12364;&#12354;&#12426;&#12414;&#12377;&#65294;zram&#12398;&#21205;&#20316;&#12434;&#30906;&#35469;&#12377;&#12427;&#22580;&#21512;&#12399;&#65292;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">zramctl<\/pre>\n\n\n\n<p>&#12501;&#12449;&#12452;&#12523;&#12398;swap&#12434;&#21547;&#12416;&#65292;swap&#12398;&#12377;&#12409;&#12390;&#12434;&#34920;&#31034;&#12377;&#12427;&#12395;&#12399;&#65292;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">swapon<\/pre>\n\n\n\n<p>&#12391;&#12377;&#65294;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Debian<\/h3>\n\n\n\n<p>Bullseye&#29694;&#22312;&#12398;&#35441;&#12391;&#12377;&#65294;&#19968;&#30058;&#35299;&#12426;&#12420;&#12377;&#12356;&#12391;&#12377;&#65294;&#12452;&#12531;&#12473;&#12488;&#12540;&#12523;&#12399;<code>apt install zram-tools<\/code>&#12391;&#33391;&#12367;&#65292;&#12487;&#12501;&#12457;&#12523;&#12488;&#35373;&#23450;&#12391;&#21205;&#12365;&#20986;&#12375;&#12414;&#12377;&#65294;<\/p>\n\n\n\n<p>&#35373;&#23450;&#12434;&#12459;&#12473;&#12479;&#12510;&#12452;&#12474;&#12377;&#12427;&#22580;&#21512;&#12399;&#65292;<code>\/etc\/default\/zramswap<\/code>&#12434;&#32232;&#38598;&#12375;&#12414;&#12377;<sup class=\"modern-footnotes-footnote \" data-mfn=\"1\" data-mfn-post-scope=\"00000000000003270000000000000000_15779\"><a href=\"javascript:void(0)\" role=\"button\" aria-pressed=\"false\" aria-describedby=\"mfn-content-00000000000003270000000000000000_15779-1\">1<\/a><\/sup><span id=\"mfn-content-00000000000003270000000000000000_15779-1\" role=\"tooltip\" class=\"modern-footnotes-footnote__note\" tabindex=\"0\" data-mfn=\"1\">2022\/6\/20&#12398;&#31295;&#12391;&#12399;&#65292;zram.conf&#12392;&#12375;&#12390;&#12356;&#12414;&#12375;&#12383;&#12364;&#65292;zramswap&#12364;&#27491;&#12375;&#12356;&#12391;&#12377;&#65288;2023\/8\/10&#35352;&#65289;&#65294;<\/span>&#65294;<\/p>\n\n\n\n<p>&#21205;&#20316;&#30906;&#35469;&#12399;&#65292;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">systemctl status zramswap<\/pre>\n\n\n\n<p>&#12391;&#12377;&#65294; <\/p>\n\n\n\n<p>&#12414;&#12383;&#65292;\/var\/swap&#12434;&#20351;&#12387;&#12383;swap&#12434;&#27490;&#12417;&#12427;&#12395;&#12399;&#19979;&#35352;&#12434;&#23455;&#34892;&#12375;&#12414;&#12377;&#65294;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">systemctl stop dphys-swapfile\nsystemctl disable dphys-swapfile\nrm -v \/var\/swap<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Slackware<\/h3>\n\n\n\n<p>Slackware64, SlackwareARM&#12398;15.0&#12391;&#21205;&#20316;&#30906;&#35469;&#12375;&#12390;&#12414;&#12377;&#65294;&#12452;&#12531;&#12473;&#12488;&#12540;&#12523;&#12399;&#65292;&#12371;&#12371;&#12425;&#36794;&#12434;&#21442;&#32771;&#12395;&#12375;&#12414;&#12375;&#12383;<sup class=\"modern-footnotes-footnote \" data-mfn=\"2\" data-mfn-post-scope=\"00000000000003270000000000000000_15779\"><a href=\"javascript:void(0)\" role=\"button\" aria-pressed=\"false\" aria-describedby=\"mfn-content-00000000000003270000000000000000_15779-2\">2<\/a><\/sup><span id=\"mfn-content-00000000000003270000000000000000_15779-2\" role=\"tooltip\" class=\"modern-footnotes-footnote__note\" tabindex=\"0\" data-mfn=\"2\">ARM, aarch64&#12398;&#35352;&#20107;&#12391;&#12377;&#12364;&#65292;AMD64 (x86_64)&#12418;&#21516;&#12376;&#12391;&#12356;&#12369;&#12414;&#12377;&#65294;&#35430;&#12375;&#12390;&#12414;&#12379;&#12435;&#12364;&#65292;&#12458;&#12522;&#12472;&#12490;&#12523;&#12398;Slaclware (32bit&#29256;)&#12418;&#22823;&#19976;&#22827;&#12384;&#12392;&#24605;&#12356;&#12414;&#12377;&#65294;<\/span>&#65294;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/docs.slackware.com\/howtos:hardware:arm:zram_slackware_arm_and_arm64\">Zram in Slackware ARM and ARM64 Architectures<\/a><\/li>\n<\/ul>\n\n\n\n<p>&#19978;&#35352;&#12398;&#20869;&#23481;&#12398;&#36890;&#12426;&#12391;&#12377;&#12364;&#65292;<code>\/etc\/udev\/rules.d\/10-zram.rules<\/code>&#12392;&#65292;<code>\/etc\/rc.d\/rc.local<\/code>&#12395;&#36215;&#21205;&#12392;&#35373;&#23450;&#12434;&#33258;&#20998;&#12391;&#26360;&#12367;&#12371;&#12392;&#12395;&#12394;&#12426;&#12414;&#12377;&#65294;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Manjaro<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">udev<\/h4>\n\n\n\n<p>Manjaro&#12391;&#12418;&#31558;&#32773;&#12399;&#12381;&#12398;&#24460;&#65292;Slackware&#12392;&#21516;&#12376;&#12367;udev&#12391;&#12398;&#35373;&#23450;&#12434;&#25505;&#29992;&#12375;&#12390;&#12356;&#12414;&#12377;&#65294;<\/p>\n\n\n\n<p class=\"has-text-align-right\"><em>[&#12371;&#12398;&#38917;2024&#24180;6&#26376;20&#26085;&#36861;&#35352;]<\/em><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">zram-generator &amp; systemd-swap<\/h4>\n\n\n\n<p>&#12371;&#12428;&#12399;&#65292;x86 64bit&#12391;&#12418;&#65292;ARM 64bit&#12391;&#12418;&#20351;&#12360;&#12414;&#12377;&#65294;<\/p>\n\n\n\n<p>&#35373;&#23450;&#12501;&#12449;&#12452;&#12523;&#12399;&#65292;<code>\/etc\/systemd\/swap.conf.d\/<\/code>&#20869;&#12398;&#65292;<code>\u4efb\u610f.conf<\/code>&#12391;&#65292;&#12486;&#12531;&#12503;&#12524;&#12540;&#12488;&#12399;<code>\/etc\/systemd\/swap.conf<\/code>&#12391;&#12377;&#65294;<\/p>\n\n\n\n<p>&#21205;&#20316;&#30906;&#35469;&#12399;&#65292;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">systemctl status systemd-swap<\/pre>\n\n\n\n<p>&#12391;&#12377;&#65294;<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">ARM64 (zswap-arm)<\/h4>\n\n\n\n<p>zswap-arm&#12399;&#19979;&#35352;&#12398;&#29702;&#30001;&#12363;&#12425;&#20351;&#12431;&#12394;&#12356;&#12411;&#12358;&#12364;&#12356;&#12356;&#12392;&#24605;&#12356;&#12414;&#12377;&#65294;<\/p>\n\n\n\n<p>&#35373;&#23450;&#12501;&#12449;&#12452;&#12523;&#12399;&#12394;&#12367;&#65292;&#25954;&#12360;&#12390;&#12459;&#12473;&#12479;&#12510;&#12452;&#12474;&#12377;&#12427;&#12392;&#12375;&#12383;&#12425;&#65292;<code>\/usr\/lib\/systemd\/scripts\/zswap-arm-ctrl<\/code>&#12434;&#12356;&#12376;&#12427;&#12375;&#12363;&#12394;&#12373;&#12381;&#12358;&#12391;&#12377;&#65294;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u306a\u3093\u3067\u3082\u4e00\u901a\u308a\u52d5\u3051\u3070\uff0c\u3042\u3068\u306f\u3044\u3058\u308b\u3053\u3068\u3082\u306a\u304f\u306a\u308b\u306e\u3067\uff0c\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306b\u3064\u3044\u3066\u306f\u3058\u304d\u306b\u305d\u306e\u5834\u6240\u3059\u3089\u5fd8\u308c\u3066\u3057\u307e\u3044\uff0c\u6b21\u306b\u5fc5\u8981\u3068\u306a\u3063\u305f\u6642\u307e\u305f\u30bc\u30ed\u304b\u3089\u306f\u3058\u3081\u308b\u3068\u3044\u3046\u306e\u304c\u4e16\u306e\u5e38\u3067\u3059\ud83d\ude13 \u5c11\u306a\u304f\u3068\u3082\u691c\u7d22\u304c\u81ea\u5df1\u5b8c\u7d50\u3067\u304d\u308b\u3088\u3046\u306b\uff0c\u30e1\u30e2\u3063\u3066\u304a\u304d\u307e\u3059\uff0e\u3068\u3044\u3046\u304b\uff0c\u65e2\u306b\u5fd8\u308c\u306f\u3058\u3081\u3066\u3044\u308b\u306e\u3067\u5fa9\u7fd2\u3067\u3059\uff0e \u5171\u901a\u4e8b\u9805 \u5171\u901a\u306e\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u30fc\u3068\u3057\u3066\u306f\uff0czramctl\u304c\u3042\u308a\u307e\u3059\uff0ezram\u306e\u52d5\u4f5c\u3092\u78ba\u8a8d\u3059\u308b\u5834\u5408\u306f\uff0c zramctl \u30d5\u30a1\u30a4\u30eb\u306eswap\u3092\u542b\u3080\uff0cswap\u306e\u3059\u3079\u3066\u3092\u8868\u793a\u3059\u308b\u306b\u306f\uff0c swapon \u3067\u3059\uff0e Debian Bullseye\u73fe\u5728\u306e\u8a71\u3067\u3059\uff0e\u4e00\u756a\u89e3\u308a\u3084\u3059\u3044\u3067\u3059\uff0e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306fapt install zram-tools\u3067\u826f\u304f\uff0c\u30c7\u30d5\u30a9\u30eb\u30c8\u8a2d\u5b9a\u3067\u52d5\u304d\u51fa\u3057\u307e\u3059\uff0e \u8a2d\u5b9a\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u5834\u5408\u306f\uff0c\/etc\/default\/zramswap\u3092\u7de8\u96c6\u3057\u307e\u3059\uff0e \u52d5\u4f5c\u78ba\u8a8d\u306f\uff0c systemctl status zramswap \u3067\u3059\uff0e \u307e\u305f\uff0c\/var\/swap\u3092\u4f7f\u3063\u305fswap\u3092\u6b62\u3081\u308b\u306b\u306f\u4e0b\u8a18\u3092\u5b9f\u884c\u3057\u307e\u3059\uff0e systemctl stop dphys-swapfile systemctl disable dphys-swapfile rm -v \/var\/swap Slackware Slackware64, SlackwareARM\u306e15.0\u3067\u52d5\u4f5c\u78ba\u8a8d\u3057\u3066\u307e\u3059\uff0e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\uff0c\u3053\u3053\u3089\u8fba\u3092\u53c2\u8003\u306b\u3057\u307e\u3057\u305f\uff0e \u4e0a\u8a18\u306e\u5185\u5bb9\u306e\u901a\u308a\u3067\u3059\u304c\uff0c\/etc\/udev\/rules.d\/10-zram.rules\u3068\uff0c\/etc\/rc.d\/rc.local\u306b\u8d77\u52d5\u3068\u8a2d\u5b9a\u3092\u81ea\u5206\u3067\u66f8\u304f\u3053\u3068\u306b\u306a\u308a\u307e\u3059\uff0e Manjaro udev Manjaro\u3067\u3082\u7b46\u8005\u306f\u305d\u306e\u5f8c\uff0cSlackware\u3068\u540c\u3058\u304fudev\u3067\u306e\u8a2d\u5b9a\u3092\u63a1\u7528\u3057\u3066\u3044\u307e\u3059\uff0e [\u3053\u306e\u98052024\u5e746\u670820\u65e5\u8ffd\u8a18] zram-generator &amp; systemd-swap \u3053\u308c\u306f\uff0cx86 64bit\u3067\u3082\uff0cARM 64bit\u3067\u3082\u4f7f\u3048\u307e\u3059\uff0e \u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306f\uff0c\/etc\/systemd\/swap.conf.d\/\u5185\u306e\uff0c\u4efb\u610f.conf\u3067\uff0c\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306f\/etc\/systemd\/swap.conf\u3067\u3059\uff0e \u52d5\u4f5c\u78ba\u8a8d\u306f\uff0c systemctl status systemd-swap \u3067\u3059\uff0e ARM64 (zswap-arm) zswap-arm\u306f\u4e0b\u8a18\u306e\u7406\u7531\u304b\u3089\u4f7f\u308f\u306a\u3044\u307b\u3046\u304c\u3044\u3044\u3068\u601d\u3044\u307e\u3059\uff0e \u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306f\u306a\u304f\uff0c\u6562\u3048\u3066\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u3068\u3057\u305f\u3089\uff0c\/usr\/lib\/systemd\/scripts\/zswap-arm-ctrl\u3092\u3044\u3058\u308b\u3057\u304b\u306a\u3055\u305d\u3046\u3067\u3059\uff0e<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_daextam_enable_autolinks":"","footnotes":""},"categories":[6,8,23],"tags":[],"class_list":["post-15779","post","type-post","status-publish","format-standard","hentry","category-debian","category-linux","category-manjaro"],"publishpress_future_action":{"enabled":false,"date":"2026-05-13 08:53:11","action":"change-status","newStatus":"draft","terms":[],"taxonomy":"category","extraData":[]},"publishpress_future_workflow_manual_trigger":{"enabledWorkflows":[]},"_links":{"self":[{"href":"https:\/\/je1sgh.mydns.jp\/je1sghblog\/index.php?rest_route=\/wp\/v2\/posts\/15779","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/je1sgh.mydns.jp\/je1sghblog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/je1sgh.mydns.jp\/je1sghblog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/je1sgh.mydns.jp\/je1sghblog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/je1sgh.mydns.jp\/je1sghblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=15779"}],"version-history":[{"count":0,"href":"https:\/\/je1sgh.mydns.jp\/je1sghblog\/index.php?rest_route=\/wp\/v2\/posts\/15779\/revisions"}],"wp:attachment":[{"href":"https:\/\/je1sgh.mydns.jp\/je1sghblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=15779"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/je1sgh.mydns.jp\/je1sghblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=15779"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/je1sgh.mydns.jp\/je1sghblog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=15779"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}