AWS Thinkbox Discussion Forums

Mongo Imploded

Or move to 64 bit, because journaling is on by default on 64 bit systems. :slight_smile:

So how is my 5 job repository using 2GB and your 10,000 job repository using 500MB?! Were you able to open that mongo archive?

I think it’s error messages. I just logged another 50 errors and it added another 70 MB to our repo.

That’s so strange. I have a local repository installed that I use for testing my code. It is 64 bit, but it was installed with the repository installer, so there are no additional command line arguments to tweak settings. It has 95 jobs averaging around 75 frames per task. There are about 200 errors total. My database has yet to pre-allocate the 512 MB file.

I should note that we only store metadata for the errors and logs (ie: the date they were created, which slave created them, etc). The actual log itself is bzipped up and stored in the repository on disk.

As a test, I had my local install generate 50 additional errors, and disk space used by the database didn’t go up a single byte





Wait a second, what’s currently growing in disk space, the mongo database or the repository file system?

Mongo.

Ok. I generated 500 error messages and it increased file size by about 300MBs.

[code]Microsoft Windows [Version 6.0.6002]
Copyright © 2006 Microsoft Corporation. All rights reserved.

C:\mongo\application\bin>mongo localhost/deadlinedb
MongoDB shell version: 2.2.0
connecting to: localhost/deadlinedb

db.stats()
{
“db” : “deadlinedb”,
“collections” : 18,
“objects” : 3049,
“avgObjSize” : 496.04591669399804,
“dataSize” : 1512444,
“storageSize” : 16084992,
“numExtents” : 36,
“indexes” : 28,
“indexSize” : 441504,
“fileSize” : 117440512,
“nsSizeMB” : 16,
“ok” : 1
}
db.stats()
{
“db” : “deadlinedb”,
“collections” : 18,
“objects” : 3050,
“avgObjSize” : 529.0609836065573,
“dataSize” : 1613636,
“storageSize” : 26308608,
“numExtents” : 37,
“indexes” : 28,
“indexSize” : 441504,
“fileSize” : 117440512,
“nsSizeMB” : 16,
“ok” : 1
}
db.stats()
{
“db” : “deadlinedb”,
“collections” : 18,
“objects” : 3050,
“avgObjSize” : 561.0622950819672,
“dataSize” : 1711240,
“storageSize” : 26308608,
“numExtents” : 37,
“indexes” : 28,
“indexSize” : 441504,
“fileSize” : 117440512,
“nsSizeMB” : 16,
“ok” : 1
}
db.stats()
{
“db” : “deadlinedb”,
“collections” : 18,
“objects” : 3050,
“avgObjSize” : 572.0786885245901,
“dataSize” : 1744840,
“storageSize” : 26308608,
“numExtents” : 37,
“indexes” : 28,
“indexSize” : 441504,
“fileSize” : 117440512,
“nsSizeMB” : 16,
“ok” : 1
}
db.stats()
{
“db” : “deadlinedb”,
“collections” : 18,
“objects” : 3050,
“avgObjSize” : 581.752131147541,
“dataSize” : 1774344,
“storageSize” : 26308608,
“numExtents” : 37,
“indexes” : 28,
“indexSize” : 441504,
“fileSize” : 117440512,
“nsSizeMB” : 16,
“ok” : 1
}
db.stats()
{
“db” : “deadlinedb”,
“collections” : 18,
“objects” : 3050,
“avgObjSize” : 610.655737704918,
“dataSize” : 1862500,
“storageSize” : 40046592,
“numExtents” : 39,
“indexes” : 28,
“indexSize” : 441504,
“fileSize” : 117440512,
“nsSizeMB” : 16,
“ok” : 1
}
db.stats()
{
“db” : “deadlinedb”,
“collections” : 18,
“objects” : 3050,
“avgObjSize” : 646.5639344262295,
“dataSize” : 1972020,
“storageSize” : 40046592,
“numExtents” : 39,
“indexes” : 28,
“indexSize” : 441504,
“fileSize” : 117440512,
“nsSizeMB” : 16,
“ok” : 1
}
db.stats()
{
“db” : “deadlinedb”,
“collections” : 18,
“objects” : 3050,
“avgObjSize” : 667.7468852459017,
“dataSize” : 2036628,
“storageSize” : 40046592,
“numExtents” : 39,
“indexes” : 28,
“indexSize” : 441504,
“fileSize” : 117440512,
“nsSizeMB” : 16,
“ok” : 1
}
db.stats()
{
“db” : “deadlinedb”,
“collections” : 18,
“objects” : 3069,
“avgObjSize” : 752.1850765721733,
“dataSize” : 2308456,
“storageSize” : 51515392,
“numExtents” : 40,
“indexes” : 28,
“indexSize” : 441504,
“fileSize” : 251658240,
“nsSizeMB” : 16,
“ok” : 1
}
db.stats()
{
“db” : “deadlinedb”,
“collections” : 18,
“objects” : 3069,
“avgObjSize” : 772.753339850114,
“dataSize” : 2371580,
“storageSize” : 66998272,
“numExtents” : 41,
“indexes” : 28,
“indexSize” : 441504,
“fileSize” : 251658240,
“nsSizeMB” : 16,
“ok” : 1
}
[/code]

