Tip for Desktop Memory management, new vm tuning option

Bret Busby bret.busby at gmail.com
Tue Jul 30 15:24:41 UTC 2019


On 30/07/2019, Rashkae <ubuntu at tigershaunt.com> wrote:
> On 2019-07-30 10:24 a.m., Bret Busby wrote:
>
>> I have looked in the file, to find whether a similar (with a lesser
>> setting) line exists, and did not find one.
>>
>> If the line is inserted in the file, where should it be inserted, or,
>> does it not matter?
>>
>>
>
> You can just append it to the end, but no, it doesn't matter.
> sudo cp /etc/sysctl.conf /etc/sysctl.conf.bak
> sudo echo "vm.watermark_scale_factor=500" >> /etc/sysctl.conf
>
> Should do the trick, be very careful if typing those you use >> and not
> just a single >
>
>
>

"
bret at bret-MD34045-2521:~$ sudo cp /etc/sysctl.conf /etc/sysctl.conf.bak
[sudo] password for bret:
bret at bret-MD34045-2521:~$ sudo echo "vm.watermark_scale_factor=500" >>
/etc/sysctl.conf
bash: /etc/sysctl.conf: Permission denied
bret at bret-MD34045-2521:~$ sudo vi /etc/sysctl.conf
bret at bret-MD34045-2521:~$ sudo sysctl --system
* Applying /etc/sysctl.d/10-console-messages.conf ...
kernel.printk = 4 4 1 7
* Applying /etc/sysctl.d/10-ipv6-privacy.conf ...
net.ipv6.conf.all.use_tempaddr = 2
net.ipv6.conf.default.use_tempaddr = 2
* Applying /etc/sysctl.d/10-kernel-hardening.conf ...
kernel.kptr_restrict = 1
* Applying /etc/sysctl.d/10-link-restrictions.conf ...
fs.protected_hardlinks = 1
fs.protected_symlinks = 1
* Applying /etc/sysctl.d/10-magic-sysrq.conf ...
kernel.sysrq = 176
* Applying /etc/sysctl.d/10-network-security.conf ...
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.tcp_syncookies = 1
* Applying /etc/sysctl.d/10-ptrace.conf ...
kernel.yama.ptrace_scope = 1
* Applying /etc/sysctl.d/10-zeropage.conf ...
vm.mmap_min_addr = 65536
* Applying /usr/lib/sysctl.d/30-tracker.conf ...
fs.inotify.max_user_watches = 65536
* Applying /usr/lib/sysctl.d/50-default.conf ...
net.ipv4.conf.all.promote_secondaries = 1
net.core.default_qdisc = fq_codel
* Applying /etc/sysctl.d/99-sysctl.conf ...
vm.watermark_scale_factor = 500
* Applying /etc/sysctl.conf ...
vm.watermark_scale_factor = 500
bret at bret-MD34045-2521:~$
"

echo to append, did not work; vi worked.

-- 
Bret Busby
Armadale
West Australia
..............

"So once you do know what the question actually is,
 you'll know what the answer means."
- Deep Thought,
 Chapter 28 of Book 1 of
 "The Hitchhiker's Guide to the Galaxy:
 A Trilogy In Four Parts",
 written by Douglas Adams,
 published by Pan Books, 1992

....................................................




More information about the ubuntu-users mailing list