Tip for Desktop Memory management, new vm tuning option

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

Tip for Desktop Memory management, new vm tuning option

Rashkae-2
Recent Linux Kernels since Ubuntu 16.04 have had changes to Virtual
Memory management that drastically hurt performance on Desktop loads
where RAM is not always sufficient for all running apps.  With 4 to 8 GB
desktops it's easy, if multi-tasking, to starve the RAM.  With older V3
and 4.4 Linux kernels, swap on an SSD, you could easily drive the system
memory usage several GB past your RAM and not even notice.

However, with Newer linux kernels, if memory usage approaches your RAM,
applications that try to allocate a large chunk of memory could quickly
send a system into a swap tailspin that renders the system inoperable
until rebooted or processes manually killed.  I've tripped over this
several times over the past few years, and I finally found the change
that causes it, Documented Here:

https://www.fclose.com/linux-kernels/642756/mm-scale-kswapd-watermarks-in-proportion-to-memory-linux-4-6/

The key to avoiding this swap lock problem is to increase
/proc/sys/vm/watermark_scale_factor

It defaults to 10.  In my testing, 100 is still not enough to avoid the
problems, but increasing it to 500 *drastically* improves the computer's
ability to handle memory over-commit without falling on it's face.

On my 8GB system, I can have several browser windows, thunderbird, Open
Office, calibre and a few movies playing, (brining my RAM usage past
6GB), then open a 4GB Windows 10 VirtualBox instance, and everything
works with no noticeable slowdowns or hitches.  This was completely
impossible before.

If you want to try this, the change can be made permanent by adding this
line in /etc/sysctl.conf.  Run sudo sysctl --system to apply changes
without reboot.


vm.watermark_scale_factor=500





--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Tip for Desktop Memory management, new vm tuning option

Liam Proven
On Tue, 30 Jul 2019 at 14:43, Rashkae <[hidden email]> wrote:

>
> Recent Linux Kernels since Ubuntu 16.04 have had changes to Virtual
> Memory management that drastically hurt performance on Desktop loads
> where RAM is not always sufficient for all running apps.  With 4 to 8 GB
> desktops it's easy, if multi-tasking, to starve the RAM.  With older V3
> and 4.4 Linux kernels, swap on an SSD, you could easily drive the system
> memory usage several GB past your RAM and not even notice.
>
> However, with Newer linux kernels, if memory usage approaches your RAM,
> applications that try to allocate a large chunk of memory could quickly
> send a system into a swap tailspin that renders the system inoperable
> until rebooted or processes manually killed.  I've tripped over this
> several times over the past few years, and I finally found the change
> that causes it, Documented Here:
>
> https://www.fclose.com/linux-kernels/642756/mm-scale-kswapd-watermarks-in-proportion-to-memory-linux-4-6/
>
> The key to avoiding this swap lock problem is to increase
> /proc/sys/vm/watermark_scale_factor
>
> It defaults to 10.  In my testing, 100 is still not enough to avoid the
> problems, but increasing it to 500 *drastically* improves the computer's
> ability to handle memory over-commit without falling on it's face.
>
> On my 8GB system, I can have several browser windows, thunderbird, Open
> Office, calibre and a few movies playing, (brining my RAM usage past
> 6GB), then open a 4GB Windows 10 VirtualBox instance, and everything
> works with no noticeable slowdowns or hitches.  This was completely
> impossible before.
>
> If you want to try this, the change can be made permanent by adding this
> line in /etc/sysctl.conf.  Run sudo sysctl --system to apply changes
> without reboot.
>
>
> vm.watermark_scale_factor=500

_Very_ interesting. Thanks for that. I will try it. I have been
experiencing related problems myself recently. I tried this and noted
by assigned-memory meter leap up instantly. I have 16 GB but my normal
workload is ITRO 12-14GB.

I upgraded to a 16GB machine because with 6-7GB on my previous 8GB
machine, it was bogging down badly. I experimented with swappiness
settings and compcache but could not get any real improvement.


