From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15688 invoked from network); 7 Jul 2021 18:33:12 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 7 Jul 2021 18:33:12 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 72A4F9CA4D; Thu, 8 Jul 2021 04:33:10 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 0077B9C862; Thu, 8 Jul 2021 04:32:28 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id 9C4A89C862; Thu, 8 Jul 2021 04:32:26 +1000 (AEST) Received: from mailout7.ceti.pl (mailout7.ceti.pl [62.121.128.47]) by minnie.tuhs.org (Postfix) with ESMTPS id 571609C854 for ; Thu, 8 Jul 2021 04:32:25 +1000 (AEST) Received: from tau1.ceti.pl (tau.ceti.pl [62.121.128.11]) by mailout7.ceti.pl (Postfix) with ESMTP id BAD0F37811F1; Wed, 7 Jul 2021 20:32:22 +0200 (CEST) Received: by tau1.ceti.pl (Postfix, from userid 3727) id 73F1A960DCC; Wed, 7 Jul 2021 20:32:22 +0200 (CEST) Date: Wed, 7 Jul 2021 20:32:22 +0200 From: Tomasz Rola To: Theodore Ts'o Message-ID: <20210707183222.GA9897@tau1.ceti.pl> References: <396911b232bae5938068a14fe0f7181e@firemail.de> <20210704004757.GB24671@tau1.ceti.pl> <20210705071450.GA12885@tau1.ceti.pl> <20210706231659.GA13225@tau1.ceti.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [TUHS] [tuhs] The Unix shell: a 50-year view X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tuhs@minnie.tuhs.org Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" On Tue, Jul 06, 2021 at 08:46:34PM -0400, Theodore Ts'o wrote: > On Wed, Jul 07, 2021 at 01:17:00AM +0200, Tomasz Rola wrote: > > [...] > > https://www.emacswiki.org/emacs/EmacsApplicationFramework [...] > > > > Well, the old joke was that emacs stood for "eight megabytes and > constantly swapping". Yeah, during my 486 days it was indeed doing stuff with disk. But I was too happy to have this "workstation lookalike" running "Unix lookalike" installed from dozens of floppies so I did not complained about some minor problems. > These days, sure, starting a fresh Emacs > version 27 process has a SIZE of 364 megabytes with an RSS of 78 > megabytes. > > OTOH, starting a fresh copy of Konsole (KDE's current terminal > emulator) has a SIZE 1383 megabytes with an RSS of 114 megabytes, and > the single Konsole process running all of my terminal windows has a > SIZE of 2160 megabytes (or just a touch over 2GB) with an RSS of 189 > megabytes. An excerpt from my ps: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND xxxek 576 0.0 0.2 283392 34172 pts/122 SNl Jun29 0:06 emacs xxxek 23684 0.3 1.7 379624 211872 pts/21 SN Jul03 22:06 emacs /ho xxxon 12331 12.5 20.4 5898360 2519640 ? TNsl Mar29 18278:11 firefox-esr xxxon 3553 0.0 1.2 218028 150656 pts/67 TN Jun30 0:24 dillo xxxek 12588 0.0 0.0 38108 752 pts/183 T 2020 0:00 lynx -nocolor -force-html /ho xxxek 6785 0.0 0.0 310580 10052 pts/22 Sl 2020 41:51 roxterm xxxek 5321 0.0 0.0 102712 1456 tty2 S 2020 1:56 rxvt -bg Black xxxek 5322 0.0 0.0 66784 1988 tty2 S 2020 165:48 xterm -bg xxxek 5596 0.0 0.0 21608 536 pts/121 S+ 2020 1:35 /usr/bin/screen Emacs ver.23, firefox ver. "very old". I do not trust my browsers too much, so when I go to sleep they go to STOP freeze. The second emacs is editing my pathetic########glorious######## wiki with org-mode, file length about 55 megabytes, with unicodes, so the rss is multiple of file size. I have long ago replaced konsole with roxterm. As you can see, it eats nowhere near a gigabyte. And it does not read a whole disk when starting. It usually goes with three tabs opened, so maybe in your case memsize would have been bigger. I make a lot of use with virtual desktops offered by fvwm, and when I need terminal on one of those desktops (I usually do), I open some rxvt variation; position, resize and keep it there for further use. As I have only 12gigs of ram and more than half goes to ramdisk (always doing something there, including compiling huge piles of code from the net), so I have to keep an eye on firefox. When it goes above 2.9g of rss I usually start to fret and kill unneeded tabs. I set it up to use only two or three fonts and completely disregard author-provided fonts. So far, so good. Ah, and I use noscript, too. Yet despite of all those precautions, I have to kill -STOP it, because the mere thought that it will keep eating 50-90% of cpu while doing nothing, well, this drives me up the wall. Likewise, back in the past, when I saw how *idle* program (firefox) constantly wrote *gigs* of bytes to my disk, I simply went mad. Long story short, now it only can write to temporary place in ramdisk. It still does not stop it from opening multiple files on disk in /tmp, deleting them and keeping opened/deleted forever, using up my precious ram. It sometimes closes those files, but not very often. I usually open new pages in dillo, w3m or lynx (or curl) and use firefox when nothing else would do. Not perfect solution - dillo has some memory problem, so I usually have many of them opened and slash those who grow too much. Like, 300megs for dillo is enough. Read up all the tabs in it and kill. And it seems I have (pidof lynx|wc -w) 170 lynx processes, all kill-stopped and awaiting my attention. Craps. Chances are I did not stopped being mad. At least Unix command line tools allow me to measure it. > As a percentage of the 32 GB physical memory in my Desktop machine, > I'm not too worried about the memory consumption of either the > terminal windows or emacs, especially since the browser takes a lot > more memory. These days, I run my browser in a container to limit its > physical memory usage to 12GB; systemd makes setting this up via a > user unit file really easy. :-) > > - Ted > > # ~/.config/systemd/chrome.service > [Unit] > Description=Chrome Browser > > [Service] > ExecStart=/usr/bin/google-chrome > KillMode=process > MemoryAccounting=true > MemoryMax=12G Now I am happy that I do not use systemd. Now I want to find more time and migrate to OpenBSD. I really do (I know there are some Linux distros which evaded systemd - for a while, but I consider a whole Linux land to be lost already, just a matter of time, and I foresee that OpenBSD will fall as the very last, if ever). I will sleep less and program more. I will rewrite all my old python2x scripts in r7rs scheme. Not really so many. Fruits of hard work shall be sweet and plentiful. 12g for a browser. I am not criticising you, but I could say a bit about people who made programs and websites contributing to such sizes. -- Regards, Tomasz Rola -- ** A C programmer asked whether computer had Buddha's nature. ** ** As the answer, master did "rm -rif" on the programmer's home ** ** directory. And then the C programmer became enlightened... ** ** ** ** Tomasz Rola mailto:tomasz_rola@bigfoot.com **