[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: |
|
||||||||
| 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: (cherry picked from commit bdc06761206ac398af04f0a2eb482c4dca49bad8) |
| Comment by Githook User [ 18/Apr/16 ] |
|
Author: {u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}Message: |
| 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: |
| 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). |