google / google/leveldb

Memory consumption problem

Open
#1,132 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
39.4k
Forks
8.2k
PR merge metrics
No merged PRs in 30d

Description

I am using LevelDB version
SHARED_VERSION_MAJOR = 1
SHARED_VERSION_MINOR = 20
OS
![Screenshot from 2023-07-01 00-24-19](https://github.com/google/leveldb/assets/118141598/0ec317b3-358a-4e0e-a85b-1501ec634f32)
Database ~ 20 000 000 Pair
![Screenshot from 2023-07-01 00-28-30](https://github.com/google/leveldb/assets/118141598/a91a7037-8fcf-40c7-815d-d52e9a921a8a)

Memory consumption before reading from the database
![Screenshot from 2023-07-01 00-43-14](https://github.com/google/leveldb/assets/118141598/4951d4e4-5b60-41b0-9732-f3d617b3b5b4)

After first reading from the database
![Screenshot from 2023-07-01 00-45-53](https://github.com/google/leveldb/assets/118141598/1680973d-0b80-4498-b196-71a31323be54)

After second reading from the database
![Screenshot from 2023-07-01 00-48-50](https://github.com/google/leveldb/assets/118141598/b3eee220-cb3b-47d9-9b70-3226fa93ab0a)

After the third read from the database
![Screenshot from 2023-07-01 00-52-17](https://github.com/google/leveldb/assets/118141598/9c0afa99-45b7-40f6-b09e-5e88374207d9)

So you can continue until all the memory runs out.
At first I thought it was just a memory leak, but
![Screenshot from 2023-07-01 01-37-41](https://github.com/google/leveldb/assets/118141598/ca3d01a5-d7e0-45e0-b494-e270a79ff230)

No leaks
![Screenshot from 2023-07-01 01-45-11](https://github.com/google/leveldb/assets/118141598/2a39f046-c2ae-48c0-9fac-84e3e0fae2bd)
![Screenshot from 2023-07-01 01-45-32](https://github.com/google/leveldb/assets/118141598/4f75ba08-34a5-440d-97e3-0fb1437cba84)
What consumes memory, and most importantly why?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.