We're doing lots of updates with a $push where the criteria only is
using the _id key. We're seeing a lot of CPU usage.
Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s
avgrq-sz avgqu-sz await svctm %util
sda 0.00 9.00 0.00 96.00 0.00 20.93
446.42 0.30 3.12 0.21 2.00
avg-cpu: %user %nice %system %iowait %steal %idle
35.61 0.00 17.07 0.00 0.00 47.32
Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s
avgrq-sz avgqu-sz await svctm %util
sda 0.00 0.00 0.00 88.00 0.00 19.49
453.64 0.13 1.48 0.23 2.00
avg-cpu: %user %nice %system %iowait %steal %idle
35.29 0.00 14.22 1.47 0.00 49.02
Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s
avgrq-sz avgqu-sz await svctm %util
sda 0.00 0.00 0.00 175.00 0.00 40.84
477.90 0.89 5.09 0.17 3.00
avg-cpu: %user %nice %system %iowait %steal %idle
34.62 0.00 12.02 0.96 0.00 52.40
Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s
avgrq-sz avgqu-sz await svctm %util
sda 0.00 0.00 0.00 282.00 0.00 64.39
467.60 1.46 5.18 0.14 4.00
avg-cpu: %user %nice %system %iowait %steal %idle
33.66 0.00 16.59 0.49 0.00 49.27
Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s
avgrq-sz avgqu-sz await svctm %util
sda 0.00 0.00 0.00 110.00 0.00 24.95
464.44 0.11 1.00 0.27 3.00
There's only one index: _id
{ "_id" : "11736:3be9f70762202b85", "active" : 1307571480, "history" :
[
{
"note" : "",
"properties" : {
"platform" : "Mac OS X",
"page" : "
http://example.com/home",
"browser" : "Firefox"
},
"event" : "096329fdf32c2eb44702fc9310248509",
"created" : ISODate("2011-06-08T20:25:56Z")
},
{
"note" : "",
"properties" : {
"platform" : "Mac OS X",
"page" : "
http://example.com/home",
"browser" : "Firefox"
},
"event" : "096329fdf32c2eb44702fc9310248509",
"created" : ISODate("2011-06-08T20:25:44Z")
},
], "name_tag" : "" }
One problem is that we're exceeding the document size (which we're
fine with and basically doing a no-op) but believe that there may be
an expensive thing going fundamentally with mongodb when it hits this
scenario (e.g. exception handler). Ideas and thoughts?
Suhail