Skip to content

Decompression uses too much memory #1239

@jarifibrahim

Description

@jarifibrahim

Badger uses compression to reduce disk space. When the block are decompressed, it takes up too much memory.
https://github.com/dgraph-io/badger/blob/5b4c0a65cdf94a30f63b87c7b1db7931ee6d4f4c/table/table.go#L625-L629

The crux of the problem is that the decompression call allocates new block every time we want to decompress an existing block. An ideal fix here would be to find a way to reuses the blocks of memory.
image

Taken from chat: https://dgraph.slack.com/archives/C13LH03RR/p1583223673220200?thread_ts=1583216894.212400&cid=C13LH03RR

Metadata

Metadata

Assignees

Labels

area/performancePerformance related issues.kind/enhancementSomething could be better.priority/P0Critical issue that requires immediate attention.status/acceptedWe accept to investigate or work on it.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions