<div dir="ltr">Swapoff checks that automatically -- but I usually do it when I notice that I am using a ton of swap, but not all my ram. It may just be an illusion, but it seems that when I have a browser that is starting to act up and slow, this fixes it. <br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 18, 2017 at 4:17 PM, Justin Krejci <span dir="ltr"><<a href="mailto:jus@krytosvirus.com" target="_blank">jus@krytosvirus.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-size:10pt;font-family:Verdana,Geneva,sans-serif">
<p>Do you check to make sure your existing swap usage and RAM usage combined does not equal a number higher than the amount of total RAM you have on the system? I am guessing flushing swap into RAM when there is not enough RAM available is a bad thing to do.<br><br>Just curious, why do you clear your swap space like that periodically? If your swap is being used too much, perhaps you either need more RAM or else should maybe turn down your vm.swappiness in sysctl.<br><br></p><div><div class="h5">
<p>On 2017-09-18 04:07 PM, Jeff Chapin wrote:</p>
<blockquote type="cite" style="padding:0 0.4em;border-left:#1010ff 2px solid;margin:0">
<div dir="ltr">
<div>
<div>I periodically check swap usage, and run:<br><br>sudo swapoff -a; sudo swapon -a;<br><br></div>
This will force anything in swap (on disk) back into RAM.<br><br></div>
Jeff</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Sep 18, 2017 at 4:05 PM, Steve Trapp <span><<a href="mailto:stevetrapp@comcast.net" target="_blank">stevetrapp@comcast.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Aha. I tried 'man swap' but didn't think of 'swapon'. My google search was not<br> very productive, so I am thankful of your information! -Steve<br>
<div class="m_6455040591944095935HOEnZb">
<div class="m_6455040591944095935h5"><br> On Mon, Sep 18, 2017 at 07:16:16PM +0000, Iznogoud wrote:<br> > ><br> > > For GNU/Linux, how do you turn swap off and how do you turn in back on again?<br> > ><br> ><br> > Here is the top of the manual page:<br> ><br> ><br> > NAME<br> > swapon, swapoff - enable/disable devices and files for paging and swap-<br> > ping<br> ><br> > SYNOPSIS<br> > /sbin/swapon [-h -V]<br> > /sbin/swapon -a [-v] [-e]<br> > /sbin/swapon [-v] [-p priority] specialfile ...<br> > /sbin/swapon [-s]<br> > /sbin/swapoff [-h -V]<br> > /sbin/swapoff -a<br> > /sbin/swapoff specialfile ...<br> ><br> > ______________________________<wbr>_________________<br> > TCLUG Mailing List - Minneapolis/St. Paul, Minnesota<br> > <a href="mailto:tclug-list@mn-linux.org" target="_blank">tclug-list@mn-linux.org</a><br> > <a href="http://mailman.mn-linux.org/mailman/listinfo/tclug-list" rel="noopener noreferrer" target="_blank">http://mailman.mn-linux.org/ma<wbr>ilman/listinfo/tclug-list</a><br> </div>
</div>
<span class="m_6455040591944095935im m_6455040591944095935HOEnZb">--<br> Name: Steve Trapp<br> Location: Just east of the Missippi River<br> Email-address: stevetrapp<AT>comcast<DOT>net<br> Homepage: comcast DROPPED ALL HOMEPAGES--Where do I put my PGP public key now?<br> </span>
<div class="m_6455040591944095935HOEnZb">
<div class="m_6455040591944095935h5">______________________________<wbr>_________________<br> TCLUG Mailing List - Minneapolis/St. Paul, Minnesota<br> <a href="mailto:tclug-list@mn-linux.org" target="_blank">tclug-list@mn-linux.org</a><br> <a href="http://mailman.mn-linux.org/mailman/listinfo/tclug-list" rel="noopener noreferrer" target="_blank">http://mailman.mn-linux.org/ma<wbr>ilman/listinfo/tclug-list</a></div>
</div>
</blockquote>
</div>
<br><br clear="all"><br>-- <br>
<div class="m_6455040591944095935gmail_signature">Jeff Chapin<br>President, CedarLug, retired<br>President, UNIPC, "I'll get around to it"<br>President, UNI Scuba Club<br>Senator, NISG, retired</div>
</div>
<br>
<div class="m_6455040591944095935pre" style="margin:0;padding:0;font-family:monospace">______________________________<wbr>_________________<br> TCLUG Mailing List - Minneapolis/St. Paul, Minnesota<br> <a href="mailto:tclug-list@mn-linux.org" target="_blank">tclug-list@mn-linux.org</a><br> <a href="http://mailman.mn-linux.org/mailman/listinfo/tclug-list" rel="noopener noreferrer" target="_blank">http://mailman.mn-linux.org/<wbr>mailman/listinfo/tclug-list</a></div>
</blockquote>
</div></div></div>
<br>______________________________<wbr>_________________<br>
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota<br>
<a href="mailto:tclug-list@mn-linux.org">tclug-list@mn-linux.org</a><br>
<a href="http://mailman.mn-linux.org/mailman/listinfo/tclug-list" rel="noreferrer" target="_blank">http://mailman.mn-linux.org/<wbr>mailman/listinfo/tclug-list</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Jeff Chapin<br>President, CedarLug, retired<br>President, UNIPC, "I'll get around to it"<br>President, UNI Scuba Club<br>Senator, NISG, retired</div>
</div>