Re: Is there a way to make the pi use swap?
On Saturday 15 September 2018 16:16:24 Jeffrey Walton wrote:
> On Fri, Sep 14, 2018 at 8:16 PM, Alan Corey <alan01346@gmail.com>
wrote:
> > My /etc/fstab just has
> > /var/swap2 none swap sw 0 0
> > That's for a swap file which was made by dding 0s into it, then
> > running mkswap.
> >
> > You'd replace /var/swap2 with /dev/sda2
> >
> > Sounds like you're just not loading it from your fstab. Should load
> > every boot. Nothing new or tricky there.
>
> In addition, it also helps to set swappiness to a low value, like 1 or
> 3, on modern kernels. That has the effect of telling the kernel to
> prefer to keep things in memory.
>
> With swapon and low swappiness I can actually run a C++ compiler with
> multiple jobs and without an OOM kill.
>
> Jeff
And pray tell, where does one set that swappiness?
Sounds like something that could be handy.
Thanks Jeff.
--
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
Reply to: