Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Add a configurable memory cap for mempool #1590

Closed
wants to merge 11 commits into from
Closed

Conversation

congwang
Copy link
Contributor

Currently mempool is unbounded and memory in mempool grows and settles on steady state. This causes stream manager could use a lot of memory in production. We need a mechanism to add a cap there, the memory usage of stmgr is reduced down to 10% and meanwhile performance is almost not affected at all.

Note, I use a global limit for all instances of BaseMemPool (including MemPool), this relies on the C++ type system.

This should resolve #1567

@ajorgensen
Copy link
Contributor

I deployed one of our topologies with this change and I think we're still seeing the stream manager memory usage spike up.

image

Anything I can do to dig into where its coming from?

@congwang congwang closed this Feb 16, 2017
@srkukarni
Copy link
Contributor

Is this pr still valid?

@ajorgensen
Copy link
Contributor

I think it was closed because it turned out to not solve the original issue, im not sure if the commits here can still be used but likely that can.

@congwang
Copy link
Contributor Author

Right, the original back-pressure-related memory issue is addressed by #1785.

About this PR itself, the mempool does not contribute to memory pressure, we will hit the hard limit anyway no matter we have mempool or not, the problem with mempool is that it may hit the soft limit eventually since this memory never shrinks.

@huijunwu huijunwu deleted the cwang/mempool-limit branch August 21, 2018 08:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Increased stream manager memory usage
3 participants