2014년 12월 27일 토요일

DB size 20 times larger than source data file?

New to MongoDB. Just installed 2.6.x on MacOS and loaded a 674Mb .csv file into a new database. This result is about 13Gb of of files being allocated which is a huge overhead, particularly when the initial file when compressed is about 33Mb. The data contains about 55K documents each with ~5500 fields (all with same name, the source being rectangular data). I did run a compact command but this apparently just added another 6Gb. Is there any way to get this under control?
best
*P


db.stats()
{
"db" : "gss",
"collections" : 3,
"objects" : 57065,
"avgObjSize" : 131047.24254797162,
"dataSize" : 7478210896,
"storageSize" : 9020518400,
"numExtents" : 24,
"indexes" : 1,
"indexSize" : 1676080,
"fileSize" : 19251855360,
"nsSizeMB" : 16,
"dataFileVersion" : {
"major" : 4,
"minor" : 5
},
"extentFreeList" : {
"num" : 20,
"totalSize" : 7441465328
},
"ok" : 1
}



You can try starting fresh with mongod running with --smallfiles, but better would be if you provide us with output from
db.coll.stats() where "coll" should be replaced with your collection name that you imported into.   Then we can see what's taking up space and why.


댓글 없음:

댓글 쓰기