http://wiki.dd-wrt.com/wiki/index.php?title=Linux_SWAP&action=history&feed=atomLinux SWAP - Revision history2024-03-28T22:39:02ZRevision history for this page on the wikiMediaWiki 1.10.1http://wiki.dd-wrt.com/wiki/index.php?title=Linux_SWAP&diff=55159&oldid=prevAtatob: Add language list2019-12-09T03:30:44Z<p>Add language list</p>
<table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;">
<tr>
<td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td>
<td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 03:30, 9 December 2019</td>
</tr>
<tr><td colspan="2" align="left"><strong>Line 1:</strong></td>
<td colspan="2" align="left"><strong>Line 1:</strong></td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;">{{Languages|Linux SWAP}}</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">== Introduction ==</td><td> </td><td style="background: #eee; font-size: smaller;">== Introduction ==</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
</table>Atatobhttp://wiki.dd-wrt.com/wiki/index.php?title=Linux_SWAP&diff=33247&oldid=prevYzy-oui-fi: /* Requirements */2010-05-18T03:04:51Z<p><span class="autocomment">Requirements</span></p>
<table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;">
<tr>
<td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td>
<td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 03:04, 18 May 2010</td>
</tr>
<tr><td colspan="2" align="left"><strong>Line 43:</strong></td>
<td colspan="2" align="left"><strong>Line 43:</strong></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"> insmod /jffs/lib/modules/2.4.30/loop.o</td><td> </td><td style="background: #eee; font-size: smaller;"> insmod /jffs/lib/modules/2.4.30/loop.o</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"> insmod /jffs/lib/modules/2.4.30/ext2.o </td><td> </td><td style="background: #eee; font-size: smaller;"> insmod /jffs/lib/modules/2.4.30/ext2.o </td></tr>
<tr><td>-</td><td style="background: #ffa; font-size: smaller;"> dd if=/dev/zero of=/tmp/smbshare/swap.ext2 bs=1 seek=64M</td><td>+</td><td style="background: #cfc; font-size: smaller;"> dd if=/dev/zero of=/tmp/smbshare/swap.ext2 bs=1 seek=64M echo y | mke2fs -L optware /tmp/smbshare/swap.ext2</td></tr>
<tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>echo y | mke2fs -L optware /tmp/smbshare/swap.ext2</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"> mkdir /tmp/swap</td><td> </td><td style="background: #eee; font-size: smaller;"> mkdir /tmp/swap</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"> mount -o loop /tmp/smbshare/swap.ext2 /tmp/swap</td><td> </td><td style="background: #eee; font-size: smaller;"> mount -o loop /tmp/smbshare/swap.ext2 /tmp/swap</td></tr>
</table>Yzy-oui-fihttp://wiki.dd-wrt.com/wiki/index.php?title=Linux_SWAP&diff=33211&oldid=prevGlenn: /* Do I need SWAP? */ more2010-05-16T19:58:29Z<p><span class="autocomment">Do I need SWAP? -</span> more</p>
<table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;">
<tr>
<td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td>
<td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 19:58, 16 May 2010</td>
</tr>
<tr><td colspan="2" align="left"><strong>Line 17:</strong></td>
<td colspan="2" align="left"><strong>Line 17:</strong></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">It is '''strongly''' advised that you do not enable swapping on flash-based drives (internal flash, SD/MMC, USB sticks)</td><td> </td><td style="background: #eee; font-size: smaller;">It is '''strongly''' advised that you do not enable swapping on flash-based drives (internal flash, SD/MMC, USB sticks)</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td>-</td><td style="background: #ffa; font-size: smaller;">The above statement is not correct for SDHC cards with built-in wear-leveling (e.g. via an USB SDHC-adaptor):</td><td>+</td><td style="background: #cfc; font-size: smaller;">The above statement is not correct for SDHC cards with built-in wear-leveling (e.g. via an USB SDHC-adaptor) <ins style="color: red; font-weight: bold; text-decoration: none;">- but keep the swapiness to minimum</ins>:</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">*http://wiki.openmoko.org/wiki/MicroSD</td><td> </td><td style="background: #eee; font-size: smaller;">*http://wiki.openmoko.org/wiki/MicroSD</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">e.g.:</td><td> </td><td style="background: #eee; font-size: smaller;">e.g.:</td></tr>
</table>Glennhttp://wiki.dd-wrt.com/wiki/index.php?title=Linux_SWAP&diff=33210&oldid=prevGlenn: /* Do I need SWAP? */ -link2010-05-16T19:53:57Z<p><span class="autocomment">Do I need SWAP? -</span> -link</p>
<table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;">
<tr>
<td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td>
<td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 19:53, 16 May 2010</td>
</tr>
<tr><td colspan="2" align="left"><strong>Line 20:</strong></td>
<td colspan="2" align="left"><strong>Line 20:</strong></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">*http://wiki.openmoko.org/wiki/MicroSD</td><td> </td><td style="background: #eee; font-size: smaller;">*http://wiki.openmoko.org/wiki/MicroSD</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">e.g.:</td><td> </td><td style="background: #eee; font-size: smaller;">e.g.:</td></tr>
<tr><td>-</td><td style="background: #ffa; font-size: smaller;">*<del style="color: red; font-weight: bold; text-decoration: none;">[[</del>MicroSD<del style="color: red; font-weight: bold; text-decoration: none;">]]</del>(HC) cards are a sort of a SSD: [http://robert.penz.name/137/no-swap-partition-journaling-filesystem-on-a-ssd/ December 7, 2008, robert.penz.name: No SWAP Partition, Journaling Filesystems, … on a SSD?] Quote: "...They assume perfect wear leveling...We stay also with the 2 million cycles and assume a 16GB SSD *With 50 MByte/sec we get 20 years! *With 2 MByte/sec we get 519 years! *And even if we reduce the write cycles to 100.000 and write with 2 MByte/sec all the time we’re at 26 years!!...1. Never choose to use a journaling file system on the SSD partitions: Bullshit, you’re just risking data security. Stay with ext3...7. One more thing to consider is that flash-devices handle their space in blocks. The blocksize typically varies between 16KB and 512 KB. Therefore writing one byte may cause erase and rewrite of up to 512KB..."</td><td>+</td><td style="background: #cfc; font-size: smaller;">*MicroSD(HC) cards are a sort of a SSD: [http://robert.penz.name/137/no-swap-partition-journaling-filesystem-on-a-ssd/ December 7, 2008, robert.penz.name: No SWAP Partition, Journaling Filesystems, … on a SSD?] Quote: "...They assume perfect wear leveling...We stay also with the 2 million cycles and assume a 16GB SSD *With 50 MByte/sec we get 20 years! *With 2 MByte/sec we get 519 years! *And even if we reduce the write cycles to 100.000 and write with 2 MByte/sec all the time we’re at 26 years!!...1. Never choose to use a journaling file system on the SSD partitions: Bullshit, you’re just risking data security. Stay with ext3...7. One more thing to consider is that flash-devices handle their space in blocks. The blocksize typically varies between 16KB and 512 KB. Therefore writing one byte may cause erase and rewrite of up to 512KB..."</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">== Requirements ==</td><td> </td><td style="background: #eee; font-size: smaller;">== Requirements ==</td></tr>
</table>Glennhttp://wiki.dd-wrt.com/wiki/index.php?title=Linux_SWAP&diff=33209&oldid=prevGlenn: /* Do I need SWAP? */ SDHC cards with buit-in wear-leveling can be used as swap2010-05-16T19:53:31Z<p><span class="autocomment">Do I need SWAP? -</span> SDHC cards with buit-in wear-leveling can be used as swap</p>
<table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;">
<tr>
<td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td>
<td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 19:53, 16 May 2010</td>
</tr>
<tr><td colspan="2" align="left"><strong>Line 16:</strong></td>
<td colspan="2" align="left"><strong>Line 16:</strong></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">It is '''strongly''' advised that you do not enable swapping on flash-based drives (internal flash, SD/MMC, USB sticks)</td><td> </td><td style="background: #eee; font-size: smaller;">It is '''strongly''' advised that you do not enable swapping on flash-based drives (internal flash, SD/MMC, USB sticks)</td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;">The above statement is not correct for SDHC cards with built-in wear-leveling (e.g. via an USB SDHC-adaptor):</td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;">*http://wiki.openmoko.org/wiki/MicroSD</td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;">e.g.:</td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;">*[[MicroSD]](HC) cards are a sort of a SSD: [http://robert.penz.name/137/no-swap-partition-journaling-filesystem-on-a-ssd/ December 7, 2008, robert.penz.name: No SWAP Partition, Journaling Filesystems, … on a SSD?] Quote: "...They assume perfect wear leveling...We stay also with the 2 million cycles and assume a 16GB SSD *With 50 MByte/sec we get 20 years! *With 2 MByte/sec we get 519 years! *And even if we reduce the write cycles to 100.000 and write with 2 MByte/sec all the time we’re at 26 years!!...1. Never choose to use a journaling file system on the SSD partitions: Bullshit, you’re just risking data security. Stay with ext3...7. One more thing to consider is that flash-devices handle their space in blocks. The blocksize typically varies between 16KB and 512 KB. Therefore writing one byte may cause erase and rewrite of up to 512KB..."</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">== Requirements ==</td><td> </td><td style="background: #eee; font-size: smaller;">== Requirements ==</td></tr>
</table>Glennhttp://wiki.dd-wrt.com/wiki/index.php?title=Linux_SWAP&diff=31912&oldid=prevGlenn: catchg2010-05-01T06:16:42Z<p>catchg</p>
<table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;">
<tr>
<td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td>
<td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 06:16, 1 May 2010</td>
</tr>
<tr><td colspan="2" align="left"><strong>Line 102:</strong></td>
<td colspan="2" align="left"><strong>Line 102:</strong></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">----</td><td> </td><td style="background: #eee; font-size: smaller;">----</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td>-</td><td style="background: #ffa; font-size: smaller;">[[Category:<del style="color: red; font-weight: bold; text-decoration: none;">Categories</del>]]</td><td>+</td><td style="background: #cfc; font-size: smaller;">[[Category:<ins style="color: red; font-weight: bold; text-decoration: none;">Applications]]</ins></td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">[[Category:Optware</ins>]]</td></tr>
</table>Glennhttp://wiki.dd-wrt.com/wiki/index.php?title=Linux_SWAP&diff=31433&oldid=prevGlenn: +Category:Categories2010-04-30T09:14:56Z<p>+<a href="/wiki/index.php/Category:Categories" title="Category:Categories">Category:Categories</a></p>
<table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;">
<tr>
<td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td>
<td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 09:14, 30 April 2010</td>
</tr>
<tr><td colspan="2" align="left"><strong>Line 101:</strong></td>
<td colspan="2" align="left"><strong>Line 101:</strong></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">----</td><td> </td><td style="background: #eee; font-size: smaller;">----</td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;">[[Category:Categories]]</td></tr>
</table>Glennhttp://wiki.dd-wrt.com/wiki/index.php?title=Linux_SWAP&diff=27686&oldid=prevDisk Crasher: /* Requirements */2009-10-28T23:25:58Z<p><span class="autocomment">Requirements</span></p>
<table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;">
<tr>
<td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td>
<td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 23:25, 28 October 2009</td>
</tr>
<tr><td colspan="2" align="left"><strong>Line 42:</strong></td>
<td colspan="2" align="left"><strong>Line 42:</strong></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"> mkdir /tmp/swap</td><td> </td><td style="background: #eee; font-size: smaller;"> mkdir /tmp/swap</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"> mount -o loop /tmp/smbshare/swap.ext2 /tmp/swap</td><td> </td><td style="background: #eee; font-size: smaller;"> mount -o loop /tmp/smbshare/swap.ext2 /tmp/swap</td></tr>
<tr><td>-</td><td style="background: #ffa; font-size: smaller;"> dd if=/dev/zero of=/tmp/swap/swapfile bs=1024 <del style="color: red; font-weight: bold; text-decoration: none;">seek</del>=<del style="color: red; font-weight: bold; text-decoration: none;">64K</del></td><td>+</td><td style="background: #cfc; font-size: smaller;"> dd if=/dev/zero of=/tmp/swap/swapfile bs=1024 <ins style="color: red; font-weight: bold; text-decoration: none;">count</ins>=<ins style="color: red; font-weight: bold; text-decoration: none;">65535</ins></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"> mkswap /tmp/swap/swapfile</td><td> </td><td style="background: #eee; font-size: smaller;"> mkswap /tmp/swap/swapfile</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"> swapon -p1 /tmp/swap/swapfile</code></td><td> </td><td style="background: #eee; font-size: smaller;"> swapon -p1 /tmp/swap/swapfile</code></td></tr>
</table>Disk Crasherhttp://wiki.dd-wrt.com/wiki/index.php?title=Linux_SWAP&diff=27475&oldid=prevMasterman: /* Checking swap */2009-10-12T00:21:20Z<p><span class="autocomment">Checking swap</span></p>
<table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;">
<tr>
<td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td>
<td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 00:21, 12 October 2009</td>
</tr>
<tr><td colspan="2" align="left"><strong>Line 95:</strong></td>
<td colspan="2" align="left"><strong>Line 95:</strong></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;">'''</del>ADVISORY''' Do NOT use this method if using USB storage with MULTIPLE partitions. Refer to [[USB storage]] for further information.</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">===</ins>ADVISORY<ins style="color: red; font-weight: bold; text-decoration: none;">===</ins></td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;"> </td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;">'''Do NOT use this method if using USB storage with MULTIPLE partitions. Refer to [[USB storage]] for further information.<ins style="color: red; font-weight: bold; text-decoration: none;">'''</ins></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">----</td><td> </td><td style="background: #eee; font-size: smaller;">----</td></tr>
</table>Mastermanhttp://wiki.dd-wrt.com/wiki/index.php?title=Linux_SWAP&diff=27474&oldid=prevMasterman: /* Checking swap */2009-10-12T00:20:41Z<p><span class="autocomment">Checking swap</span></p>
<table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;">
<tr>
<td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td>
<td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 00:20, 12 October 2009</td>
</tr>
<tr><td colspan="2" align="left"><strong>Line 93:</strong></td>
<td colspan="2" align="left"><strong>Line 93:</strong></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">Alternatively, if you have syslog enabled, you can check the file /var/log/messages for any system-generated swap-related messages.</td><td> </td><td style="background: #eee; font-size: smaller;">Alternatively, if you have syslog enabled, you can check the file /var/log/messages for any system-generated swap-related messages.</td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;">'''ADVISORY''' Do NOT use this method if using USB storage with MULTIPLE partitions. Refer to [[USB storage]] for further information.</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">----</td><td> </td><td style="background: #eee; font-size: smaller;">----</td></tr>
</table>Masterman