[SERVER-1493] --smallfiles file size allocation ballons Created: 26/Jul/10  Updated: 12/Jul/16  Resolved: 09/Aug/10

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 1.4.4
Fix Version/s: 1.7.0

Type: Bug Priority: Major - P3
Reporter: Justin Smestad Assignee: Aaron Staple
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux, XFS


Operating System: ALL
Participants:

 Description   

Running a server with smallfiles turned on will cause mongod to create a large amount of additional files.

Example: a dataset with 18GB of files will have 47GB of files when --smallfiles is turned on.

steps to reproduce:
1) start server with --smallfiles
2) insert 3GB of data
3) db.stats()



 Comments   
Comment by auto [ 15/Sep/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-1493 extents shouldn't be bigger than files when smallfiles
http://github.com/mongodb/mongo/commit/52081d1b814d948d43e42b56d3bfa14df0014db3

Comment by auto [ 09/Aug/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-1493 extents shouldn't be bigger than files when smallfiles
http://github.com/mongodb/mongo/commit/a1f8c3698397b9fa395578e901250eea7b312060

Comment by Mathias Stearn [ 26/Jul/10 ]

I have verified that this occurs but I don't see the cause of the issue. Some numbers:

> db.foo.stats()
{
"ns" : "test.foo",
"count" : 3000,
"size" : 3145929664,
"avgObjSize" : 1048643.2213333333,
"storageSize" : 3668664816,
"numExtents" : 21,
"nindexes" : 1,
"lastExtentSize" : 536600560,
"paddingFactor" : 1,
"flags" : 1,
"totalIndexSize" : 131072,
"indexSizes" :

{ "_id_" : 131072 }

,
"ok" : 1
}

> db.stats()
{
"collections" : 3,
"objects" : 3004,
"avgObjSize" : 1047246.9414114514,
"dataSize" : 3145929812,
"storageSize" : 3668669936,
"numExtents" : 23,
"indexes" : 1,
"indexSize" : 131072,
"fileSize" : 9105833984,
"ok" : 1
}

$ ls -l /mnt/external/data/test.10
rw------ 1 mstearn mstearn 536608768 Jul 26 19:17 /mnt/external/data/test.10

Note the filesize of 9G with a storageSize of 3.6G.

Generated at Thu Feb 08 02:57:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.