[JAVA-2028] The GridFS chunk size is wrong Created: 05/Nov/15 Updated: 12/Nov/15 Resolved: 06/Nov/15 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | GridFS |
| Affects Version/s: | 3.1.0 |
| Fix Version/s: | 3.1.1, 3.2.0 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Rick Rupp | Assignee: | Ross Lawley |
| Resolution: | Done | Votes: | 0 |
| Labels: | driver | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Linux |
||
| Issue Links: |
|
||||
| Description |
|
The default chunk size in GridFSBucketImpl is 255 bytes not 255k bytes as documented in the GridFS manual (https://docs.mongodb.org/manual/core/gridfs/). This causes a severe performance penalty when uploading medium sized files. As an example uploading a ~32MB file using 255 byte chunks can take +30 minutes while using 255k bytes blocks takes several seconds. |
| Comments |
| Comment by Jeffrey Yemin [ 12/Nov/15 ] | |
|
Closing for 3.1.1 release. | |
| Comment by Rick Rupp [ 06/Nov/15 ] | |
|
Thanks Ross. It's as if you were looking at my code. | |
| Comment by Githook User [ 06/Nov/15 ] | |
|
Author: {u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}Message: GridFS fix default chunk size
| |
| Comment by Githook User [ 06/Nov/15 ] | |
|
Author: {u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}Message: GridFS fix default chunk size
| |
| Comment by Ross Lawley [ 06/Nov/15 ] | |
|
Hi rerupp, Thanks for the ticket - that is a bug and an oversight. Whilst a fix is pending, please use the following code to set the correct chunkSize:
|