Skip to content

Conversation

@davecgh
Copy link
Member

@davecgh davecgh commented Mar 20, 2025

The current soft upper memory limit was calculated based on the main network and prior to the addition of the mixing pool.

As can be expected, the mixing pool requires extra memory which implies the soft memory limit should be raised to account for it.

This hasn't been an issue on the main network because the limit was intentionally set to include an additional overhead buffer to help future proof it which has been large enough to handle the additional memory requirements.

However, the test network also requires additional memory due to having a significantly longer chain. The combination of those two factors comes very close to exhausting that additional overhead buffer and therefore can lead to excessive CPU utilization on the test network as the GC no longer has much working room to efficiently perform its job.

In order to address the aforementioned, this bumps the soft upper memory limit from 1.5 GiB to 1.8 GiB which accounts for both sources of increased memory usage along with a good overhead buffer on par with the original value prior to the additional memory requirements.

Note that the overall minimum recommended memory in the README does not need to be increased since the new limit is still 10% under the recommendation.

@davecgh davecgh added this to the 2.1.0 milestone Mar 20, 2025
The current soft upper memory limit was calculated based on the main
network and prior to the addition of the mixing pool.

As can be expected, the mixing pool requires extra memory which implies
the soft memory limit should be raised to account for it.

This hasn't been an issue on the main network because the limit was
intentionally set to include an additional overhead buffer to help
future proof it which has been large enough to handle the additional
memory requirements.

However, the test network also requires additional memory due to having
a significantly longer chain.  The combination of those two factors
comes very close to exhausting that additional overhead buffer and
therefore can lead to excessive CPU utilization on the test network as
the GC no longer has much working room to efficiently perform its job.

In order to address the aforementioned, this bumps the soft upper memory
limit from 1.5 GiB to 1.8 GiB which accounts for both sources of
increased memory usage along with a good overhead buffer on par with the
original value prior to the additional memory requirements.

Note that the overall minimum recommended memory in the README does not
need to be increased since the new limit is still 10% under the
recommendation.
Copy link
Member

@jrick jrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

untested but looks good

@davecgh davecgh merged commit 62a4051 into decred:master Mar 21, 2025
2 checks passed
@davecgh davecgh deleted the main_bump_runtime_memlimit branch March 21, 2025 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants