[SERVER-23775] oplog default size must be differently calculated for inMemory storage engine Created: 17/Apr/16  Updated: 21/Nov/16  Resolved: 20/Apr/16

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.2.6, 3.3.5

Type: Bug Priority: Major - P3
Reporter: Asya Kamsky Assignee: Eric Milkie
Resolution: Done Votes: 0
Labels: code-only
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-23766 Remove beta startup warning for inMem... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Sprint: Repl 13 (04/22/16)
Participants:

 Description   

If oplog size is not specified, we calculate it using default based on free space on disk. This makes little sense for inMemory storage engine and will most likely never be the right size.

We should either fail to start if oplog size is not specified explicitly for a replica set member on startup, or we should calculate a different default, based on memory size (like we do cache) not based on disk size (and maybe give a warning in the logs that the size was not specified).



 Comments   
Comment by Githook User [ 19/Apr/16 ]

Author:

{u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}

Message: SERVER-23775 improved default oplog size for ephemeral storage engines

(cherry picked from commit bdc06761206ac398af04f0a2eb482c4dca49bad8)
Branch: v3.2
https://github.com/mongodb/mongo/commit/ae221cb5e40350c5d184f49400eacfa3e3526ee6

Comment by Githook User [ 18/Apr/16 ]

Author:

{u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}

Message: SERVER-23775 improved default oplog size for ephemeral storage engines
Branch: master
https://github.com/mongodb/mongo/commit/bdc06761206ac398af04f0a2eb482c4dca49bad8

Comment by Eric Milkie [ 18/Apr/16 ]

I kept it 50mb as the lower bound for in-memory.

Comment by Daniel Pasette (Inactive) [ 18/Apr/16 ]

The default floor for inMemorySize is currently 256MB in master. See: DOCS-7669. For 3.2 it is still 1GB

Comment by Eric Milkie [ 18/Apr/16 ]

I didn't mention the floor but it currently is 990MB.

my plan is to change it so that "everything else" is 990MB if disk-based storage; 50MB if ephemeral. Does 200 sound better?

Comment by Asya Kamsky [ 18/Apr/16 ]

That seems reasonable (and unlikely to ever get so high as to need the cap) though I wonder if it makes sense to have a floor for size of oplog - if total system memory is something low, like say 4GBs, cache will be just over 2GBs and oplog will be computed to be 200MBs... I guess that can be reasonable for small documents/relatively low write rate.

Comment by Eric Milkie [ 18/Apr/16 ]

Current thinking is to use the same calculation as for disk (5% with a cap of 50 GB), but for total system memory (as opposed to free system memory).

Generated at Thu Feb 08 04:04:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.