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

platform: limit the maximum size of sysctl cache #294

Closed
wants to merge 1 commit into from

Conversation

bengal
Copy link
Contributor

@bengal bengal commented Feb 5, 2019

When the logging level is DEBUG or TRACE, we keep all the sysctl
values we read in a cache to log how they change. Currently there is
no limit on the size of this cache and it can take a large amount of
memory.

Implement a LRU cache where the oldest entries are deleted to make
space for new ones.

When the logging level is DEBUG or TRACE, we keep all the sysctl
values we read in a cache to log how they change. Currently there is
no limit on the size of this cache and it can take a large amount of
memory.

Implement a LRU cache where the oldest entries are deleted to make
space for new ones.
@thom311
Copy link
Member

thom311 commented Feb 5, 2019

lgtm

@thom311
Copy link
Member

thom311 commented Feb 5, 2019

or maybe reduce the number to 1000 cached entries? Even 10000 is really large.

@bengal
Copy link
Contributor Author

bengal commented Feb 10, 2019

or maybe reduce the number to 1000 cached entries? Even 10000 is really large.

Makes sense, changed.

Merged as 3a0f711.

@bengal bengal closed this Feb 10, 2019
@lkundrak lkundrak deleted the bg/sysctl-lru-cache branch April 12, 2019 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants