Re: [gentoo-user] Machine hangs up with out of memory
On Fri, Apr 30, 2021 at 8:09 PM Michael wrote: > On Friday, 30 April 2021 02:30:51 BST Adam Carter wrote: > > On Wed, Apr 28, 2021 at 7:58 PM Kai Peter wrote: > > > Hi, > > > > > > I have an issue with a machine where I'm not able to detect the real > > > root cause. It hangs up totally. It seems like it was running out of > > > memory - but why? Hopefully somebody can give me some insight. As far I > > > can see right now, it hangs up a few hours after an `emerge --update > > > --newuse --deep --with-bdeps=y @world`. > > > > > > The machine is an Intel Atom with 8 GB RAM (physical, max) and 24 GB > > > swap (a file). So 32 GB RAM in total. > > > > Might be worth adding zswap using zstd or lz4 to your config (uses more > CPU > > for less IO) > > https://www.kernel.org/doc/html/latest/vm/zswap.html > > Zswap will help optimise the swapping of cold pages out of RAM into the > compressed zswap cache and eventually push these out to the disk. This > won't > help with the problem of not having enough RAM to start with for compiling > packages with large resource requirements, like e.g. Chromium. > Yep, but the system is already at its full RAM, so we're in workaround/tactical solution territory. Any system that needs 24gig swap to support 8gig ram is going to really suck. > > With monster packages where more RAM is needed even for a single > compilation > job, after all cold pages have been swapped out, hot pages will start > being > swapped out/in. I think at this point the same I/O race condition will > ensue > as if no zswap were available, plus a compress/decompress CPU load. I > guess > the point of starting to thrash the on-disk swap trying to free RAM may > start > sooner, since RAM which would otherwise be available for the single > prioritised compilation job is now being used by zswap. So, there would > be a > sweet spot in using zswap to improve I/O performance, but it could end up > becoming a disbenefit on compilation of RAM hungry packages. > > Please correct my reasoning above if I have misunderstood how zswap works. > What you've said sounds reasonable to me.
Re: [gentoo-user] Machine hangs up with out of memory
On 2021-04-30 12:09, Michael wrote: However, the OP problem here seems to be with a leaky BIND? I found this mentioned upstream - but have not check BGO: https://gitlab.isc.org/isc-projects/bind9/-/issues/446 Thanks for reply. rndc runs on other machines daily, but not on this one. Right now I have corrected my bind config and the memory usage is stable by 700MB. The issue here was the statement "listen-on-v6 { any; };". bind was trying repeatedly to bind ipv6 to br0 and tap{0,1} devices - and fails. The memory usage is stable since 3 days: $>ps axuww | grep named named14414 0.2 1.4 735040 116952 ? Ssl Apr29 4:38 /usr/sbin/named -u named $>free -h totalusedfree shared buff/cache available Mem: 7.5Gi 480Mi55Mi 0.0Ki 7.0Gi 6.9Gi Swap: 23Gi 378Mi23Gi Lets see what happens after the next update cycle.
Re: [gentoo-user] Machine hangs up with out of memory
On Friday, 30 April 2021 02:30:51 BST Adam Carter wrote: > On Wed, Apr 28, 2021 at 7:58 PM Kai Peter wrote: > > Hi, > > > > I have an issue with a machine where I'm not able to detect the real > > root cause. It hangs up totally. It seems like it was running out of > > memory - but why? Hopefully somebody can give me some insight. As far I > > can see right now, it hangs up a few hours after an `emerge --update > > --newuse --deep --with-bdeps=y @world`. > > > > The machine is an Intel Atom with 8 GB RAM (physical, max) and 24 GB > > swap (a file). So 32 GB RAM in total. > > Might be worth adding zswap using zstd or lz4 to your config (uses more CPU > for less IO) > https://www.kernel.org/doc/html/latest/vm/zswap.html Zswap will help optimise the swapping of cold pages out of RAM into the compressed zswap cache and eventually push these out to the disk. This won't help with the problem of not having enough RAM to start with for compiling packages with large resource requirements, like e.g. Chromium. With monster packages where more RAM is needed even for a single compilation job, after all cold pages have been swapped out, hot pages will start being swapped out/in. I think at this point the same I/O race condition will ensue as if no zswap were available, plus a compress/decompress CPU load. I guess the point of starting to thrash the on-disk swap trying to free RAM may start sooner, since RAM which would otherwise be available for the single prioritised compilation job is now being used by zswap. So, there would be a sweet spot in using zswap to improve I/O performance, but it could end up becoming a disbenefit on compilation of RAM hungry packages. Please correct my reasoning above if I have misunderstood how zswap works. However, the OP problem here seems to be with a leaky BIND? I found this mentioned upstream - but have not check BGO: https://gitlab.isc.org/isc-projects/bind9/-/issues/446 > If you want to see which processes are using the most memory, run top then > type 'M' to have top sort by memory instead of CPU. You can also type 'm' > to make top show the memory numbers as an ascii bar graph. The man page > explains what VIRT RES SHR mean. signature.asc Description: This is a digitally signed message part.
Re: [gentoo-user] Machine hangs up with out of memory
On Wed, Apr 28, 2021 at 7:58 PM Kai Peter wrote: > Hi, > > I have an issue with a machine where I'm not able to detect the real > root cause. It hangs up totally. It seems like it was running out of > memory - but why? Hopefully somebody can give me some insight. As far I > can see right now, it hangs up a few hours after an `emerge --update > --newuse --deep --with-bdeps=y @world`. > > The machine is an Intel Atom with 8 GB RAM (physical, max) and 24 GB > swap (a file). So 32 GB RAM in total. > Might be worth adding zswap using zstd or lz4 to your config (uses more CPU for less IO) https://www.kernel.org/doc/html/latest/vm/zswap.html If you want to see which processes are using the most memory, run top then type 'M' to have top sort by memory instead of CPU. You can also type 'm' to make top show the memory numbers as an ascii bar graph. The man page explains what VIRT RES SHR mean.
Re: [gentoo-user] Machine hangs up with out of memory
On 2021-04-29 08:59, J.O. Aho wrote: Your named is taking up 7G or memory, are you sure your configuration is correct? Thanks, good point. There were errors in the logs. I will investigate and monitor it. -- //Aho