5 <meta http-equiv="X-UA-Compatible" content="IE=edge">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0">
7 <meta name="generator" content="Asciidoctor 2.0.10">
8 <title>Raspberry PI - increase swap size</title>
9 <link rel="stylesheet" href="./../style.css">
10 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
11 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
12 <script src="../nav.js"></script>
14 <body class="article">
16 <h1>Raspberry PI - increase swap size</h1>
20 <h2 id="_stop_the_swap">Stop the swap</h2>
21 <div class="sectionbody">
22 <div class="listingblock">
24 <pre>sudo dphys-swapfile swapoff</pre>
30 <h2 id="_modify_the_size_of_the_swap">Modify the size of the swap</h2>
31 <div class="sectionbody">
32 <div class="paragraph">
33 <p>As <code>root</code>, edit the file <code>/etc/dphys-swapfile</code> and modify
34 the variable <code>CONF_SWAPSIZE</code>:</p>
36 <div class="listingblock">
38 <pre>CONF_SWAPSIZE=1024</pre>
41 <div class="paragraph">
42 <p>To modify the swap file, edit the variable <code>CONF_SWAPFILE</code>, and run
43 <code>dphys-swapfile setup</code> which will create and initialize the file.</p>
48 <h2 id="_start_the_swap">Start the swap</h2>
49 <div class="sectionbody">
50 <div class="listingblock">
52 <pre>sudo dphys-swapfile swapon</pre>
59 <div id="footer-text">
60 Last updated 2020-06-29 22:20:15 +0200
65 <li><i class="fa fa-rss" aria-hidden="true"></i>
66 Feed: <a href="https://wpitchoune.net/news/feed.xml">RSS 2.0</a>
69 <li><i class="fa fa-envelope" aria-hidden="true"></i>
70 Email: <a href="mailto:jeanfi@gmail.com">jeanfi@gmail.com</a>
73 <li><i class="fa fa-git-square" aria-hidden="true"></i>
74 Source repository: <a href="https://git.wpitchoune.net/gitweb">gitweb</a>