[SERVER-9506] initial or new document size flag to avoid manual document padding Created: 29/Apr/13 Updated: 01/May/13 Resolved: 01/May/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor - P4 |
| Reporter: | MediaMath Mongo | Assignee: | Stennie Steneker (Inactive) |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
usePowerOf2Sizes is great but it still requires us to do manual document padding for new documents. It should not be complicated to implemented a flag to does the padding for you. We have hacked something up called initialdocsize in our internal build of mongo but would like to see this feature implemented by 10gen. Padding factor is a good idea but not as practical as the combination of initialdocsize and userpowerof2sizes. |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 01/May/13 ] | ||||||||||||||||||||||
|
See | ||||||||||||||||||||||
| Comment by MediaMath Mongo [ 01/May/13 ] | ||||||||||||||||||||||
Basically, we just want 10gen to do the padding instead of padding manually. "docInitialSize" : 256, So this means that when document is first inserted, upserted or created, mongod will allocate 256 bytes on disk even if there is only _id in the document. Users should be able to change the values at anytime as this flag only affects newly created documents. We actually have our own patched mongo in production that does this and would like to see 10gen implements this officially.
| ||||||||||||||||||||||
| Comment by Stennie Steneker (Inactive) [ 01/May/13 ] | ||||||||||||||||||||||
|
The usePowerOf2Sizes option is currently implemented as an alternative to the paddingFactor (see 2.2.4 code reference), and rounds up the document allocation to the next nearest power of 2. Depending on the size of your documents and expected growth, this can already be a significant extra allocation for document growth. In MongoDB 2.4 there was a further refinement to quantize the allocations (see Where would you suggest an initialdocsize value would be set? Do you have a proposed patch based on your internal build of MongoDB? Given documents in a collection normally vary in size, it seems like this feature request may want to either be an option to apply the padding factor before the usePowerOf2Sizes calculation or an option to set a minimumDocumentSize. Cheers, |