Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

background space reclaim isn't working after DROP DATABASE #60

Closed
hermanlee opened this issue Sep 28, 2015 · 2 comments
Closed

background space reclaim isn't working after DROP DATABASE #60

hermanlee opened this issue Sep 28, 2015 · 2 comments
Assignees
Labels

Comments

@hermanlee
Copy link
Contributor

Issue by mdcallag
Tuesday Sep 15, 2015 at 14:55 GMT
Originally opened as MySQLOnRocksDB#111


My test loop ran 24 iterations and at the end of each iteration the database size is listed below. Each iteration is DROP DATABASE, create linkbench database and tables, linkbench load, linkbench run for 30 minutes. I used requesters=20 and maxid1=10M in the linkbench configuration. The database wasn't empty prior to the first iteration, so the size after one iteration was 46G and not something smaller.

46G /ssd1/scratch/data.mdcallag/data
51G /ssd1/scratch/data.mdcallag/data
55G /ssd1/scratch/data.mdcallag/data
59G /ssd1/scratch/data.mdcallag/data
63G /ssd1/scratch/data.mdcallag/data
68G /ssd1/scratch/data.mdcallag/data
72G /ssd1/scratch/data.mdcallag/data
76G /ssd1/scratch/data.mdcallag/data
81G /ssd1/scratch/data.mdcallag/data
85G /ssd1/scratch/data.mdcallag/data
89G /ssd1/scratch/data.mdcallag/data
93G /ssd1/scratch/data.mdcallag/data
97G /ssd1/scratch/data.mdcallag/data
102G /ssd1/scratch/data.mdcallag/data
106G /ssd1/scratch/data.mdcallag/data
110G /ssd1/scratch/data.mdcallag/data
114G /ssd1/scratch/data.mdcallag/data
119G /ssd1/scratch/data.mdcallag/data
123G /ssd1/scratch/data.mdcallag/data
126G /ssd1/scratch/data.mdcallag/data
130G /ssd1/scratch/data.mdcallag/data
134G /ssd1/scratch/data.mdcallag/data
138G /ssd1/scratch/data.mdcallag/data
142G /ssd1/scratch/data.mdcallag/data

@hermanlee
Copy link
Contributor Author

Comment by yoshinorim
Tuesday Sep 15, 2015 at 17:41 GMT


Here is my understanding about what is going on:

  • Created tables (and assigning index_ids in ascending order) and filled data. LinkBench created 4 index ids -- 256, 257, 258, 259.
  • Ran DROP DATABASE. They dropped all tables within the database. Index ids 256-259 were not immediately compacted. They were supposed to be compacted, when associated sst files were selected as compaction targets.
  • Created tables and filled data again. Created 4 index ids -- 260, 261, 262, 263.
  • Ran DROP DATABASE. They dropped all tables within the database. Index ids 260-263 were not immediately compacted. They were supposed to be compacted, when associated sst files were selected as compaction targets.
    ....

Dropped index ids are never reused by existing/future tables. This means, sst files, where dropped index ids are stored, are very unlikely to be selected as compaction targets.

@yoshinorim
Copy link
Contributor

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

No branches or pull requests

2 participants