nspcc-dev / nspcc-dev/neofs-node
Track used for cache memory
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 38
- Forks
- 51
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 38
Description
Is your feature request related to a problem? Please describe.
We often do some caching and often use "10/64/100mb cache for <something> at max is not bad" words and it is hard to understand now how many "at max" we already can have cached. Is it 1gb of memory? 100mb?
Describe the solution you'd like
Add a prometheus metric that describes memory usage (even approximate is better than nothing) by our caches. It allows understanding how much free mem we can have if set https://github.com/nspcc-dev/neofs-node/blob/22259ce755199d6e87331a3b58cc14449a36f69e/config/example/node.yaml#L75 to zero value.
Describe alternatives you've considered
Do nothing. No real requirement for making it now in fact.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading config/example/node.yaml around line 75 to understand the cache setting and how a zero value affects cache capacity. Trace the cache implementations and existing Prometheus metrics, then define the metric's scope and verify that it reports approximate memory usage for the caches.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, prometheus
- Domain
- backend, observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100