Am Sun, 19 Feb 2017 14:41:20 +0100
schrieb meino.cra...@gmx.de:

> Helmut Jarausch <jarau...@skynet.be> [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.

Yes, and it's the small tiny write IO every application does every now
and then which then blocks the application or even the whole OS for
minutes. Because IO work-queues tend to be really big.

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

No, ionice cannot help here. If a process blocks due to exhausting
dirty_background_bytes, it is blocked. Nothing will help to write back
that data any earlier. And if even dirty_bytes is exhausted, the whole
system blocks.

I suggested another approach in my other reply:

Lower dirty_background_bytes, maybe switch to deadline scheduler for
better in-time servicing of write requests.

> The emerge may take longer, but a frozen system is even slower...
> ;)

Not really, most of it can run from cache (if you allow for
"swappiness"). It will have almost no impact on system performance if
running in tmpfs. I'm having 16GB of RAM and allow portage to use 32GB
of tmpfs - that means: Parts of ongoing big emerges WILL be swapped
out. But since using deadline, this has almost no impact. Emerging is
still lots faster than without tmpfs.

-- 
Regards,
Kai

Replies to list-only preferred.


Reply via email to