--
Liam Proven - Profile: https://about.me/liamproven
Email: [hidden email] - Google Mail/Hangouts/Plus: [hidden email]
Twitter/Facebook/Flickr: lproven - Skype/LinkedIn: liamproven
UK: +44 7939-087884 - ČR (+ WhatsApp/Telegram/Signal): +420 702 829 053

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Tip for Desktop Memory management, new vm tuning option

Bret Busby-2
In reply to this post by Rashkae-2
On 30/07/2019, Rashkae <[hidden email]> wrote:

> Recent Linux Kernels since Ubuntu 16.04 have had changes to Virtual
> Memory management that drastically hurt performance on Desktop loads
> where RAM is not always sufficient for all running apps.  With 4 to 8 GB
> desktops it's easy, if multi-tasking, to starve the RAM.  With older V3
> and 4.4 Linux kernels, swap on an SSD, you could easily drive the system
> memory usage several GB past your RAM and not even notice.
>
> However, with Newer linux kernels, if memory usage approaches your RAM,
> applications that try to allocate a large chunk of memory could quickly
> send a system into a swap tailspin that renders the system inoperable
> until rebooted or processes manually killed.  I've tripped over this
> several times over the past few years, and I finally found the change
> that causes it, Documented Here:
>
> https://www.fclose.com/linux-kernels/642756/mm-scale-kswapd-watermarks-in-proportion-to-memory-linux-4-6/
>
> The key to avoiding this swap lock problem is to increase
> /proc/sys/vm/watermark_scale_factor
>
> It defaults to 10.  In my testing, 100 is still not enough to avoid the
> problems, but increasing it to 500 *drastically* improves the computer's
> ability to handle memory over-commit without falling on it's face.
>
> On my 8GB system, I can have several browser windows, thunderbird, Open
> Office, calibre and a few movies playing, (brining my RAM usage past
> 6GB), then open a 4GB Windows 10 VirtualBox instance, and everything
> works with no noticeable slowdowns or hitches.  This was completely
> impossible before.
>
> If you want to try this, the change can be made permanent by adding this
> line in /etc/sysctl.conf.  Run sudo sysctl --system to apply changes
> without reboot.
>
>
> vm.watermark_scale_factor=500
>
>


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?


--
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

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

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Tip for Desktop Memory management, new vm tuning option

Rashkae-2
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 >



--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Tip for Desktop Memory management, new vm tuning option

Bret Busby-2
On 30/07/2019, Rashkae <[hidden email]> 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@bret-MD34045-2521:~$ sudo cp /etc/sysctl.conf /etc/sysctl.conf.bak
[sudo] password for bret:
bret@bret-MD34045-2521:~$ sudo echo "vm.watermark_scale_factor=500" >>
/etc/sysctl.conf
bash: /etc/sysctl.conf: Permission denied
bret@bret-MD34045-2521:~$ sudo vi /etc/sysctl.conf
bret@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@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

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

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Tip for Desktop Memory management, new vm tuning option

Oliver Grawert
In reply to this post by Rashkae-2
hi,
Am Dienstag, den 30.07.2019, 10:34 -0400 schrieb Rashkae:

> sudo echo "vm.watermark_scale_factor=500" >> /etc/sysctl.conf

nope, that wont work ... you are only sudoing the "echo" not the actual
writing (">>") to the file ... 

it should be more like:

echo "vm.watermark_scale_factor=500" | sudo tee -a /etc/sysctl.conf

ciao
        oli

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Tip for Desktop Memory management, new vm tuning option

Rashkae-2
In reply to this post by Bret Busby-2

> "
>
> echo to append, did not work; vi worked.
>

Heh, sorry about that.  I'm in the habit of always opening a root
prompt,,, I should have thought that one through a bit more.



--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Tip for Desktop Memory management, new vm tuning option

Bret Busby-2
In reply to this post by Oliver Grawert
On 30/07/2019, Oliver Grawert <[hidden email]> wrote:

> hi,
> Am Dienstag, den 30.07.2019, 10:34 -0400 schrieb Rashkae:
>
>> sudo echo "vm.watermark_scale_factor=500" >> /etc/sysctl.conf
>
> nope, that wont work ... you are only sudoing the "echo" not the actual
> writing (">>") to the file ...
>
> it should be more like:
>
> echo "vm.watermark_scale_factor=500" | sudo tee -a /etc/sysctl.conf
>
> ciao
> oli
>

