Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

periodic memory release results in increased latency #408

Closed
foreverneverer opened this issue Oct 24, 2019 · 1 comment
Closed

periodic memory release results in increased latency #408

foreverneverer opened this issue Oct 24, 2019 · 1 comment
Labels
type/bug This issue reports a bug.

Comments

@foreverneverer
Copy link
Contributor

Pegasus version

pegasus-server-1.11.6-9f4e5ae-glibc2.12-release

Problem

periodic memory release results in increased latency

Reason

When build and run rdsn,the macro ENABLE_GPERF and the variable mem_release_enableddefault value is ON:

#ifdef DSN_ENABLE_GPERF
    if (_options.mem_release_enabled) {
        _mem_release_timer_task =
            tasking::enqueue_timer(LPC_MEM_RELEASE,
                                   &_tracker,
                                   []() {
                                       ddebug("Memory release has started...");
                                       ::MallocExtension::instance()->ReleaseFreeMemory();
                                       ddebug("Memory release has ended...");
                                   },
                                   std::chrono::milliseconds(_options.mem_release_interval_ms),
                                   0,
                                   std::chrono::milliseconds(_options.mem_release_interval_ms));
    }
#endif

but the strategies for freeing memory is unreasonable. for example, this time frees too much memory (5GB) at once and results in the significant latency.

Solution

Now the config.ini is not set the value about "release memory", we can only add the section and set the mem_release_enabled value is false.

@neverchanje
Copy link
Contributor

This problem is resolved in v1.12.1. Refer to this PR: XiaoMi/rdsn#343.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug This issue reports a bug.
Projects
None yet
Development

No branches or pull requests

2 participants