[DOCS-4976] avgObjSize documentation mistake (in one place) Created: 11/Mar/15  Updated: 30/Oct/23  Resolved: 01/Apr/16

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Bug Priority: Minor - P4
Reporter: William Cross Assignee: Steve Renaker (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File issueWithObjSize.js     File issueWithObjSize2.js    
Participants:
Days since reply: 7 years, 45 weeks, 5 days ago

 Description   

The collStats command which is also used by db.collection.stats currently claims that avgObjSize is the average Object size; in fact, it's the object size, plus any padding.

Please see the attached files, which display avgObjSize for power of 2 sizes allocation, as well as no padding allocation, for two collections with differently-sized documents in them (all of which are identical in size within a given collection).



 Comments   
Comment by Githook User [ 01/Apr/16 ]

Author:

{u'username': u'steveren', u'name': u'Steve Renaker', u'email': u'steve.renaker@mongodb.com'}

Message: DOCS-4976: added note about padding in avgObjSize

Signed-off-by: kay <kay.kim@10gen.com>
Branch: master
https://github.com/mongodb/docs/commit/810426a78d50cbf01b8fa27842c6fe7d2168908f

Comment by William Cross [ 18/May/15 ]

We might also want to note that this is somewhat approximate; using power of two sizes allocation, I never quite see the size as being 2^n, but when I look at the data files, it's actually 2^n from the start of one document to the start of the next.

Generated at Thu Feb 08 07:49:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.