It seems simpler to use vi (sudo vi), and i to insert the text (or a
to append it),
then paste the copied text from the clipboard,
then <ESC>
then <SHIFT><Z><Z>

:)

--
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

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

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Tip for Desktop Memory management, new vm tuning option

ubuntu-users mailing list
In reply to this post by Oliver Grawert
On Tue, 30 Jul 2019 17:27:01 +0200, Oliver Grawert wrote:

>Am Dienstag, den 30.07.2019, 10:34 -0400 schrieb Rashkae:
>
>> sudo echo "vm.watermark_scale_factor=500" >> /etc/sysctl.conf  
>
>nope, that wont work ... you are only sudoing the "echo" not the actual
>writing (">>") to the file ... 
>
>it should be more like:
>
>echo "vm.watermark_scale_factor=500" | sudo tee -a /etc/sysctl.conf

Yes, usage with 'sudo' is a good example, when it makes sense to pipe
stdout to 'tee'. I'm doing this to switch between
cpu frequency scaling governors 'powersave' (Intel, resp. 'nondemand'
AMD) and 'performance' via
/sys/devices/system/cpu/cpu*/cpufreq/scaling_governor, so no tool is
needed and scripts are portable between Linux distros.

However, I would be very, very careful with all those esoteric tweaks.
From changing swappiness, disabling watchdog and even changing PCI
latency by BIOS settings etc., there are a lot of esoteric hints that
more likely screw up machines, than doing anything good.

There are exceptions, for example
https://aur.archlinux.org/packages/linux-rt/#comment-702130 . Enabling
CONFIG_AUDIT seemingly could be a PITA for some usages, but due to the
spectre mitigation, it's said that disabling makes no sense anymore, let
alone that using snaps with audit disabled wouldn't make sense, too.
Assuming for the usage disabling spectre mitigations is no issue and
AppArmore isn't needed, then it could be helpful to allow faster paths.

But if default values cause machines to become unstable, then I would
consider to not change a value such as the vm.watermark_scale_factor,
but instead to report this upstream. One or the other tweak to
increase performance sometimes makes sense, but to divert from defaults
to make a machine more stable isn't reasonable. Usually it's reasonable
to increase performance at the cost of something, e.g. security and/or
reliability.



--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Tip for Desktop Memory management, new vm tuning option

ubuntu-users mailing list
In reply to this post by Bret Busby-2
On Tue, 30 Jul 2019 23:39:25 +0800, Bret Busby wrote:
>It seems simpler to use vi

The word 'simple' in combination with 'vi*' or 'emacs' just for editing
a value is grotesk. 'vi*' or 'emacs' for sure have got advantages for
some purposes, but for editing a value I can't imagine something more
complicated than using one of those editors. IMO the right tools are
'echo', 'printf', 'sed' or easy to use editors such as 'nano' or even a
GUI editor such as 'xed', unless a user for some other reasons does use
'vi*' or 'emacs' on a daily basis.


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Tip for Desktop Memory management, new vm tuning option

Liam Proven
On Tue, 30 Jul 2019 at 18:33, Ralf Mardorf via ubuntu-users
<[hidden email]> wrote:
>
> The word 'simple' in combination with 'vi*' or 'emacs' just for editing
> a value is grotesk. 'vi*' or 'emacs' for sure have got advantages for
> some purposes, but for editing a value I can't imagine something more
> complicated than using one of those editors.

*Chuckle* I know exactly what you mean, but do bear in mind that Bret
is, ah, "of a certain age" -- he has been around at bit. When I saw my
first Unix box in 1988 (SCO Xenix), Vi was the only interactive editor
available.

(Edlin was the only built-in editor on PC/MS-DOS back then. Vi is at
least better than Edlin.)

So although I hate it, I know it and can use it for simple stuff.

> IMO the right tools are
> 'echo', 'printf', 'sed'

Diaagree. Too complex.

> or easy to use editors such as 'nano'

Agreed. Or Pico or Joe.

> or even a
> GUI editor such as 'xed',

