> See also the IRC channel -- freenode.net#mongodb
> mongodb-user+unsubscribe@googlegroups.com
> See also the IRC channel -- freenode.net#mongodb
>
> --
> You received this message because you are subscribed to the Google
> Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com
> To unsubscribe from this group, send email to
Hi everybody,Is there anything new about this ?I have the same issue, and was searching the group before posting my own topic.Some facts :> db.stats(){"db" : "hh","collections" : 15,"objects" : 398769,"avgObjSize" : 18754.794249302227,"dataSize" : 7478830548,"storageSize" : 12172083200,"numExtents" : 122,"indexes" : 46,"indexSize" : 26302192,"fileSize" : 14958985216,"nsSizeMB" : 16,"ok" : 1}The main collection is "searches" :> db.searches.stats(){"ns" : "hh.searches","count" : 4365,"size" : 1358614876,"avgObjSize" : 311251.97617411223,"storageSize" : 2159874048,"numExtents" : 13,"nindexes" : 6,"lastExtentSize" : 597745664,"paddingFactor" : 1.000000000012644,"systemFlags" : 1,"userFlags" : 0,"totalIndexSize" : 1488032,"indexSizes" : {"_id_" : 228928,"created_at_-1" : 212576,"created_at_1" : 228928,"updated_at_-1" : 212576,"updated_at_1" : 228928,"recent_search_index" : 376096},"ok" : 1}The memory :
$ free -mtotal used free shared buffers cached
Mem: 32230 27216 5013 0 2686 5535-/+ buffers/cache: 18994 13235Swap: 1905 1458 447Blockdev :
$ sudo blockdev --reportRO RA SSZ BSZ StartSec Size Device
rw 256 512 4096 0 1999844147200 /dev/sdbrw 256 512 4096 63 999996609024 /dev/sdb1rw 256 512 4096 1953118440 900001912320 /dev/sdb2rw 256 512 4096 0 299439751168 /dev/sdarw 256 512 1024 2048 499122176 /dev/sda1rw 256 512 4096 976896 1000341504 /dev/sda2rw 256 512 4096 2930688 4999610368 /dev/sda3rw 256 512 1024 12697598 1024 /dev/sda4rw 256 512 4096 12697600 999292928 /dev/sda5rw 256 512 4096 14651392 999292928 /dev/sda6rw 256 512 4096 16605184 9999220736 /dev/sda7rw 256 512 4096 36136960 9999220736 /dev/sda8rw 256 512 4096 55668736 999292928 /dev/sda9rw 256 512 4096 57622528 99997450240 /dev/sda10rw 256 512 4096 252932096 169938518016 /dev/sda11The main problem I have is shown by mongostat almost all the time ; the "lock db" is near 100% whenever I make a few dozen request at the same time :insert query update delete getmore command flushes mapped vsize res faults locked db idx miss % qr|qw ar|aw netIn netOut conn time0 18 149 0 0 18 0 12.2g 25g 801m 0 hh:97.3% 0 5|0 0|4 58k 17k 49 00:13:510 28 155 0 0 30 0 12.2g 25g 801m 0 hh:95.4% 0 7|0 0|2 59k 3m 49 00:13:520 28 180 0 0 31 0 12.2g 25g 801m 0 hh:96.9% 0 10|0 0|1 76k 32k 49 00:13:530 21 146 0 0 20 0 12.2g 25g 801m 0 hh:96.0% 0 11|0 0|1 66k 92k 50 00:13:540 26 101 0 0 29 0 12.2g 25g 801m 0 hh:95.9% 0 11|0 0|1 49k 110k 57 00:13:550 28 103 0 0 28 0 12.2g 25g 801m 0 hh:96.4% 0 9|0 0|1 56k 35k 57 00:13:560 34 117 0 0 35 0 12.2g 25g 801m 0 hh:97.6% 0 12|0 0|1 63k 44k 57 00:13:570 26 133 0 0 25 0 12.2g 25g 801m 0 hh:97.1% 0 10|1 0|1 61k 37k 57 00:13:580 41 145 0 0 46 0 12.2g 25g 801m 0 hh:95.9% 0 10|0 0|1 71k 72k 53 00:14:000 29 119 0 0 26 0 12.2g 25g 801m 0 hh:97.1% 0 9|0 0|1 64k 31k 51 00:14:01My "searches" collection is used like this :* <20K records, quite big, with deep BSON structure* read/writes are almost 95% of the time using the primary index (which is not an ObjectID but an integer for an historic reason)* a lot of updates are touching the same record at the same time, but on different parts of itThanks for your input on this
Le vendredi 9 novembre 2012 02:37:52 UTC+1, Rob Moore a écrit :Hi Rob,Many thanks for your answer.
How is the "hh" collection used. That is the one that is locked based on the mongostat.
"hh" is the database, "searches" is the mainly used collection.The typical use is described in my original message
My "searches" collection is used like this :* <20K records, quite big, with deep BSON structure* read/writes are almost 95% of the time using the primary index (which is not an ObjectID but an integer for an historic reason)* a lot of updates are touching the same record at the same time, but on different parts of it
Have you tried turning on the built in profiler to see what the slow operations are? http://www.mongodb.org/display/DOCS/Database+ProfilerNot yet, I'll do that.
Also on indexes:"_id_" : 228928,"created_at_-1" : 212576,"created_at_1" : 228928,"updated_at_-1" : 212576,"updated_at_1" : 228928,"recent_search_index" : 376096
You don't need both the "created_at_-1" and "created_at_1". MongoDB knows how to reverse the direction of the index. Similar argument for updated_at.
Thanks, I've changed that, but I doubt it's the cause of my problem.--Jérémy