dgraph-io / dgraph-io/badger

[QUESTION]: Urgent Technical Inquiry: CPU Usage Spike with Badger v4.4.0

Open
#2,129 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/question Stale
Dominant language
Go
Stars
15.8k
Forks
1.3k
Avg merge
2m
Merged PRs (30d)
1

Description

Question.

I am currently using the Badger database library version v4.4.0 for a project developed in Go, and I have encountered a significant issue regarding CPU usage that urgently requires your assistance and expertise.

In our application, all stored data is set to expire after 45 minutes. However, we have observed that every 30 minutes, the CPU usage spikes to more than double its normal rate. This phenomenon occurs regularly and each spike severely impacts the performance of our system.

We suspect that this issue may be related to how Badger handles expired data, but we have yet to pinpoint the exact cause or find a solution. We have attempted to consult the available documentation and community discussions, but have not found similar cases or clear guidance on how to resolve this issue.

Given this, we are in dire need of your professional advice and assistance to diagnose and address this problem. If possible, we would appreciate insights on:

Could Badger's mechanism for handling expired data potentially cause such spikes in CPU usage?
Are there recommended configurations or optimization strategies that could help mitigate or prevent these CPU usage spikes?
Have other users reported similar issues, and how were they resolved?
We look forward to your prompt response and hope to resolve this technical challenge as soon as possible. Thank you for your time and assistance!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file, test, or entry point is named. Begin by reproducing the 30-minute CPU spike with Badger v4.4.0 while profiling expiration-related work and reviewing the documented expiry configuration; done means identifying whether expiry processing causes the spike and documenting a supported mitigation.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
databases, performance
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.