e1408451e479ac88eefabd63705c8a2d5cf667a1
[www.git] / www / tricks / raspberry_pi3_increase_swap_size.html
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta name="generator" content="Asciidoctor 0.1.4">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0">
7 <title>Raspberry PI increase swap size</title>
8 <link rel="stylesheet" href="./../style.css">
9 <link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.2.1/css/font-awesome.min.css">
10 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
11 <script src="../nav.js"></script>
12 </head>
13 <body class="article">
14 <div id="header">
15 <h1>Raspberry PI increase swap size</h1>
16 </div>
17 <div id="content">
18 <div id="preamble">
19 <div class="sectionbody">
20 <div class="olist arabic">
21 <ol class="arabic">
22 <li>
23 <p>Stop the swap</p>
24 </li>
25 </ol>
26 </div>
27 <div class="listingblock">
28 <div class="content">
29 <pre>dphys-swapfile swapoff</pre>
30 </div>
31 </div>
32 <div class="olist arabic">
33 <ol class="arabic">
34 <li>
35 <p>Modify the size of the swap</p>
36 </li>
37 </ol>
38 </div>
39 <div class="paragraph">
40 <p>As <code>root</code>, edit the file <code>/etc/dphys-swapfile</code> and modify
41 the variable <code>dphys-swapfile</code>:</p>
42 </div>
43 <div class="listingblock">
44 <div class="content">
45 <pre>CONF_SWAPSIZE=1024</pre>
46 </div>
47 </div>
48 <div class="olist arabic">
49 <ol class="arabic">
50 <li>
51 <p>Start the swap</p>
52 </li>
53 </ol>
54 </div>
55 <div class="listingblock">
56 <div class="content">
57 <pre>dphys-swapfile swapon</pre>
58 </div>
59 </div>
60 </div>
61 </div>
62 </div>
63 <div id="footer">
64 <div id="footer-text">
65 Last updated 2016-12-21 23:53:00 UTC
66 </div>
67 </div>
68 </body>
69 </html>