Hi community!
I am currently working on a Software Project, where I’ve set up an M10 Dedicated cluster on MongoDB Atlas. The statistics of my database look like this:
As it can be seen in the picture above, my storage size is 554.83MB
. If I run db.stats()
in mongosh
, I obtain the following statistics:
Atlas atlas-fmbop9-shard-0 [primary] news_db> db.stats()
{
db: 'news_db',
collections: 4,
views: 0,
objects: 1040164,
avgObjSize: 758.4941961075369,
dataSize: 788958357,
storageSize: 581779456,
indexes: 4,
indexSize: 18321408,
totalSize: 600100864,
scaleFactor: 1,
fsUsedSize: 7438405632,
fsTotalSize: 10726932480,
ok: 1,
'$clusterTime': {
clusterTime: Timestamp({ t: 1686131293, i: 1 }),
signature: {
hash: Binary(Buffer.from("448344519386fd7a20bfe7c11263d4977bbd771b", "hex"), 0),
keyId: Long("7241613558851567622")
}
},
operationTime: Timestamp({ t: 1686131293, i: 1 })
}
As it can be seen in the code block above, the fsUsedSize
is 7438405632 Bytes ~= 6.92GB.
I have recently received an e-mail from MongoDB Atlas that states that I have almost reached the limit of the 10GB size of my cluster.
My question is: Is that “Storage” of 10GB offered by my plan refering to the “Disk space used”, and if so: how can I get some more insight about what composes this huge disk space usage? My gut feeling is that this large discrepancy between “storageSize” and “Disk space used” may indicate some problems in configuring the database, but I do not how to debug this issue properly.
news_collection
document example:
Atlas atlas-fmbop9-shard-0 [primary] news_db> db.news_collection.findOne()
{
_id: 'https://www.npr.org/2023/05/16/1176508568/biden-meets-with-congressional-leaders-as-debt-limit-deadline-looms',
fingerprints: [
374865, 241001, 48745, 259731, 70017, 156617, 673765, 331956,
270995, 130199, 45513, 457174, 113615, 603545, 116103, 163152,
408810, 18232, 522353, 541818, 182149, 84889, 438504, 257512,
256602, 460686, 287592, 59625, 261816, 189635, 346076, 291558,
14098, 164881, 39145, 189446, 291303, 35600, 298657, 83163,
313783, 278993, 182793, 157549, 201840, 527436, 21982, 380645,
56697, 48363, 67714, 113824, 94203, 144955, 37354, 199260,
249434, 268125, 366513, 196130, 181955, 11618, 337985, 553825,
224547, 398779, 323990, 299317, 41589, 234623, 167918, 155028,
214631, 397630, 395398, 62818, 310355, 10561, 359734, 99014,
641902, 155804, 224220, 91110, 109134, 162947, 21310, 322004,
413283, 75042, 346425, 420857, 222899, 58817, 55335, 159492,
189573, 267054, 140012, 180607,
... 976 more items
]
}
hashes_collection
document example:
Atlas atlas-fmbop9-shard-0 [primary] news_db> db.hashes_collection.findOne()
{
_id: 126992,
urls: [
'https://www.npr.org/2023/05/16/1176508568/biden-meets-with-congressional-leaders-as-debt-limit-deadline-looms',
'https://100percentfedup.com/classless-chicago-mayor-told-trump-f-u-now-wants-to-fire-cop-who-flipped-off-protesters/',
'https://5pillarsuk.com/2020/06/21/deadly-reading-stabbings-declared-a-terrorist-incident/',
'https://5pillarsuk.com/2020/10/30/jumuah-khutbah-islam-is-not-in-crisis-french-secularism-is/',
'https://5pillarsuk.com/2021/03/19/tanzania-has-a-new-female-muslim-leader/',
'https://5pillarsuk.com/2021/07/26/tunisia-in-crisis-as-president-is-accused-of-launching-coup/',
'https://92newshd.tv/about/at-least-40-killed-one-still-missing-in-turkey-mine-blast',
'https://academicfreedom.org/letter-to-concordia-wisconsin-on-gregory-schulz/',
'https://z3news.com/w/antichristbeast-systemglobal-governance-unveiled/',
To provide more insights about the structure of my documents, I will list below one document from news_documents
collection, and another one from hashes_collection
:
I am also open to (and would kindly appreciate) hearing your opinion on whether a NoSQL database storage system may not be the most viable option in my case, and whether it would be better to migrate to a relational database instead.
Thank you in advance for your time, feedback and support!
-Vlad