diskspace - mongoDB is taking too much space on disk -


this question has answer here:

i inserted 1.500.000 documents following body:

{ "_id" : 712613, "cn" : " lorem ipsum dummy text of printing , typesetting industry. lorem ipsum has been industry's standard dummy text ever since 1500s, when unknown printer took galley of type , scrambled make type specimen book. has survived not 5 centuries, leap electronic typesetting, remaining unchanged. popularised in 1960s release of letraset sheets containing lorem ipsum passages, , more desktop publishing software aldus pagemaker including versions of lorem ipsum. ", "d" : 1378396279, "s" : 1, "c" : 1, "tc" : 0, "tl" : 0, "ts" : 0, "ua" : "", "ub" : "", "i" : "", "ip" : "this image", "cr" : "946666,1946914,784176,127189,55197,1014487,665449,1016059,1746099,818935", "tg" : "" } 

as see, i've shortened names reduce document size, it's 820 characters.
1.5 million documents , used disk space 3gb.

why mongodb takes space?

mongodb preallocates data files aggressively in order avoid delays later, when needs new file.

link: why files in data directory larger data in database?


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -