LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.
BSD 3-Clause "New" or "Revised" License
36.08k
stars
7.78k
forks
source link
Memory consumption problem #1132
Open
mitr15fan15v opened 1 year ago
I am using LevelDB version SHARED_VERSION_MAJOR = 1 SHARED_VERSION_MINOR = 20 OS
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
What consumes memory, and most importantly why?