Re: Enable EarlyOOM on Fedora KDE - Fedora 33 Self-Contained Change proposal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jul 5, 2020 at 12:46 AM John M. Harris Jr <johnmh@xxxxxxxxxxxxx> wrote:
>
> On Saturday, July 4, 2020 11:27:47 PM MST Alexey Avramov wrote:
> > >Linux handles low memory situations just fine, but it's much better if you
> > >
>  have an appropriately sized swap partition and let the kernel do its job
> >
> > No, by default Linux can hang at low memory condition. Huge swap space will
> > not help you if a leak occurs. With a large swap space, the hang can happen
> > later, but it can still happen. Another point is that the swap space is
> > slow. With fast leaks and slow swap space, freezing is possible throughout
> > the entire swap filling time. A typical problem: "once all the ram is used
> > up the whole system freezes as swap starts getting full, but really the
> > whole system is completely locked-up. I thought my swapfile was too small
> > so I made it match my ram (12 GB) but the system still gets frozen" [1].
>
> Sure, swap is slower than RAM. That's fine. We don't need it to be as fast as
> RAM, that's not what it's for. It's for things that can be swapped out,
> because it's loaded into memory, but not actively used. RAM doesn't "fill"
> until long after unused things have been swapped out.

Eviction of inactive anonymous pages isn't what causes the problem
under discussion. That's fairly efficient and exactly what swap is
well suited for. The problem is when the workload has greater demand
for memory, than there is RAM. That can cause two events to happen:
reclaim (file page faults), and eviction of active anonymous pages.
Both lead to "thrashing" and can completely clobber all responsibility
of a system, for more than a few reasons, but one of those is by
directly causing significant IO pressure.

In these cases, you simply need more RAM right now. The idea of
resource control suggests providing a minimum guarantee of IO for the
processes required to maintain system responsiveness, thereby
restricting IO demand by other processes. The same is applied to
memory and CPU.



>
> > >If you didn't mean for the program to use as much memory as it tried to,
> > >the correct solution would be to use cgroups.
> >
> >
> > 1. This is not configured by default.
> > 2. This can be inconvenient even for advanced users.
> > 3. Quick leaks can happen unexpectedly.
>
> What software in the default image leads to low memory issues? Web browsers?
> If so, there's a simple solution to this. We can put a default cgroup on web
> browsers so they don't take over the OS.

Pretty much. It'll actually work in reverse where a specific stack is
"protected" or given minimum resource guarantees via cgroups - and
that will automagically translate into everything else having
resources clamped down.


-- 
Chris Murphy
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux