moving psensor to gitlab news
[www.git] / www / tricks / raspberry_pi3_increase_swap_size.html
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
6 <meta name="viewport" content="width=device-width, initial-scale=1.0">
7 <meta name="generator" content="Asciidoctor 1.5.5">
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.6.3/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>
13 </head>
14 <body class="article">
15 <div id="header">
16 <h1>Raspberry PI - increase swap size</h1>
17 </div>
18 <div id="content">
19 <div class="sect1">
20 <h2 id="_stop_the_swap">Stop the swap</h2>
21 <div class="sectionbody">
22 <div class="listingblock">
23 <div class="content">
24 <pre>sudo dphys-swapfile swapoff</pre>
25 </div>
26 </div>
27 </div>
28 </div>
29 <div class="sect1">
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>
35 </div>
36 <div class="listingblock">
37 <div class="content">
38 <pre>CONF_SWAPSIZE=1024</pre>
39 </div>
40 </div>
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>
44 </div>
45 </div>
46 </div>
47 <div class="sect1">
48 <h2 id="_start_the_swap">Start the swap</h2>
49 <div class="sectionbody">
50 <div class="listingblock">
51 <div class="content">
52 <pre>sudo dphys-swapfile swapon</pre>
53 </div>
54 </div>
55 </div>
56 </div>
57 </div>
58 <div id="footer">
59 <div id="footer-text">
60 Last updated 2018-09-28 20:13:23 CEST
61 </div>
62 </div>
63 <footer>
64         <ul>
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>
67                 </li>
68
69                 <li><i class="fa fa-envelope" aria-hidden="true"></i>
70                     Email: <a href="mailto:jeanfi@gmail.com">jeanfi@gmail.com</a>
71                 </li>
72
73                 <li><i class="fa fa-git-square" aria-hidden="true"></i>
74                     Source repository: <a href="https://git.wpitchoune.net/gitweb">gitweb</a>
75                 </li>
76         </ul>
77 </footer>
78 </body>
79 </html>