You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is odd throttling behavior on some of the requests sent from DevTools when running DWDS with spawnDds set to true.
I’m measuring the time for each of the stream requests here to complete.
With spawnDds set to true, the first few requests complete relatively quickly (100 ms), and the others are significantly slower (300 ms).
STREAM Debug: 132 ms
STREAM Extension: 134 ms
STREAM GC: 317 ms
STREAM Isolate: 317 ms
STREAM Logging: 317 ms
STREAM Stderr: 317 ms
STREAM Stdout: 318 ms
STREAM Timeline: 318 ms
STREAM VM: 318 ms
STREAM Service: 318 ms
With spawnDds set to false, all of the requests take around 200 ms.
STREAM Debug: 167 ms
STREAM Extension: 167 ms
STREAM GC: 199 ms
STREAM Isolate: 200 ms
STREAM Logging: 201 ms
STREAM Stderr: 201 ms
STREAM Stdout: 202 ms
STREAM Timeline: 202 ms
STREAM VM: 203 ms
STREAM Service: 206 ms
@elliette can you try adding a 1s delay between the stream listen requests and see if those times go down? There's some synchronization logic around the stream management which might be slowing things down.
Hi! Sure, here are the times with and without a 1 second delay between them. It does look like the times go down.
Without a delay:
--- STREAM Debug: 129 ms
--- STREAM Extension: 131 ms
--- STREAM GC: 319 ms
--- STREAM Isolate: 325 ms
--- STREAM Logging: 326 ms
--- STREAM Stderr: 326 ms
--- STREAM Stdout: 326 ms
--- STREAM Timeline: 326 ms
--- STREAM VM: 327 ms
--- STREAM Service: 327 ms
STREAMS TOTAL: 327 ms
With a 1 second delay:
--- STREAM Debug: 101 ms
--- STREAM Extension: 103 ms
--- STREAM GC: 96 ms
--- STREAM Isolate: 104 ms
--- STREAM Logging: 99 ms
--- STREAM Stderr: 95 ms
--- STREAM Stdout: 111 ms
--- STREAM Timeline: 159 ms
--- STREAM VM: 168 ms
--- STREAM Service: 104 ms
STREAMS TOTAL: 11151 ms
Yeah, that makes sense then. We're seeing some lock contention here. I can probably make this synchronization a bit smarter so we only ever lock around streamListen when there's an outstanding streamCancel, since streamCancel can put us in a bad state if it runs while we're in the middle of processing a streamListen on the same stream.
Activity
annagrin commentedon Aug 31, 2021
/cc @bkonyi
BTW the first few shorter
streamListencalls are short because they are cached by DDS.bkonyi commentedon Aug 31, 2021
@elliette can you try adding a 1s delay between the stream listen requests and see if those times go down? There's some synchronization logic around the stream management which might be slowing things down.
elliette commentedon Aug 31, 2021
Hi! Sure, here are the times with and without a 1 second delay between them. It does look like the times go down.
Without a delay:
With a 1 second delay:
bkonyi commentedon Aug 31, 2021
Yeah, that makes sense then. We're seeing some lock contention here. I can probably make this synchronization a bit smarter so we only ever lock around
streamListenwhen there's an outstandingstreamCancel, sincestreamCancelcan put us in a bad state if it runs while we're in the middle of processing astreamListenon the same stream.