Customise oplogSize on Windows Server System

26 views
Skip to first unread message

Tom Vo

unread,
Jul 24, 2012, 5:37:26 AM7/24/12
to mongod...@googlegroups.com
Dear all
I setup mongodb system on windows server with configure below:
  • Mongodb : version 2.0.6 64 bit
  • Operator System: Windows Server Standard 2008 
  • Apply Replication Set on two servers:
      • RAM memory : 16 GB
      • HDD : 500 GB
And I set oplogSize parameter is 8192. I use mongotop tool to monitor mongodb instance as below. As mentioned on http://docs.mongodb.org/manual/core/replication/#replica-set-oplog-sizing, I don't config oplogSize on Windows Server System. Please help me more advice.

//////////////////// Replication operation log

ns total read write 2012-07-24T07:33:17
local.oplog.rs 2059ms 2059ms 0ms
local.system.replset 0ms 0ms 0ms
local.system.namespaces 0ms 0ms 0ms
local.system.indexes 0ms 0ms 0ms
local.replset.minvalid.$_id_ 0ms 0ms 0ms
local.replset.minvalid 0ms 0ms 0ms
local.me.$_id_ 0ms 0ms 0ms
local.me 0ms 0ms 0ms
admin.system.users.$_id_ 0ms 0ms 0ms

ns total read write 2012-07-24T07:33:18
local.oplog.rs 2090ms 2090ms 0ms
local.system.replset 0ms 0ms 0ms
local.system.namespaces 0ms 0ms 0ms
local.system.indexes 0ms 0ms 0ms
local.replset.minvalid.$_id_ 0ms 0ms 0ms
local.replset.minvalid 0ms 0ms 0ms
local.me.$_id_ 0ms 0ms 0ms
local.me 0ms 0ms 0ms
admin.system.users.$_id_ 0ms 0ms 0ms

ns total read write 2012-07-24T07:33:19
local.oplog.rs 2059ms 2059ms 0ms
local.system.replset 0ms 0ms 0ms
local.system.namespaces 0ms 0ms 0ms
local.system.indexes 0ms 0ms 0ms
local.replset.minvalid.$_id_ 0ms 0ms 0ms
local.replset.minvalid 0ms 0ms 0ms
local.me.$_id_ 0ms 0ms 0ms
local.me 0ms 0ms 0ms
admin.system.users.$_id_ 0ms 0ms 0ms
 

Thanks and Best Regards

Scott Hernandez

unread,
Jul 24, 2012, 8:47:23 AM7/24/12
to mongod...@googlegroups.com
Can you run this from the mongo javascript shell?
db.getSiblingDB("local").oplog.rs.stats()
db.printReplicationInfo()
rs.status()
> --
> 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
> mongodb-user...@googlegroups.com
> See also the IRC channel -- freenode.net#mongodb

Tom Vo

unread,
Jul 24, 2012, 8:57:00 PM7/24/12
to mongod...@googlegroups.com
Dear Scott
Thanks for your support. Please refer list output of your guide:

