MongoDB High Avg. Flush Time - Write Heavy -
i'm using mongodb approximately 4 million documents , around 5-6gb database size. machine has 10gb of ram, , free reports around 3.7gb in use. database used video game related ladder (rankings) website, separated region.
it's write heavy operation, still gets significant number of reads well. use updater queries outside source every hour or two. updater processes records , updates documents on database. updater processes 1 region @ time (see previous paragraph), approximately 33% of database updated.
when updater runs, , duration runs, average flush time spikes around 35-40 seconds, , experience general slowdowns other queries. updater ran on separate machine , queries mongodb @ end, when data has been retrieved , processed third party.
some people have suggested slowing down number of updates, or updating players have changed, problem comes down rankings. since support ties between players, need pre-calculate ranks - if few users have changed ranks, still need update rest of users ranks accordingly. @ least, case mysql - i'm not sure if there solution mongodb ranking ~800k->1.2 million documents while supporting ties.
my question is: how can improve flush , slowdown we're experiencing? why spiking high? disabling journaling (to take load off i/o) help, data loss isn't i'm worried database updated regardless?
server status: http://pastebin.com/w1etfpws
without seeing disk statistics, of opinion saturating disks.
this can checked iostat -xmt 2
, , checking %util
column.
please don't disable journalling - cause more issues later down line when machine crashes.
separating collections have no effect. separating databases may, if you're io bound, nothing you.
options
if correct, , disks saturated, adding more disks in raid 10 configuration vastly performance , durability - more if separate journal off ssd.
assuming machine single server, can setup replicaset , send read queries there. should fair bit, not as disks.
Comments
Post a Comment