[SERVER-73623] SessionWorkflow: yield before _receiveRequest Created: 05/Feb/23  Updated: 29/Oct/23  Resolved: 05/Feb/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.3.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Billy Donahue Assignee: Billy Donahue
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2023-02-05-11-10-04-354.png     PNG File image-2023-02-05-11-10-10-843.png     PNG File newplot (4).png     PNG File screenshot-1.png    
Issue Links:
Depends
Problem/Incident
Related
related to SERVER-73699 SessionWorkflow improvements Closed
Backwards Compatibility: Fully Compatible
Sprint: Service Arch 2023-02-06
Participants:
Linked BF Score: 120

 Description   

1-line change to fix BF-27452, increased long tail latency.

From associated code comment with this fix:

+            // Yield here to avoid pinning the CPU. Give other threads some CPU
+            // time to avoid a spiky latency distribution (BF-27452). Even if
+            // this client can run continuously and receive another command
+            // without blocking, we yield anyway. We WANT context switching, and
+            // we're trying deliberately to make it happen, to reduce long tail
+            // latency.
+            _yieldPointReached();
             _receiveRequest();



 Comments   
Comment by Githook User [ 05/Feb/23 ]

Author:

{'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}

Message: SERVER-73623 SessionWorkflow: yield before _receiveRequest
Branch: master
https://github.com/mongodb/mongo/commit/05d43c57b34f3a09ca163e184212b64bded39bad

Comment by Billy Donahue [ 05/Feb/23 ]

https://spruce.mongodb.com/task/performance_linux_wt_standalone_genny_scale_InsertRemove_patch_abf903ba3ba186de7dc4471cb63bbea212cc8330_63dedeecd6d80a0c7ce178bd_23_02_04_22_40_44/trend-charts?execution=0&sortBy=STATUS&sortDir=ASC

This 1-line change restores the latency distribution for InsertRemoveTest.Insert to its pre-SERVER-68875 shape. Better, actually. Long tail is 11% faster than it was before SERVER-68875.

Generated at Thu Feb 08 06:25:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.