Agreed, but brings in extra issues when editing files owned by root.
E.g. on openSUSE I cannot run graphical tools from sudo/su *at all*.
It is intentionally blocked. It's easy to circumvent on *buntu or
Debian if using X.org but less so with Wayland and not at all on
openSUSE.

So I do not advise it.

I do recommend this:
https://os.ghalkes.nl/tilde/

I put it on all my machines. Absolutely my favourite console editor
for Linux, but still has issues and rarely installed as standard.

> unless a user for some other reasons does use
> 'vi*' or 'emacs' on a daily basis.

I think this is the case in this instance.

--
Liam Proven - Profile: https://about.me/liamproven
Email: [hidden email] - Google Mail/Hangouts/Plus: [hidden email]
Twitter/Facebook/Flickr: lproven - Skype/LinkedIn: liamproven
UK: +44 7939-087884 - ČR (+ WhatsApp/Telegram/Signal): +420 702 829 053

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Tip for Desktop Memory management, new vm tuning option

Rashkae-2
In reply to this post by ubuntu-users mailing list

> However, I would be very, very careful with all those esoteric tweaks.
> From changing swappiness, disabling watchdog and even changing PCI
> latency by BIOS settings etc., there are a lot of esoteric hints that
> more likely screw up machines, than doing anything good.
>

In general, I agree with this sentiment.  I did not make this post to such a public list lightly, but if you bump into the issues I've described, the difference is no small matter, and documentation on how to best use this new kernel feature is *very* thin on the ground.  As far as I can tell, just a few random posts from experimenters like myself, (I think I saw someone who figured out how to use this tweak to make his Witcher game even able to load on a 4GB system.)

I agree this should be reported to Upstream.  But it's been over 2 years since this change to Linux was made, and still, the Memory limitations of desktop use that were introduced have not been addressed.

All that being said, these kinds of tweaks are best undertaken only by those who are confident they can fix it if I make an ill advised suggestion, or someone who is greatly impacted by the flaw I'm trying to work around.



--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Tip for Desktop Memory management, new vm tuning option

ubuntu-users mailing list
In reply to this post by Liam Proven
On Tue, 30 Jul 2019 18:49:10 +0200, Liam Proven wrote:
>On Tue, 30 Jul 2019 at 18:33, Ralf Mardorf via ubuntu-users
>>or even a GUI editor such as 'xed'  
>
>Agreed, but brings in extra issues when editing files owned by root.
>E.g. on openSUSE I cannot run graphical tools from sudo/su *at all*.
>It is intentionally blocked. It's easy to circumvent on *buntu or
>Debian if using X.org but less so with Wayland and not at all on
>openSUSE.

'xhost si:localuser:root' or blame other for not rewriting software
that is working for ages.

"Adam Williamson 2016-12-15 14:58:52 UTC

We don't really need a list of GUI processes that want to run as root.
We are aware such things exist. The point is that they're a bad idea
and always have been, and the switch from X to Wayland is an excellent
point at which to say "this is the point where we're not going to
enable this bad idea any more, and tell people to make better, more
robust, more secure software instead". If we never do that, we continue
to have bad, insecure software forever.

If you really need something that has to run as a GUI root process
right now, and none of the workarounds discussed earlier in the bug
works for you, by all means, switch back to X for now. There's a reason
we keep X as a prominent option in F25." -
https://bugzilla.redhat.com/show_bug.cgi?id=1274451#c62

"Adam Williamson 2016-11-29 00:24:01 UTC

This is not a 'weakness' of Wayland, it's a weakness of gparted (and
other graphical applications that try to run as root). gparted should
not run its UI as root. It should run its UI as a regular user and use
PolicyKit or something else similar to gain elevated privileges only
when necessary to query or modify devices.

Many graphical applications have already been written along these
lines. Doing it is not rocket science." -
https://bugzilla.redhat.com/show_bug.cgi?id=1274451#c37

Actually those introducing a new policy should provide all the apps
users do need. If it isn't rocket science they should provide those
apps. They can't expect that other projects obey. Due to this attitude
the Linux community lost a lot of excellent apps and never somebody
wrote replacements for those apps, when those excellent projects were
discontinued, because the people writing those apps in the first place
without getting money for it, don't have the time to rewrite their
projects again and again, each time a few fully paid developers and/or
spoilt children who don't have a life beyond their computer hobby
enforce something new.