Here is the detailed stats for comparison to the previous I posted on Friday. Same repo.

[code] Microsoft Windows [Version 6.0.6002]
Copyright © 2006 Microsoft Corporation. All rights reserved.

C:\Users\sfsadmin>cd C:\mongo\application\bin
C:\mongo\application\bin>mongo localhost/deadlinedb
MongoDB shell version: 2.2.0
connecting to: localhost/deadlinedb

db.getCollectionNames().forEach(function© {s = db[c].validate(); printjson(s)})
{
“ns” : “deadlinedb.DeadlineSettings”,
“firstExtent” : “0:f4000 ns:deadlinedb.DeadlineSettings”,
“lastExtent” : “0:8bd000 ns:deadlinedb.DeadlineSettings”,
“extentCount” : 2,
“datasize” : 22808,
“nrecords” : 6,
“lastExtentSize” : 278528,
“padding” : 1.0430000000000037,
“firstExtentDetails” : {
“loc” : “0:f4000”,
“xnext” : “0:8bd000”,
“xprev” : “null”,
“nsdiag” : “deadlinedb.DeadlineSettings”,
“size” : 69632,
“firstRecord” : “0:f5100”,
“lastRecord” : “0:ff3ac”
},
“deletedCount” : 59,
“deletedSize” : 324904,
“nIndexes” : 1,
“keysPerIndex” : {
“deadlinedb.DeadlineSettings.$id” : 6
},
“valid” : true,
“errors” : [ ],
“warning” : “Some checks omitted for speed. use {full:true} option to do more thorough scan.”,
“ok” : 1
}
{
“ns” : “deadlinedb.DeletedDocuments”,
“firstExtent” : “0:8c000 ns:deadlinedb.DeletedDocuments”,
“lastExtent” : “0:8c000 ns:deadlinedb.DeletedDocuments”,
“extentCount” : 1,
“datasize” : 1512,
“nrecords” : 12,
“lastExtentSize” : 8192,
“padding” : 1,
“firstExtentDetails” : {
“loc” : “0:8c000”,
“xnext” : “null”,
“xprev” : “null”,
“nsdiag” : “deadlinedb.DeletedDocuments”,
“size” : 8192,
“firstRecord” : “0:8c0b0”,
“lastRecord” : “0:8c6c8”
},
“deletedCount” : 1,
“deletedSize” : 6312,
“nIndexes” : 4,
“keysPerIndex” : {
“deadlinedb.DeletedDocuments.$id” : 12,
“deadlinedb.DeletedDocuments.$DeletedTime_1” : 12,
“deadlinedb.DeletedDocuments.$DocID_1” : 12,
“deadlinedb.DeletedDocuments.$OrigCollection_1” : 12
},
“valid” : true,
“errors” : [ ],
“warning” : “Some checks omitted for speed. use {full:true} option to do more thorough scan.”,
“ok” : 1
}
{
“ns” : “deadlinedb.JobReports”,
“firstExtent” : “0:17a000 ns:deadlinedb.JobReports”,
“lastExtent” : “2:af2000 ns:deadlinedb.JobReports”,
“extentCount” : 8,
“datasize” : 817104,
“nrecords” : 4,
“lastExtentSize” : 15482880,
“padding” : 1.00300000000004,
“firstExtentDetails” : {
“loc” : “0:17a000”,
“xnext” : “0:196000”,
“xprev” : “null”,
“nsdiag” : “deadlinedb.JobReports”,
“size” : 20480,
“firstRecord” : “null”,
“lastRecord” : “null”
},
“deletedCount” : 172,
“deletedSize” : 43004528,
“nIndexes” : 1,
“keysPerIndex” : {
“deadlinedb.JobReports.$id” : 4
},
“valid” : true,
“errors” : [ ],
“warning” : “Some checks omitted for speed. use {full:true} option to do more thorough scan.”,
“ok” : 1
}
{
“ns” : “deadlinedb.JobStatistics”,
“firstExtent” : “0:8a3000 ns:deadlinedb.JobStatistics”,
“lastExtent” : “0:8a3000 ns:deadlinedb.JobStatistics”,
“extentCount” : 1,
“datasize” : 3380,
“nrecords” : 3,
“lastExtentSize” : 20480,
“padding” : 1,
“firstExtentDetails” : {
“loc” : “0:8a3000”,
“xnext” : “null”,
“xprev” : “null”,
“nsdiag” : “deadlinedb.JobStatistics”,
“size” : 20480,
“firstRecord” : “0:8a30b0”,
“lastRecord” : “0:8a39bc”
},
“deletedCount” : 1,
“deletedSize” : 16876,
“nIndexes” : 1,
“keysPerIndex” : {
“deadlinedb.JobStatistics.$id” : 3
},
“valid” : true,
“errors” : [ ],
“warning” : “Some checks omitted for speed. use {full:true} option to do more thorough scan.”,
“ok” : 1
}
{
“ns” : “deadlinedb.Jobs”,
“firstExtent” : “0:2c000 ns:deadlinedb.Jobs”,
“lastExtent” : “0:10e000 ns:deadlinedb.Jobs”,
“extentCount” : 2,
“datasize” : 63952,
“nrecords” : 4,
“lastExtentSize” : 245760,
“padding” : 1.0000000000000027,
“firstExtentDetails” : {
“loc” : “0:2c000”,
“xnext” : “0:10e000”,
“xprev” : “null”,
“nsdiag” : “deadlinedb.Jobs”,
“size” : 8192,
“firstRecord” : “null”,
“lastRecord” : “null”
},
“deletedCount” : 10,
“deletedSize” : 189584,
“nIndexes” : 4,
“keysPerIndex” : {
“deadlinedb.Jobs.$id” : 4,
“deadlinedb.Jobs.$LastWriteTime_1” : 4,
“deadlinedb.Jobs.$Props.Grp_1” : 4,
“deadlinedb.Jobs.$Props.Pool_1” : 4
},
“valid” : true,
“errors” : [ ],
“warning” : “Some checks omitted for speed. use {full:true} option to do more thorough scan.”,
“ok” : 1
}
{
“ns” : “deadlinedb.LimitGroups”,
“firstExtent” : “0:78000 ns:deadlinedb.LimitGroups”,
“lastExtent” : “0:78000 ns:deadlinedb.LimitGroups”,
“extentCount” : 1,
“datasize” : 1468,
“nrecords” : 4,
“lastExtentSize” : 8192,
“padding” : 1.0000000000000022,
“firstExtentDetails” : {
“loc” : “0:78000”,
“xnext” : “null”,
“xprev” : “null”,
“nsdiag” : “deadlinedb.LimitGroups”,
“size” : 8192,
“firstRecord” : “0:780b0”,
“lastRecord” : “0:79bfc”
},
“deletedCount” : 17,
“deletedSize” : 6484,
“nIndexes” : 2,
“keysPerIndex” : {
“deadlinedb.LimitGroups.$id” : 4,
“deadlinedb.LimitGroups.$LastWriteTime_1” : 4
},
“valid” : true,
“errors” : [ ],
“warning” : “Some checks omitted for speed. use {full:true} option to do more thorough scan.”,
“ok” : 1
}
{
“ns” : “deadlinedb.PermissionGroups”,
“firstExtent” : “0:496000 ns:deadlinedb.PermissionGroups”,
“lastExtent” : “0:496000 ns:deadlinedb.PermissionGroups”,
“extentCount” : 1,
“datasize” : 8028,
“nrecords” : 1,
“lastExtentSize” : 131072,
“padding” : 1,
“firstExtentDetails” : {
“loc” : “0:496000”,
“xnext” : “null”,
“xprev” : “null”,
“nsdiag” : “deadlinedb.PermissionGroups”,
“size” : 131072,
“firstRecord” : “0:4960b0”,
“lastRecord” : “0:4960b0”
},
“deletedCount” : 1,
“deletedSize” : 122852,
“nIndexes” : 1,
“keysPerIndex” : {
“deadlinedb.PermissionGroups.$id” : 1
},
“valid” : true,
“errors” : [ ],
“warning” : “Some checks omitted for speed. use {full:true} option to do more thorough scan.”,
“ok” : 1
}
{
“ns” : “deadlinedb.PulseInfo”,
“firstExtent” : “0:1b000 ns:deadlinedb.PulseInfo”,
“lastExtent” : “0:1b000 ns:deadlinedb.PulseInfo”,
“extentCount” : 1,
“datasize” : 508,
“nrecords” : 1,
“lastExtentSize” : 32768,
“padding” : 1.0000000000000004,
“firstExtentDetails” : {
“loc” : “0:1b000”,
“xnext” : “null”,
“xprev” : “null”,
“nsdiag” : “deadlinedb.PulseInfo”,
“size” : 32768,
“firstRecord” : “0:1b2a4”,
“lastRecord” : “0:1b2a4”
},
“deletedCount” : 2,
“deletedSize” : 32068,
“nIndexes” : 2,
“keysPerIndex” : {
“deadlinedb.PulseInfo.$id” : 1,
“deadlinedb.PulseInfo.$LastWriteTime_1” : 1
},
“valid” : true,
“errors” : [ ],
“warning” : “Some checks omitted for speed. use {full:true} option to do more thorough scan.”,
“ok” : 1
}
{
“ns” : “deadlinedb.RepositoryStatistics”,
“firstExtent” : “0:db000 ns:deadlinedb.RepositoryStatistics”,
“lastExtent” : “0:a29000 ns:deadlinedb.RepositoryStatistics”,
“extentCount” : 3,
“datasize” : 109208,
“nrecords” : 374,
“lastExtentSize” : 327680,
“padding” : 1,
“firstExtentDetails” : {
“loc” : “0:db000”,
“xnext” : “0:955000”,
“xprev” : “null”,
“nsdiag” : “deadlinedb.RepositoryStatistics”,
“size” : 20480,
“firstRecord” : “0:db0b0”,
“lastRecord” : “0:dfdb0”
},
“deletedCount” : 3,
“deletedSize” : 314360,
“nIndexes” : 1,
“keysPerIndex” : {
“deadlinedb.RepositoryStatistics.$id” : 374
},
“valid” : true,
“errors” : [ ],
“warning” : “Some checks omitted for speed. use {full:true} option to do more thorough scan.”,
“ok” : 1
}
{
“ns” : “deadlinedb.ScriptInfos”,
“firstExtent” : “0:b2000 ns:deadlinedb.ScriptInfos”,
“lastExtent” : “0:b2000 ns:deadlinedb.ScriptInfos”,
“extentCount” : 1,
“datasize” : 0,
“nrecords” : 0,
“lastExtentSize” : 8192,
“padding” : 1,
“firstExtentDetails” : {
“loc” : “0:b2000”,
“xnext” : “null”,
“xprev” : “null”,
“nsdiag” : “deadlinedb.ScriptInfos”,
“size” : 8192,
“firstRecord” : “null”,
“lastRecord” : “null”
},
“deletedCount” : 1,
“deletedSize” : 8016,
“nIndexes” : 3,
“keysPerIndex” : {
“deadlinedb.ScriptInfos.$id” : 0,
“deadlinedb.ScriptInfos.$ScriptType_1_ScriptName_1” : 0,
“deadlinedb.ScriptInfos.$EntryTime_1” : 0
},
“valid” : true,
“errors” : [ ],
“warning” : “Some checks omitted for speed. use {full:true} option to do more thorough scan.”,
“ok” : 1
}
{
“ns” : “deadlinedb.SlaveInfo”,
“firstExtent” : “0:2000 ns:deadlinedb.SlaveInfo”,
“lastExtent” : “0:4bf000 ns:deadlinedb.SlaveInfo”,
“extentCount” : 2,
“datasize” : 19636,
“nrecords” : 19,
“lastExtentSize” : 212992,
“padding” : 1.0000000000000155,
“firstExtentDetails” : {
“loc” : “0:2000”,
“xnext” : “0:4bf000”,
“xprev” : “null”,
“nsdiag” : “deadlinedb.SlaveInfo”,
“size” : 53248,
“firstRecord” : “0:aee8”,
“lastRecord” : “0:e11c”
},
“deletedCount” : 64,
“deletedSize” : 245948,
“nIndexes” : 2,
“keysPerIndex” : {
“deadlinedb.SlaveInfo.$id” : 19,
“deadlinedb.SlaveInfo.$LastWriteTime_1” : 19
},
“valid” : true,
“errors” : [ ],
“warning” : “Some checks omitted for speed. use {full:true} option to do more thorough scan.”,
“ok” : 1
}
{
“ns” : “deadlinedb.SlaveReports”,
“firstExtent” : “0:188000 ns:deadlinedb.SlaveReports”,
“lastExtent” : “1:fc2000 ns:deadlinedb.SlaveReports”,
“extentCount” : 5,
“datasize” : 848812,
“nrecords” : 18,
“lastExtentSize” : 5242880,
“padding” : 1.0660000000000238,
“firstExtentDetails” : {
“loc” : “0:188000”,
“xnext” : “0:1ae000”,
“xprev” : “null”,
“nsdiag” : “deadlinedb.SlaveReports”,
“size” : 20480,
“firstRecord” : “0:188d2c”,
“lastRecord” : “0:188d2c”
},
“deletedCount” : 171,
“deletedSize” : 6133700,
“nIndexes” : 1,
“keysPerIndex” : {
“deadlinedb.SlaveReports.$id” : 18
},
“valid” : true,
“errors” : [ ],
“warning” : “Some checks omitted for speed. use {full:true} option to do more thorough scan.”,
“ok” : 1
}
{
“ns” : “deadlinedb.SlaveSettings”,
“firstExtent” : “0:5b000 ns:deadlinedb.SlaveSettings”,
“lastExtent” : “0:3f2000 ns:deadlinedb.SlaveSettings”,
“extentCount” : 2,
“datasize” : 6480,
“nrecords” : 19,
“lastExtentSize” : 32768,
“padding” : 1.0450000000000017,
“firstExtentDetails” : {
“loc” : “0:5b000”,
“xnext” : “0:3f2000”,
“xprev” : “null”,
“nsdiag” : “deadlinedb.SlaveSettings”,
“size” : 8192,
“firstRecord” : “0:5cd70”,
“lastRecord” : “0:5cd70”
},
“deletedCount” : 31,
“deletedSize” : 33824,
“nIndexes” : 2,
“keysPerIndex” : {
“deadlinedb.SlaveSettings.$id” : 19,
“deadlinedb.SlaveSettings.$LastWriteTime_1” : 19
},
“valid” : true,
“errors” : [ ],
“warning” : “Some checks omitted for speed. use {full:true} option to do more thorough scan.”,
“ok” : 1
}
{
“ns” : “deadlinedb.SlaveStatistics”,
“firstExtent” : “0:cf000 ns:deadlinedb.SlaveStatistics”,
“lastExtent” : “0:969000 ns:deadlinedb.SlaveStatistics”,
“extentCount” : 4,
“datasize” : 380480,
“nrecords” : 2524,
“lastExtentSize” : 786432,
“padding” : 1,
“firstExtentDetails” : {
“loc” : “0:cf000”,
“xnext” : “0:8b1000”,
“xprev” : “null”,
“nsdiag” : “deadlinedb.SlaveStatistics”,
“size” : 12288,
“firstRecord” : “0:cf0b0”,
“lastRecord” : “0:d1ee4”
},
“deletedCount” : 2,
“deletedSize” : 622912,
“nIndexes” : 1,
“keysPerIndex” : {
“deadlinedb.SlaveStatistics.$id” : 2524
},
“valid” : true,
“errors” : [ ],
“warning” : “Some checks omitted for speed. use {full:true} option to do more thorough scan.”,
“ok” : 1
}
{
“ns” : “deadlinedb.Tasks”,
“firstExtent” : “0:14a000 ns:deadlinedb.Tasks”,
“lastExtent” : “1:602000 ns:deadlinedb.Tasks”,
“extentCount” : 4,
“datasize” : 85228,
“nrecords” : 4,
“lastExtentSize” : 10223616,
“padding” : 1.00200000000005,
“firstExtentDetails” : {
“loc” : “0:14a000”,
“xnext” : “0:3fa000”,
“xprev” : “null”,
“nsdiag” : “deadlinedb.Tasks”,
“size” : 159744,
“firstRecord” : “null”,
“lastRecord” : “null”
},
“deletedCount” : 322,
“deletedSize” : 13492244,
“nIndexes” : 1,
“keysPerIndex” : {
“deadlinedb.Tasks.$id” : 4
},
“valid” : true,
“errors” : [ ],
“warning” : “Some checks omitted for speed. use {full:true} option to do more thorough scan.”,
“ok” : 1
}
{
“ns” : “deadlinedb.UserInfo”,
“firstExtent” : “0:e9000 ns:deadlinedb.UserInfo”,
“lastExtent” : “0:e9000 ns:deadlinedb.UserInfo”,
“extentCount” : 1,
“datasize” : 356,
“nrecords” : 4,
“lastExtentSize” : 8192,
“padding” : 1,
“firstExtentDetails” : {
“loc” : “0:e9000”,
“xnext” : “null”,
“xprev” : “null”,
“nsdiag” : “deadlinedb.UserInfo”,
“size” : 8192,
“firstRecord” : “0:e90b0”,
“lastRecord” : “0:e91e8”
},
“deletedCount” : 1,
“deletedSize” : 7596,
“nIndexes” : 1,
“keysPerIndex” : {
“deadlinedb.UserInfo.$id” : 4
},
“valid” : true,
“errors” : [ ],
“warning” : “Some checks omitted for speed. use {full:true} option to do more thorough scan.”,
“ok” : 1
}
{
“ns” : “deadlinedb.system.indexes”,
“firstExtent” : “0:f000 ns:deadlinedb.system.indexes”,
“lastExtent” : “0:f000 ns:deadlinedb.system.indexes”,
“extentCount” : 1,
“datasize” : 2448,
“nrecords” : 28,
“lastExtentSize” : 8192,
“padding” : 1,
“firstExtentDetails” : {
“loc” : “0:f000”,
“xnext” : “null”,
“xprev” : “null”,
“nsdiag” : “deadlinedb.system.indexes”,
“size” : 8192,
“firstRecord” : “0:f0b0”,
“lastRecord” : “0:fba0”
},
“deletedCount” : 1,
“deletedSize” : 5120,
“nIndexes” : 0,
“keysPerIndex” : {

    },
    "valid" : true,
    "errors" : [ ],
    "warning" : "Some checks omitted for speed. use {full:true} option to do more thorough scan.",
    "ok" : 1

}

