Fwd: swapiness

Keith Smith techlists at phpcoderusa.com
Tue Mar 1 16:40:08 MST 2016


Or you can become root by issuing sudo -i

Be careful!!


On 2016-03-01 12:57, Michael wrote:
> ---------- Forwarded message ----------
> From: CARRUTH, RUSTY <Rusty.Carruth at smartm.com>
> Date: Tue, Mar 1, 2016 at 10:26 AM
> Subject: RE: swapiness
> To: Main PLUG discussion list <plug-discuss at lists.phxlinux.org>
> Cc: "bmike1 at gmail.com" <bmike1 at gmail.com>
> 
> Beware the sudo side effect!  ;-)
> 
> When you type this:
> 
> Sudo cmd > file
> 
> The CMD is run as root, but the write to file is done as you!
> 
> You need to do this:
> 
> Sudo ‘cmd > file’
> 
> Or something like.
> 
> Also, don’t append to the file (don’t use >>), just overwrite (>).
> 
> 
> Rusty
> 
> Again, only you will see this due to my IT department’s email
> rewriting rule that I haven’t spent the time to create a workaround
> for…)
> 
> A reply-all will, however, send to both me AND the list – which will
> be seen.
> 
> FROM: plug-discuss-bounces at lists.phxlinux.org
> [mailto:plug-discuss-bounces at lists.phxlinux.org] ON BEHALF OF Michael
>  SENT: Monday, February 29, 2016 11:10 PM
>  TO: Main PLUG discussion list
>  SUBJECT: Re: swapiness
> 
> fyi:  when I attempted to save it in gedit it gave me the permission
> denied error.
> 
> On Tue, Mar 1, 2016 at 1:08 AM, Michael <bmike1 at gmail.com> wrote:
> 
> What am i doing incorrectly?
> 
> $  sudo cat /proc/sys/vm/swappiness
> 
> 60
> 
> bmike1 at MikesBeast ~ $  sudo cat 30>> /proc/sys/vm/swappiness
> 
> bash: /proc/sys/vm/swappiness: Permission denied
> 
> bmike1 at MikesBeast ~ $ sudo gedit
> 
> bmike1 at MikesBeast ~ $ sudo gedit /proc/sys/vm/swappiness
> 
> ** (gedit:10639): WARNING **: Hit unhandled case 13 (Error writing to
> file: Invalid argument) in parse_error.
> 
> ** (gedit:10639): WARNING **: Hit unhandled case 13 (Error writing to
> file: Invalid argument) in parse_error.
> 
> bmike1 at MikesBeast ~ $  sudo cat >> /proc/sys/vm/swappiness<<eof
> 
>> 1
> 
>> eof
> 
> bash: /proc/sys/vm/swappiness: Permission denied
> 
> bmike1 at MikesBeast ~ $  sudo cat >> /proc/sys/vm/swappiness<<eof
> 
> 1
> 
> eof
> 
> ^C
> 
> bmike1 at MikesBeast ~ $ sudo cat /proc/sys/vm/swappiness
> 
> 1
> 
> WHATEVER! lol
> 
> On Tue, Mar 1, 2016 at 12:43 AM, Michael <bmike1 at gmail.com> wrote:
> 
> have a desktop. in any case I searched google this swapiness question
> and here is what it says:
> 
> "
> 
> After rebooting the swappiness is set to 10. This can be checked by
> 
> running the following command in a terminal: sudo cat
> /proc/sys/vm/swappiness.
>  The swap tendency can have a value of 0 (fully off) to 100 (swap is
> constantly used).
>  A workable and practical rule for changing the swappiness can be:
>  1 GB or more RAM: 10
>  Less than 1 GB of RAM: 1
>  TIP:
>  Your computer has less than 512 MB ​​of RAM? Try to change the
> swap tendency to 0 (zero). With lower amount of memory installed, this
> might even give a better result then changing the swap tendency to 1.
> 
> "
> 
> Why is 0 better than 1?
> 
> On Tue, Mar 1, 2016 at 12:38 AM, Kevin Fries <kevin at fries-biro.com>
> wrote:
> 
> Linux is not Windows.  Linux can, and will run without using swap if
> it can.  Linux will remain RAM resident unless it has to.  So, what
> they are telling you is this... If you don't need swap, don't define
> it.
> 
> There is one exception to this rule, since you are using a laptop.
> There are two instant on technologies, sleep and hibernate.  One of
> the will stash the state to RAM, the other to swap.  I forget which is
> which.  But if it needs to go to swap, you will need a swap file equal
> to RAM if you use that feature.
> 
> Kevin
> 
> On Feb 29, 2016 10:32 PM, "Michael" <bmike1 at gmail.com> wrote:
> 
> swapiness=..... 0? Remember; I am computer-illiterate!
> 
> On Mon, Feb 29, 2016 at 11:47 PM, Todd Millecam <tyggna at gmail.com>
> wrote:
> 
> Disable swap.  Never activate it on boot.  If you start reaching oom
> conditions, turn it back on.
> 
> On Mon, Feb 29, 2016 at 9:38 PM, Michael <bmike1 at gmail.com> wrote:
> 
>> What do you recommend you reduce swapiness to for machines that have
>> plenty of memory that will probably never be filled?
>> 
>> --
>> 
>> :-)~MIKE~(-:
>> 
>> ---------------------------------------------------
>> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
>> To subscribe, unsubscribe, or to change your mail settings:
>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss [1]
> 
>  --
> 
> Todd Millecam
> 
>  ---------------------------------------------------
>  PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
>  To subscribe, unsubscribe, or to change your mail settings:
>  http://lists.phxlinux.org/mailman/listinfo/plug-discuss [1]
> 
> --
> 
> :-)~MIKE~(-:
> 
>  ---------------------------------------------------
>  PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
>  To subscribe, unsubscribe, or to change your mail settings:
>  http://lists.phxlinux.org/mailman/listinfo/plug-discuss [1]
> 
>  ---------------------------------------------------
>  PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
>  To subscribe, unsubscribe, or to change your mail settings:
>  http://lists.phxlinux.org/mailman/listinfo/plug-discuss [1]
> 
> --
> 
> :-)~MIKE~(-:
> 
> --
> 
> :-)~MIKE~(-:
> 
> --
> 
> :-)~MIKE~(-:
> 
> --
> 
> :-)~MIKE~(-:
> 
> 
> Links:
> ------
> [1] http://lists.phxlinux.org/mailman/listinfo/plug-discuss
> 
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.phxlinux.org/mailman/listinfo/plug-discuss

-- 
Keith Smith


More information about the PLUG-discuss mailing list