Re: [gentoo-user] How to keep my system from (nearly) freezing?
On 02/19/2017 07:53 AM, Helmut Jarausch wrote: > Hi, > > sometime I have some memory hungry ebuilds in the background, when I > start (e.g.) Chromium which needs very much memory if you have a lot of > open tabs. > > In that case my system nearly freezes. I cannot even kill chrome. > What can I do in that case. (Remote login doesn't work either) > > Can I have any additional program (like Chromium) die if there is not > enough memory. Yes, just disable swap as that is what happens when you run out of swap. You can configure the likelihood of a process being killed through /proc//oom_adj. If you disable it for all processes after boot (ie. through a script) then only the "additional" programs can be killed but that may any program that's using a lot of memory so it may not be a good idea for a desktop. See http://www.oracle.com/technetwork/articles/servers-storage-dev/oom-killer-1911807.html > Many thanks for a hint, > Helmut > -- Fernando Rodriguez
Re: [gentoo-user] How to keep my system from (nearly) freezing?
Hi, On Sun, 19 Feb 2017 13:53:49 +0100 Helmut Jarausch wrote: > Hi, > > sometime I have some memory hungry ebuilds in the background, when I > start (e.g.) Chromium which needs very much memory if you have a lot of > open tabs. > > In that case my system nearly freezes. I cannot even kill chrome. > What can I do in that case. (Remote login doesn't work either) > > Can I have any additional program (like Chromium) die if there is not > enough memory. 1. Use reasonable -j and -l options in MAKEOPTS. A good start will be -j N and -l 2*N, where N is a number of your logical cores. 2. Set the lowest CPU and I/O priorities for emerge: PORTAGE_NICENESS=19 and run emerge as `ionice -c3 emerge ...`, you have to use CFQ scheduler to be able to use ionice. 3. Use zswap with z3fold allocator. It helps me well on my laptop with 2GB RAM. 4. If everything above doesn't help: a) reduce -j to a value where memory usage is suitable for you; b) consider using -Os in your {C,CXX,F,FC}FLAGS, since such system is certainly short of memory. 5. If even 4. doesn't help, consider using more powerful host to build binary packages for this one. Best regards, Andrew Savchenko pgpfJpZXTRw2Y.pgp Description: PGP signature
Re: [gentoo-user] How to keep my system from (nearly) freezing?
On Sun, 19 Feb 2017 14:36:17 +0100, Miroslav Rovis wrote: > > # killa chromium > # killall > in this case likely (never installed any of Schmoog's browsers): > # killall chromium It's "killall chrome". -- Neil Bothwick A pessimist complains about the noise when opportunity knocks. pgpZPiOXYM3GU.pgp Description: OpenPGP digital signature
Re: [gentoo-user] How to keep my system from (nearly) freezing?
On Sun, Feb 19, 2017 at 01:53:49PM +0100, Helmut Jarausch wrote > sometime I have some memory hungry ebuilds in the background, when > I start (e.g.) Chromium which needs very much memory if you have a > lot of open tabs. > > In that case my system nearly freezes. I cannot even kill chrome. > What can I do in that case. (Remote login doesn't work either) You may not like this answer, but here goes... Shut down X before emerging memory-hungry ebuilds. I don't mean {CTRL}{ALT}{F1} switching to a text console; I mean log out of X altogether. Without the memory overhead of X and various programs running, you'll be able to compile Chromium a lot faster. Doing that, I've built Pale Moon (a Firefox fork) from source on an ancient Atom netbook with 2 gigs of ram in approximately 6 hours. I had to select maximum cpu speed and "makeopts=-j3", but it works. A few questions... 1) How much ram do you have? 2) How large is your swap partition? 3) Do you use ramdisks? 4) Do you use a lot of space for files in /dev/shm? 5) How much spare space do you have on your hard drive? -- Walter DnesI don't run "desktop environments"; I run useful applications
Re: [gentoo-user] How to keep my system from (nearly) freezing?
On 19.02.2017 14:41, meino.cra...@gmx.de wrote: > Helmut Jarausch[17-02-19 14:04]: >> Hi, >> >> sometime I have some memory hungry ebuilds in the background, when I >> start (e.g.) Chromium which needs very much memory if you have a lot of >> open tabs. >> >> In that case my system nearly freezes. I cannot even kill chrome. >> What can I do in that case. (Remote login doesn't work either) >> >> Can I have any additional program (like Chromium) die if there is not >> enough memory. >> >> Many thanks for a hint, >> Helmut >> > Hi Helmut, > > I know that situation very well...additionally I have Blender > open... > > But I think that the "freeze" of the system is not due to the memory > amount but due to the heavy I/O while swapping. I think so, too. > May be a tool like ionice could help you to keep the possibility > of killing certain processes. Ionice the emerge itself and additinally > nice it also. > The emerge may take longer, but a frozen system is even slower... > ;) > > HTH! > Cheers > Meino You can also use a compressed swap partition in RAM via zram (Instructions: https://wiki.gentoo.org/wiki/Zram). Then your system is still responsive enough to kill chromium when you realize that your memory fills up. It should also be possible to somehow dynamically set memory quotas but I've not tried it yet. It might work via cgroups (which portage can use natively).
Re: [gentoo-user] How to keep my system from (nearly) freezing?
Helmut Jarausch[17-02-19 14:04]: > Hi, > > sometime I have some memory hungry ebuilds in the background, when I > start (e.g.) Chromium which needs very much memory if you have a lot of > open tabs. > > In that case my system nearly freezes. I cannot even kill chrome. > What can I do in that case. (Remote login doesn't work either) > > Can I have any additional program (like Chromium) die if there is not > enough memory. > > Many thanks for a hint, > Helmut > Hi Helmut, I know that situation very well...additionally I have Blender open... But I think that the "freeze" of the system is not due to the memory amount but due to the heavy I/O while swapping. May be a tool like ionice could help you to keep the possibility of killing certain processes. Ionice the emerge itself and additinally nice it also. The emerge may take longer, but a frozen system is even slower... ;) HTH! Cheers Meino
Re: [gentoo-user] How to keep my system from (nearly) freezing?
On 170219-14:11+0100, Miroslav Rovis wrote: ... > Try Ctrl+Alt+Fx > where x is one of F1 ... F6 > and then issue: > # killa chromium # killall in this case likely (never installed any of Schmoog's browsers): # killall chromium -- Miroslav Rovis Zagreb, Croatia https://www.CroatiaFidelis.hr signature.asc Description: Digital signature
Re: [gentoo-user] How to keep my system from (nearly) freezing?
On Sunday 19 Feb 2017 13:53:49 Helmut Jarausch wrote: > Hi, > > sometime I have some memory hungry ebuilds in the background, when I > start (e.g.) Chromium which needs very much memory if you have a lot of > open tabs. > > In that case my system nearly freezes. I cannot even kill chrome. > What can I do in that case. (Remote login doesn't work either) > > Can I have any additional program (like Chromium) die if there is not > enough memory. > > Many thanks for a hint, > Helmut I assume you know setting --jobs= and --load-average= in emerge or in your MAKEOPTS directive in /etc/portage/make.conf. You can also set PORTAGE_NICENESS in make.conf, which will be added to the nice value portage is running with. But these will not affect disk I/O bottlenecks. Consider running emerge with ionice[1] to control disk bottlenecks. [1] /usr/src/linux/Documentation/block/ioprio.txt -- Regards, Mick signature.asc Description: This is a digitally signed message part.
Re: [gentoo-user] How to keep my system from (nearly) freezing?
On 170219-13:53+0100, Helmut Jarausch wrote: > Hi, > > sometime I have some memory hungry ebuilds in the background, when I Ebuilds are just text files, they don't run in the background... > start (e.g.) Chromium which needs very much memory if you have a lot of > open tabs. ( Chromium is the most privacy-invading browser ever. It's a spyware, I could never use it, but forget about that, it's not what this topic is about... ) > In that case my system nearly freezes. I cannot even kill chrome. > What can I do in that case. (Remote login doesn't work either) Try Ctrl+Alt+Fx where x is one of F1 ... F6 and then issue: # killa chromium > > Can I have any additional program (like Chromium) die if there is not > enough memory. > > Many thanks for a hint, > Helmut > This could be a hardware, not a software issue. Also, not sure, but looks like, not a memory issue, but a CPU issue. It's likely the CPU triggers the BIOS to shut down because CPU gets too hot, but because it is not properly implemented, what happens is even worse than doing nothing, and that is: the system freezes, but the CPU keeps running... Bad! How warm does you machine, try to touch it in the back, or under, if it's a laptop, where ther CPU is? It reminds me of what I had. My systems, that had only the original, run-of-the-mill coolers on the CPUs (I bought a few of same model MBO, so i can clone my systems)... The usual 80mm coolers. As soon as I replaced them with 120mm coolers, no issues any more. Regards! -- Miroslav Rovis Zagreb, Croatia https://www.CroatiaFidelis.hr signature.asc Description: Digital signature
[gentoo-user] How to keep my system from (nearly) freezing?
Hi, sometime I have some memory hungry ebuilds in the background, when I start (e.g.) Chromium which needs very much memory if you have a lot of open tabs. In that case my system nearly freezes. I cannot even kill chrome. What can I do in that case. (Remote login doesn't work either) Can I have any additional program (like Chromium) die if there is not enough memory. Many thanks for a hint, Helmut