<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://things.bleu255.com/runyourown/index.php?action=history&amp;feed=atom&amp;title=Swap</id>
	<title>Swap - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://things.bleu255.com/runyourown/index.php?action=history&amp;feed=atom&amp;title=Swap"/>
	<link rel="alternate" type="text/html" href="https://things.bleu255.com/runyourown/index.php?title=Swap&amp;action=history"/>
	<updated>2026-04-05T22:21:12Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://things.bleu255.com/runyourown/index.php?title=Swap&amp;diff=40&amp;oldid=prev</id>
		<title>320x200 at 21:16, 27 April 2018</title>
		<link rel="alternate" type="text/html" href="https://things.bleu255.com/runyourown/index.php?title=Swap&amp;diff=40&amp;oldid=prev"/>
		<updated>2018-04-27T21:16:06Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:16, 27 April 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l24&quot;&gt;Line 24:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 24:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  /usr/local/sbin/scw-swapfile stop    # de=activate and delete /swapfile&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  /usr/local/sbin/scw-swapfile stop    # de=activate and delete /swapfile&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you need an different swap file size, you can edit SWAPFILE_SIZE in the script.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you need an different swap file size, you can edit SWAPFILE_SIZE in the script.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:System]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key db_runyourown:diff:1.41:old-39:rev-40:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>320x200</name></author>
	</entry>
	<entry>
		<id>https://things.bleu255.com/runyourown/index.php?title=Swap&amp;diff=39&amp;oldid=prev</id>
		<title>320x200: /* Server specific things */</title>
		<link rel="alternate" type="text/html" href="https://things.bleu255.com/runyourown/index.php?title=Swap&amp;diff=39&amp;oldid=prev"/>
		<updated>2018-04-27T21:15:26Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Server specific things&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:15, 27 April 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l23&quot;&gt;Line 23:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 23:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  /usr/local/sbin/scw-swapfile start   # create and activate a 4GB swap file in /swapfile&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  /usr/local/sbin/scw-swapfile start   # create and activate a 4GB swap file in /swapfile&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  /usr/local/sbin/scw-swapfile stop    # de=activate and delete /swapfile&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  /usr/local/sbin/scw-swapfile stop    # de=activate and delete /swapfile&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;If you need an different swap file size, you can edit SWAPFILE_SIZE in the script.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key db_runyourown:diff:1.41:old-38:rev-39:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>320x200</name></author>
	</entry>
	<entry>
		<id>https://things.bleu255.com/runyourown/index.php?title=Swap&amp;diff=38&amp;oldid=prev</id>
		<title>320x200: Created page with &quot;Swap space is used to free chunks (pages) of memory from the RAM. This is needed when the physical memory is running out, or when pages initially created by a program are not...&quot;</title>
		<link rel="alternate" type="text/html" href="https://things.bleu255.com/runyourown/index.php?title=Swap&amp;diff=38&amp;oldid=prev"/>
		<updated>2018-04-27T21:14:16Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Swap space is used to free chunks (pages) of memory from the RAM. This is needed when the physical memory is running out, or when pages initially created by a program are not...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Swap space is used to free chunks (pages) of memory from the RAM. This is needed when the physical memory is running out, or when pages initially created by a program are not needed any more. There are two types of swap space: swap partition and swap file.&lt;br /&gt;
&lt;br /&gt;
== Swap Partition ==&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
== Swap File ==&lt;br /&gt;
More flexible than swap partition and well supported today. May not be the best choice on old fragmented hard disk though.&lt;br /&gt;
=== Setup ===&lt;br /&gt;
* As root, create the swap file:&lt;br /&gt;
 fallocate -l 4G /swapfile&lt;br /&gt;
 chmod 600 /swapfile&lt;br /&gt;
 mkswap /swapfile&lt;br /&gt;
* Activate the swap file:&lt;br /&gt;
 swapon /swapfile&lt;br /&gt;
* Optionally make it available when system starts, in /etc/fstab, add:&lt;br /&gt;
 /swapfile none swap defaults 0 0&lt;br /&gt;
* If you need to delete it:&lt;br /&gt;
 swapoff -a&lt;br /&gt;
 rm /swapfile&lt;br /&gt;
&lt;br /&gt;
=== Server specific things ===&lt;br /&gt;
Scaleway provides a script that does exactly above, with the exception of adding the swap file to the fstab. The script can be used like this:&lt;br /&gt;
 /usr/local/sbin/scw-swapfile start   # create and activate a 4GB swap file in /swapfile&lt;br /&gt;
 /usr/local/sbin/scw-swapfile stop    # de=activate and delete /swapfile&lt;/div&gt;</summary>
		<author><name>320x200</name></author>
	</entry>
</feed>