mongoid / mongoid-grid_fs

A pure Mongoid/Moped implementation of the MongoDB GridFS specification.
Other
83 stars 50 forks source link

The default chunksize is to large #52

Closed eromas closed 8 years ago

eromas commented 9 years ago

Hi! Is there a reason to change the default chunksize? self.defaults.chunkSize = 4 * (mb = 2**20) Sorry for my question, but I can't figure out how to change it. For storing several document types I use carrierwave-mongoid and that depends on mongoid-grid_fs. I need to minimize the consumption of db storage.

rmm5t commented 9 years ago

@eromas I might be wrong, but I don't believe the chunk size won't affect your file amount of db storage. i.e. I don't believe the last chunk takes up more space if it's not filled.

ahoward commented 8 years ago

indeed, chunksize affect only how much i stored per-record - not the total storage. fwiw - the default in this lib is the default in mongo and changing it will do nothing to reduce db storage.