I am currently working on a "simple" mongoDB photosystem using a replica set and GridFS.
The principle is simple, I put a lot of photos using GridFS, the client knows the file name and from the file name I can get the file.
Is GridFS using file name as indexes? Hopefully, yes, I could not find it in any official document.
My statistics:
{
"ns" : "photos.socialphotos.files",
"count" : 758086,
"size" : 168295128,
"avgObjSize" : 222.00004748801587,
"storageSize" : 220647424,
"numExtents" : 15,
"nindexes" : 2,
"lastExtentSize" : 43311104,
"paddingFactor" : 1,
"flags" : 1,
"totalIndexSize" : 125084624,
"indexSizes" : {
"_id_" : 22925504,
"filename_1_uploadDate_1" : 102159120
},
"ok" : 1
}
EDIT : According to the reIndex () collection, I won 30 Go, but it's still too tall.
My indices:
{
"v" : 1,
"key" : {
"_id" : 1
},
"ns" : "photos.socialphotos.files",
"name" : "_id_"
},
{
"v" : 1,
"key" : {
"filename" : 1,
"uploadDate" : 1
},
"ns" : "photos.socialphotos.files",
"name" : "filename_1_uploadDate_1"
}
Index Size:
"keysPerIndex" : {
"photos.socialphotos.files.$_id_" : 758086,
"photos.socialphotos.files.$filename_1_uploadDate_1" : 758086
}
I never use _id_, because I do not store it, is it right to delete it? The index size is 125084624, which means that I should have almost all of my photos in RAM, which is a bit strange?
Additional questions:
: mongostats - , , ?
: LOT ( 100 ), , ... ?
Connecion Pool JAVA/Tomcat: Tomcat Webapp MongoDB, mongoDB ( , ) singleton Mongo (, Holder) , ?
!