Skip to content
This repository has been archived by the owner on Mar 9, 2019. It is now read-only.

Database size problems #306

Closed
denistoikka opened this issue Feb 17, 2015 · 2 comments
Closed

Database size problems #306

denistoikka opened this issue Feb 17, 2015 · 2 comments

Comments

@denistoikka
Copy link

I found strange behaviour of the database:

  1. Database size is always growing, even if I delete some key/values pairs and then rewrite them with the same content.
    When I make "./bolt pages path/to/db" it returns hundreds thousands of free pages; looks like they are not being reused and their amount is only growing each time I put something to db.

  2. Database is growing by ~1GB each time I make "./bolt get path/to/db bucketName key"

"./bolt stats path/to/db" gives next output:

Aggregate statistics for 2 buckets

Page count statistics
    Number of logical branch pages: 1
    Number of physical branch overflow pages: 0
    Number of logical leaf pages: 4
    Number of physical leaf overflow pages: 24412
Tree statistics
    Number of keys/value pairs: 10
    Number of levels in B+tree: 2
Page size utilization
    Bytes allocated for physical branch pages: 4096
    Bytes actually used for branch data: 84 (2%)
    Bytes allocated for physical leaf pages: 100007936
    Bytes actually used for leaf data: 100000235 (99%)
Bucket statistics
    Total number of buckets: 2
    Total number on inlined buckets: 1 (50%)
    Bytes used for inlined buckets: 16 (0%)

In the meantime, real size of the database is 37GB.

Operation system is OS X Yosemite, Go version 1.3.3

Can you please assist me, maybe I'm doing something wrong?

@denistoikka
Copy link
Author

Looks like fixed here #304

@benbjohnson
Copy link
Member

It looks like a regression got into Bolt for databases larger than 2GB from a few commits before. Let me know if you have any other issues. Thanks for reporting!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants