laanwj
commented at 8:16 AM on March 30, 2017:
member
glibc-specific: On 32-bit systems set the number of arenas to 1. By default, since glibc 2.10, the C library will create up to two heap arenas per core. This is known to cause excessive virtual address space usage in our usage. Work around it by setting the maximum number of arenas to 1.
I documented this before in Reducing bitcoind memory usage but with the reported OOM issues in 0.14 it seems more pressing to do it by default when there is low virtual memory space (e.g. on 32 bit).
util: Work around (virtual) memory exhaustion on 32-bit w/ glibc
glibc-specific: On 32-bit systems set the number of arenas to 1. By
default, since glibc 2.10, the C library will create up to two heap
arenas per core. This is known to cause excessive virtual address space
usage in our usage. Work around it by setting the maximum number of
arenas to 1.
625488ace5
laanwj added the label Needs backport on Mar 30, 2017
laanwj added the label Utils and libraries on Mar 30, 2017
laanwj added this to the milestone 0.14.1 on Mar 30, 2017
gmaxwell approved
gmaxwell
commented at 4:29 PM on March 30, 2017:
contributor
utACK.
JeremyRubin
commented at 5:29 PM on March 30, 2017:
contributor
utACK.
laanwj added this to the "For backport" column in a project
theuni
commented at 5:06 AM on March 31, 2017:
member
I'm not familiar with the intricacies here, so I'll defer judgement on the root issue.
The implementation suggests that it's meant to apply to glibc only, but there's no obvious check for that. Is M_ARENA_MAX itself glibc specific, or do we need some macro to check for it?
laanwj
commented at 5:43 AM on March 31, 2017:
member
I'm not familiar with the intricacies here, so I'll defer judgement on the root issue.
The root issue is that freed object stay around for a while for reuse, so having 8 heaps means that they can potentially stick around 8 times. This is extremely bad considering e.g. how large the consecutive objects are that leveldb allocates.
The implementation suggests that it's meant to apply to glibc only, but there's no obvious check for that. Is M_ARENA_MAX itself glibc specific, or do we need some macro to check for it?
As always, feel free to suggest a better way to do the autoconf stuff. Yes, M_ARENA_MAX is specific to glibc (or anything deriving from it).
theuni
commented at 6:46 AM on March 31, 2017:
member
I didn't mean to imply that anything was incorrect, just wanted to clarify the assumptions. Thanks for explaining. Code looks good. utACK625488ace5c41ccba1b68323a72588000782f820
laanwj merged this on Mar 31, 2017
laanwj closed this on Mar 31, 2017
laanwj referenced this in commit ba12b3a844 on Mar 31, 2017
laanwj referenced this in commit e4c9a90fe9 on Mar 31, 2017
laanwj removed the label Needs backport on Mar 31, 2017
laanwj removed this from the "For backport" column in a project
codablock referenced this in commit 42d3060568 on Jan 26, 2018
lateminer referenced this in commit bab0df1b09 on Jan 5, 2019
andvgal referenced this in commit ce84e85fa6 on Jan 6, 2019
CryptoCentric referenced this in commit 4533c1a9f0 on Feb 27, 2019
PastaPastaPasta referenced this in commit 1e2de487dc on Mar 15, 2019
PastaPastaPasta referenced this in commit d86bb023fc on May 20, 2019
PastaPastaPasta referenced this in commit de066ac3db on May 20, 2019
PastaPastaPasta referenced this in commit 5dc3f503ec on May 21, 2019
PastaPastaPasta referenced this in commit 8e9c2eb2f3 on May 22, 2019
PastaPastaPasta referenced this in commit c9f0568483 on May 22, 2019
PastaPastaPasta referenced this in commit 2752cbde53 on May 22, 2019
PastaPastaPasta referenced this in commit 2f256f5080 on May 22, 2019
PastaPastaPasta referenced this in commit c81d1d2aa2 on May 23, 2019
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me