G:\mongodb\bin\agency>mongo.exe admin --port 27031
MongoDB shell version: 2.0.6
connecting to: 127.0.0.1:27031/admin
> db.auth("admin","xxxxxxxxxxx")
1
PRIMARY> show dbs
STRUCT       0.078125GB
REMPL 4.076171875GB
TULFT 0.078125GB
admin   0.078125GB
local   8.07421875GB
PRIMARY> use local
switched to db local
PRIMARY> db.getSiblingDB("local").oplog.rs.stats()
{
        "ns" : "local.oplog.rs",
        "count" : 67866,
        "size" : 70715292,
        "avgObjSize" : 1041.9840862876845,
        "storageSize" : 8589938624,
        "numExtents" : 5,
        "nindexes" : 0,
        "lastExtentSize" : 4231168,
        "paddingFactor" : 1,
        "flags" : 0,
        "totalIndexSize" : 0,
        "indexSizes" : {

        },
        "capped" : 1,
        "max" : 2147483647,
        "ok" : 1
}
PRIMARY> db.printReplicationInfo()
configured oplog size:   8192MB
log length start to end: 670313secs (186.2hrs)
oplog first event time:  Tue Jul 17 2012 02:39:28 GMT-0400 (SA Western Standard Time)
oplog last event time:   Tue Jul 24 2012 20:51:21 GMT-0400 (SA Western Standard Time)
now:                     Tue Jul 24 2012 20:51:32 GMT-0400 (SA Western Standard Time)
PRIMARY> rs.status()
{
        "set" : "REL_SET",
        "date" : ISODate("2012-07-25T00:51:36Z"),
        "myState" : 1,
        "members" : [
                {
                        "_id" : 0,
                        "name" : "SERVR01:27031",
                        "health" : 1,
                        "state" : 2,
                        "stateStr" : "SECONDARY",
                        "uptime" : 413440,
                        "optime" : {
                                "t" : 1343177494000,
                                "i" : 2
                        },
                        "optimeDate" : ISODate("2012-07-25T00:51:34Z"),
                        "lastHeartbeat" : ISODate("2012-07-25T00:51:34Z"),
                        "pingMs" : 0
                },
                {
                        "_id" : 1,
                        "name" : "SERVR02:27032",
                        "health" : 1,
                        "state" : 2,
                        "stateStr" : "SECONDARY",
                        "uptime" : 74290,
                        "optime" : {
                                "t" : 1343177494000,
                                "i" : 2
                        },
                        "optimeDate" : ISODate("2012-07-25T00:51:34Z"),
                        "lastHeartbeat" : ISODate("2012-07-25T00:51:34Z"),
                        "pingMs" : 0
                },
                {
                        "_id" : 2,
                        "name" : "SERVR02:27030",
                        "health" : 1,
                        "state" : 7,
                        "stateStr" : "ARBITER",
                        "uptime" : 413442,
                        "optime" : {
                                "t" : 0,
                                "i" : 0
                        },
                        "optimeDate" : ISODate("1970-01-01T00:00:00Z"),
                        "lastHeartbeat" : ISODate("2012-07-25T00:51:34Z"),
                        "pingMs" : 0
                },
                {
                        "_id" : 3,
                        "name" : "SERVR03:27031",
                        "health" : 1,
                        "state" : 1,
                        "stateStr" : "PRIMARY",
                        "optime" : {
                                "t" : 1343177494000,
                                "i" : 2
                        },
                        "optimeDate" : ISODate("2012-07-25T00:51:34Z"),
                        "self" : true
                }
        ],
        "ok" : 1
}
PRIMARY>






--

Thanks and Best Regards
-------------------------------------------------------------------------------------------------------------
Vo Tan Hau (TOM)
Senior Database Administrator
NEXCEL SOLUTIONS LTD
SMS Tower,Lot 40, Quang Trung Software City, District 12, HCMC, Vietnam.
Tel:+84-8-37154278 - Fax:+84-8-37154279 www.nexcel.vn
Messenger
(Skype+Yahoo+Live): Vohau2002


Tom Vo

unread,
Jul 25, 2012, 12:05:51 AM7/25/12
to mongod...@googlegroups.com
FYI

Scott Hernandez

unread,
Jul 25, 2012, 9:13:44 AM7/25/12
to mongod...@googlegroups.com
Your oplog size looks fine and is what you have described. Is there a
problem or issue you are concerned about?

Tom Vo

unread,
Jul 25, 2012, 9:47:25 PM7/25/12
to mongod...@googlegroups.com
I don't know the best set oplog size on Windows Server System.
Could you guide me how to setup it because we have plan setup Mongodb base on Windows Server?

Scott Hernandez

unread,
Jul 25, 2012, 10:04:38 PM7/25/12
to mongod...@googlegroups.com
The oplog size is going to depend on how much data you change and how
often. It is very application dependent.

In the commands you posted you have an oplog which is 186hrs, or about
8days, so that is probably fine as long as that data is based on your
normal write patterns. You basically want an oplog which is many times
your largest time to recovery on failure or maintenance window.
Reply all
Reply to author
Forward
0 new messages