[SERVER-55606] Majority writes with j: false perform worse than j: true Created: 29/Mar/21 Updated: 30/Jan/24 |
|
| Status: | Open |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 4.2.0, 4.4.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Siyuan Zhou | Assignee: | Backlog - Replication Team |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | pmr | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Replication
|
||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Sprint: | Repl 2021-05-31, Repl 2021-06-14, Repl 2021-06-28, Repl 2021-07-12, Repl 2021-07-26, Repl 2021-08-09 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
Parallel insert performance test shows that writes with { w: majority, j: false } perform worse than { w: majority } which enabled journaling by default.
I found this issue using an update workload in my paper experiments against 4.4.2 in a 5-node setting. It's weird that the latency is about 100ms for some operations even when there's just one client. This seems related to the default storage.journal.commitIntervalMs used by the journal flusher
After I changed writeConcernMajorityJournalDefault to false, { w: majority } starts to perform as expected.
As a comparison, the default setting with { writeConcernMajorityJournalDefault: true } and { w: majority } gives a lower but comparable throughput as expected.
My theory is that the code missed signaling writers when updating the positions because it is conditional on writeConcernMajorityJournalDefault. |
| Comments |
| Comment by Judah Schvimer [ 22/Nov/21 ] |
|
I wonder if this is related to |
| Comment by Gaurav Kumar (Inactive) [ 30/Apr/21 ] |
|
alan.zheng Please take a look. |
| Comment by Siyuan Zhou [ 01/Apr/21 ] |
|
daniel.gottlieb Good catch! Updated the table. My understanding is "the intention for writeConcernMajorityJournalDefault is to choose the j value for `w: "majority` writes that lack one". In the documentation, the row of "j is unspecified" mentions it depends on writeConcernMajorityJournalDefault and seems sufficient to me, but that's totally a valid question for the documentation team. |
| Comment by Daniel Gottlieb (Inactive) [ 30/Mar/21 ] |
|
Hey siyuan.zhou, this is real interesting. I think there's a typo in the description. The second and third tables have the same contents. Also for my benefit can you fill me in on the requirements a majority write must satisfy before returning to the client? Our documentation explicitly notes that with writeConcernMajorityJournalDefault set to false, acknowledged writes can be rolled back: But I don't see a corollary note regarding an explicit `{w: "majority", j: false}`: If the intention for writeConcernMajorityJournalDefault is to choose the j value for `w: "majority` writes that lack one, should we be documenting that a little more clearly as well? |