[/code]

And a zipped copy of the mongo DB:

mediafire.com/?19ixwr9icuu8b41

I unzipped your mongo db, and the total size of the data folder is 256 MB. I also checked those db.stats() calls. Here are the first and last calls:

        "db" : "deadlinedb",
        "collections" : 18,
        "objects" : 3049,
        "avgObjSize" : 496.04591669399804,
        "dataSize" : 1512444,
        "storageSize" : 16084992,
        "numExtents" : 36,
        "indexes" : 28,
        "indexSize" : 441504,
        "fileSize" : 117440512,
        "nsSizeMB" : 16,
        "ok" : 1
        "db" : "deadlinedb",
        "collections" : 18,
        "objects" : 3069,
        "avgObjSize" : 772.753339850114,
        "dataSize" : 2371580,
        "storageSize" : 66998272,
        "numExtents" : 41,
        "indexes" : 28,
        "indexSize" : 441504,
        "fileSize" : 251658240,
        "nsSizeMB" : 16,
        "ok" : 1

Note that these values are in bytes. So from start to finish, the size on disk (“fileSize”) went from 117 MB to 252 MB (which basically matches up to the size of the mongo db you posted). Note that this includes pre-allocated space. Actual data usage within that pre-allocated space (“dataSize”) went from 1.5 MB to 2.4 MB.