--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Tip for Desktop Memory management, new vm tuning option

Ken D'Ambrosio
In reply to this post by Liam Proven
On 2019-07-30 12:49, Liam Proven wrote:

> On Tue, 30 Jul 2019 at 18:33, Ralf Mardorf via ubuntu-users
> <[hidden email]> wrote:
>>
>> The word 'simple' in combination with 'vi*' or 'emacs' just for
>> editing
>> a value is grotesk. 'vi*' or 'emacs' for sure have got advantages for
>> some purposes, but for editing a value I can't imagine something more
>> complicated than using one of those editors.
>
> *Chuckle* I know exactly what you mean, but do bear in mind that Bret
> is, ah, "of a certain age" -- he has been around at bit. When I saw my
> first Unix box in 1988 (SCO Xenix), Vi was the only interactive editor
> available.

I, for one, always forget the damn syntax for 'tee', so I cheat:
sudo bash -c "echo foo > bar"

> (Edlin was the only built-in editor on PC/MS-DOS back then. Vi is at
> least better than Edlin.)

*sigh*  Now you've gone and done it.  I apologize in advance --
especially if I've done this to this list before.  But...

==========================================================================Ed,
ed man! !man ed
 From: [hidden email] (Patrick J. LoPresti)
Subject: The True Path (long)
Date: 11 Jul 91 03:17:31 GMT
Newsgroups: alt.religion.emacs,alt.slack
When I log into my Xenix system with my 110 baud teletype, both vi and
Emacs are just too damn slow. They print useless messages like, ‘C-h for
help’ and ‘“foo” File is read only’. So I use the editor that doesn't
waste my VALUABLE time.

Ed, man!  !man ed

ED(1)               Unix Programmer's Manual                ED(1)

NAME
      ed - text editor

SYNOPSIS
      ed [ - ] [ -x ] [ name ]
DESCRIPTION
      Ed is the standard text editor.
---

Computer Scientists love ed, not just because it comes first
alphabetically, but because it's the standard. Everyone else loves ed
because it's ED!

“Ed is the standard text editor.”

And ed doesn't waste space on my Timex Sinclair. Just look:

-rwxr-xr-x  1 root          24 Oct 29  1929 /bin/ed
-rwxr-xr-t  4 root     1310720 Jan  1  1970 /usr/ucb/vi
-rwxr-xr-x  1 root  5.89824e37 Oct 22  1990 /usr/bin/emacs
Of course, on the system I administrate, vi is symlinked to ed. Emacs
has been replaced by a shell script which 1) Generates a syslog message
at level LOG_EMERG; 2) reduces the user's disk quota by 100K; and 3)
RUNS ED!!!!!!

“Ed is the standard text editor.”

Let's look at a typical novice's session with the mighty ed:

golem$ ed

?
help
?
?
?
quit
?
exit
?
bye
?
hello?
?
eat flaming death
?
^C
?
^C
?
^D
?
---

Note the consistent user interface and error reportage. Ed is generous
enough to flag errors, yet prudent enough not to overwhelm the novice
with verbosity.

“Ed is the standard text editor.”

Ed, the greatest WYGIWYG editor of all.

ED IS THE TRUE PATH TO NIRVANA! ED HAS BEEN THE CHOICE OF EDUCATED AND
IGNORANT ALIKE FOR CENTURIES! ED WILL NOT CORRUPT YOUR PRECIOUS BODILY
FLUIDS!! ED IS THE STANDARD TEXT EDITOR! ED MAKES THE SUN SHINE AND THE
BIRDS SING AND THE GRASS GREEN!!

When I use an editor, I don't want eight extra KILOBYTES of worthless
help screens and cursor positioning code! I just want an EDitor!! Not a
“viitor”. Not a “emacsitor”. Those aren't even WORDS!!!! ED! ED! ED IS
THE STANDARD!!!

TEXT EDITOR.

