The _chunksize and the buffer parameter gets created using the default value frm GridFS which is 255k.
Though we can reconfigure the chunksize later using setChunkSize, however during creation 255k chunk of memory in Java program gets reserved which feels a little inefficient use of memory if we are going to resize chunksize later.
Ideally, I think we should be able to inject the chunksize during creation:
https://github.com/mongodb/mongo-java-driver/blob/master/src/main/com/mongodb/gridfs/GridFS.java#L381
as a parameter which can default to DEFAULT_CHUNKSIZE.