Now I know that seems like Mongo is wasting a lot of space to store that data, but most of it is for pre-allocation. Your database size on disk shouldn’t have to grow again until it touches the 128 MB file, at which point it will pre-allocate another 256 MB. This pre-allocation doubles until it hits 2 GB, and then from that point on only 2GB datafiles are created as they are needed.

Can you tell me where you’re pulling the 300 MB number from? Maybe I’m just misunderstanding something


Cheers,

  • Ryan

This morning my total Mongo DB size was 50MB (viewtopic.php?f=86&t=8687&start=10#p36647). Now it’s 350MB on disk (although I see that 70MB of that was app folder so you’re right that was unfair)
 so 200MB in less than 4 hours. So with 4 jobs and 500 errors it increased in size by 200MB.

We can’t have our database using up 2GB of space per week. We’ll need a TB of RAM by the end of the year. :stuck_out_tongue:

EDIT: Oh I see, on the 64Bit Mongo it doesn’t load it all into RAM. Still
 so we shouldn’t run this on an SSD then? How many TBs of space should I install in our system to dedicate to Mongo?

Hey Gavin,

That’s right, it doesn’t load it all into RAM, and the 32-bit versions limit isn’t 2GB of RAM, it’s 2GB on disk.

Also, the disk space that Mongo uses doesn’t grow linearly. It grows fast at the beginning as it aggressively pre-allocates disk space for all of the Deadline collections in the database, but that will taper off. There was a point where our 10,000 job database had over 100,000 error reports in it (we had let 4 jobs we knew would never render run for a while, and they each accumulated over 25,000 errors), and we were still at the 1 GB mark on disk.

Also, when stuff is deleted, that space becomes available again. Note that deleting stuff won’t shrink the disk space use, because pre-allocated space isn’t deleted, but the space within the pre-allocated space is reusable (I hope that makes sense). So as long as you’re reasonably cleaning up your jobs, you won’t run out of disk space. We are considering putting a cap on the number of reports a job can have if necessary (in which case the oldest reports get replaced by new ones), but we’re not sure if this is necessary at this point.

Hopefully that alleviates your concerns about disk space usage. We will be running more tests, because I want a graph that shows how that disk space increases as the job counts increase.

Cheers,

  • Ryan

It sounds like you need to take a look then at my old 2GB database since I suspect there was a bug in the allocation. It’s nowhere near your limits but twice the size. Could be a landmine waiting to go off that I stumbled on.

We had tried to take a look at it, but it shows up as being empty. It’s probably a result of the corruption. If your current db grows to over a gig again, please zip it up and post it and we’ll take a look. Note that we just need the data folder.

I took a look at the database files themselves, and noticed that it created 3 pre-allocated 512 MB files, rather than creating a 1 GB one. I’m guessing this is because it’s the 32 bit version. Not sure if that’s a Mongo bug, since I didn’t see any specifics on this working differently for the 32 bit version. Of course, it would be great to see if you see different results with the 64 bit version.

Cheers,

  • Ryan

We already have upgrade plans in place but we won’t have specifics mapped out until after the new year.

Hopefully this addresses the concerns about Mongo’s disk space usage for good! :slight_smile:
viewtopic.php?f=156&t=8715

Well Mongo on Thursday decided it needed to alocate 1.5GB of space in the course of an hour and is now dead again. Is there a way to purge allocation data without corrupting the database?

Ok I found a solution to this that should last a little while:

Run a repair on it with:

C:\mongo\application\bin\mongod --dbpath C:\monogo\data --repair --noallocation

Then launch it as:

C:\mongo\application\bin\mongod --dbpath C:\monogo\data --noallocation

and it runs. Obviously it’ll run slower without preallocation but at least it’ll run on a 32 bit machine without dying every other day.

Lower down the page, noprealloc is not recommended for use in production. It will hurt performance somewhat as the files become fragmented.
docs.mongodb.org/manual/faq/stor 
 -disk-size

I have a feeling smallfiles is set to true for 32-bit systems, causing it to allocate 512MB files.
docs.mongodb.org/manual/referenc 
 smallfiles
jira.mongodb.org/browse/SERVER-6722

C:\mongo\application\bin\mongod --dbpath C:\monogo\data --noallocation
With these options on 32-bit it will run without journalling, saving some memory. This means data will get lost if mongo crashes.

I hope you can find a 64-bit machine soon!

In the continuous joy that is Mongo on a 32 bit system. Here is another fun one:

Tue Jan 29 01:14:00 [conn20826] end connection 192.168.94.29:49319 (17 connectio
ns now open)
Tue Jan 29 01:14:00 [initandlisten] connection accepted from 192.168.94.29:49537
 #20844 (18 connections now open)
Tue Jan 29 01:14:28 [conn20836] info DFM::findAll(): extent 0:2a000 was empty, s
kipping ahead. ns:deadlinedb.Jobs
Tue Jan 29 01:16:51 [conn20828] end connection 192.168.94.29:49346 (17 connectio
ns now open)
Tue Jan 29 01:17:06 [FileAllocator] allocating new datafile C:/mongo/data/deadli
nedb.5, filling with zeroes...
Tue Jan 29 01:17:06 [FileAllocator] creating directory C:/mongo/data/_tmp
Tue Jan 29 01:17:06 [initandlisten] connection accepted from 192.168.94.34:58473
 #20845 (18 connections now open)
Tue Jan 29 01:17:07 [initandlisten] connection accepted from 192.168.94.29:49562
 #20846 (19 connections now open)
Tue Jan 29 01:17:08 [initandlisten] connection accepted from 192.168.94.33:53358
 #20847 (20 connections now open)
Tue Jan 29 01:17:08 [FileAllocator] done allocating datafile C:/mongo/data/deadl
inedb.5, size: 511MB,  took 1.649 secs
Tue Jan 29 01:17:08 [conn20836] MapViewOfFileEx for C:/mongo/data/deadlinedb.5 f
ailed with error errno:8 Not enough storage is available to process this command
. (file size is 536608768) in MemoryMappedFile::createPrivateMap
Tue Jan 29 01:17:08 [conn20836]  deadlinedb.DeadlineSettings Fatal Assertion 161
67
Tue Jan 29 01:17:08 [conn20836] mongod.exe    ???
Tue Jan 29 01:17:08 [conn20836] mongod.exe    ???
Tue Jan 29 01:17:08 [conn20836] mongod.exe    ???
Tue Jan 29 01:17:08 [conn20836] mongod.exe    ???
Tue Jan 29 01:17:08 [conn20836] mongod.exe    ???
Tue Jan 29 01:17:08 [conn20836] mongod.exe    ???
Tue Jan 29 01:17:08 [conn20836] mongod.exe    ???
Tue Jan 29 01:17:08 [conn20836] mongod.exe    ???
Tue Jan 29 01:17:08 [conn20836] mongod.exe    ???
Tue Jan 29 01:17:08 [conn20836] mongod.exe    ???
Tue Jan 29 01:17:08 [conn20836] mongod.exe    ???
Tue Jan 29 01:17:08 [conn20836] mongod.exe    ???
Tue Jan 29 01:17:08 [conn20836] mongod.exe    ???
Tue Jan 29 01:17:08 [conn20836] mongod.exe    ???
Tue Jan 29 01:17:08 [conn20836] mongod.exe    ???
Tue Jan 29 01:17:08 [conn20836] mongod.exe    ???
Tue Jan 29 01:17:08 [conn20836] mongod.exe    ???
Tue Jan 29 01:17:08 [conn20836] mongod.exe    ???
Tue Jan 29 01:17:08 [conn20836] mongod.exe    ???
Tue Jan 29 01:17:08 [conn20836] mongod.exe    ???
Tue Jan 29 01:17:08 [conn20836]

***aborting after fassert() failure


Tue Jan 29 01:17:09 [initandlisten] connection accepted from 192.168.94.34:58474
 #20848 (21 connections now open)

This was with --noallocation and --journal. I’ll turn off --journal. Maybe that causes conflicts like you say.

Man, we really hope you can get this on a 64 bit system soon!

Just to make it clear, we do not support 32 bit mongo installations in a production environment. This isn’t going to change in the future, so the sooner you get on 64 bit, the better! :slight_smile:

Privacy | Site terms | Cookie preferences