When IBM, in its ever-present omnipotence, needed to base their “edlin”
on a Unix standard, did they mimic vi? No. Emacs? Surely you jest. They
chose the most karmic editor of all. The standard.

Ed is for those who can remember what they are working on. If you are an
idiot, you should use Emacs. If you are an Emacs, you should not be vi.
If you use ED, you are on THE PATH TO REDEMPTION. THE SO-CALLED “VISUAL”
EDITORS HAVE BEEN PLACED HERE BY ED TO TEMPT THE FAITHLESS. DO NOT GIVE
IN!!! THE MIGHTY ED HAS SPOKEN!!!

?

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Tip for Desktop Memory management, new vm tuning option

ubuntu-users mailing list
On Tue, 30 Jul 2019 15:27:35 -0400, Ken D'Ambrosio wrote:
>I, for one, always forget the damn syntax for 'tee', so I cheat:
>sudo bash -c "echo foo > bar"

There's nothing to remember ;).
I also don't know how to append text, but I just need 'tee' to
overwrite, so no option is needed at all.
To replace '>' just '| sudo tee' is needed.
However, replacing ">>" is just one 'help' away, it's '| sudo tee -a'.


$ tee --help | grep append
  -a, --append              append to the given FILEs, do not overwrite
$ echo "hello" > world.txt
$ cat world.txt
hello
$ echo "world" | tee -a world.txt
world
$ cat world.txt
hello
world
$ echo "overwrite" | tee world.txt
overwrite
$ cat world.txt
overwrite



--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Tip for Desktop Memory management, new vm tuning option

Liam Proven
In reply to this post by Ken D'Ambrosio
On Tue, 30 Jul 2019 at 21:28, Ken D'Ambrosio <[hidden email]> wrote:

> *sigh*  Now you've gone and done it.  I apologize in advance --
> especially if I've done this to this list before.  But...
>
> ==========================================================================Ed,
[...]

> Let's look at a typical novice's session with the mighty ed:
>
> golem$ ed
>
> ?
> help
> ?
> ?
> ?
> quit
> ?
> exit
> ?
> bye
> ?
> hello?
> ?
> eat flaming death
> ?
> ^C
> ?
> ^C
> ?
> ^D
> ?
> ---
>
>

To quote an anonymous wit:
«
Hey, don't dismiss Vim. I've been using Vim for about 3 years now.

Mostly because I can't figure out how to exit...
»

:-D

--
Liam Proven - Profile: https://about.me/liamproven
Email: [hidden email] - Google Mail/Hangouts/Plus: [hidden email]
Twitter/Facebook/Flickr: lproven - Skype/LinkedIn: liamproven
UK: +44 7939-087884 - ČR (+ WhatsApp/Telegram/Signal): +420 702 829 053

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Tip for Desktop Memory management, new vm tuning option

ubuntu-users mailing list
On Wed, 31 Jul 2019 12:12:26 +0200, Liam Proven wrote:
>To quote an anonymous wit:

>Hey, don't dismiss Vim. I've been using Vim for about 3 years now.
>
>Mostly because I can't figure out how to exit...


:D


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Tip for Desktop Memory management, new vm tuning option

Syafril Hermansyah
In reply to this post by Rashkae-2
On 31/07/19 02.06, [hidden email] wrote:

>> However, I would be very, very careful with all those esoteric
>> tweaks. From changing swappiness, disabling watchdog and even
>> changing PCI latency by BIOS settings etc., there are a lot of
>> esoteric hints that more likely screw up machines, than doing
>> anything good.
>>
> In general, I agree with this sentiment.  I did not make this post to
> such a public list lightly, but if you bump into the issues I've
> described, the difference is no small matter, and documentation on
> how to best use this new kernel feature is *very* thin on the ground.
> As far as I can tell, just a few random posts from experimenters like
> myself, (I think I saw someone who figured out how to use this tweak
> to make his Witcher game even able to load on a 4GB system.)


I did use your trick on my desktop 8 GB and laptop 4 GB, it makes my
ubuntu 19.04 rare to hang when doing a lot screenshot through remmina
remote desktop.
Thanks for your tips.

--
syafril
-------
Syafril Hermansyah




--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users