wbolster / plyvel

Plyvel, a fast and feature-rich Python interface to LevelDB
https://plyvel.readthedocs.io/
Other
529 stars 75 forks source link

max_file_size not working? #87

Closed rongou closed 5 years ago

rongou commented 5 years ago

I'm trying to load a large db (~170GB, 24 million rows, each row is about 7KB) with these options:

db = plyvel.DB(
    my_dir,
    create_if_missing=True,
    error_if_exists=True,
    write_buffer_size=1 << 30,
    max_open_files=50000,
    lru_cache_size=2 << 30,
    block_size=4 << 20,
    max_file_size=1 << 30)

but after a few write batches, I got tons of small files less than 1MB. If I leave out the max_file_size option, most files are around 4MB. Is this expected behavior? Seems to be similar to the issue reported in https://github.com/google/leveldb/issues/438.

wbolster commented 5 years ago

i don't know. plyvel does not do anything with that value except passing it along to leveldb.

but as you suggest yourself already, this is likely not a plyvel (python bindings) issue, so i'm not sure why you opened this issue here. ;)