ignore TRY_Q_BLOCK with reliable protocols - #2136
Conversation
|
I think we need to understand the 30 second delay here, as reliable transports (i.e. TCP) are supported by RFC9177. See RFC9177 Appendix B. It is possible that the delay could be the server looking up It may be that we need a way of enabling / disabling Q-Block on a per session basis. |
|
As the regular COAPS session connects without delay I guess this should not be caused by the server side. I interrupted my client during the delay and gdb showed this state: AI concluded: "The backtrace identifies the root cause: the upload session is entering coap_send_q_block1() and bulk-queuing Q-Block packets during the CSM callback." I did not verify this yet. |
|
Certainly there needs to be a CSM exchange at the start of a reliable session, there is a delay of 5 seconds if this does not happen. Using coap+tcp:// works for me with no delay. |
|
If the AI is right, this may only be a problem with large payloads? But I will try to investigate this more closely tomorrow. I have to leave now. Thank you so far! |
|
For a 50M file with no losses and #2120 |
|
Perhaps we need to add |
|
I reproduced this problem also with Without the patch, AI identified the "send" part as cause for the long delay (using custom instrumentation): It suggested to replace the |
|
This make sense now - thanks for researching into it and coming up with a fix. Scanning long chains is not ideal....... I would like to run a full regression test at my end (which takes hours) to check nothing has been introduced. |
|
The most significant performance change (large magnitudes) I have found has been to use Use of -L 7 option on both ends halves the transmission time which I was expecting (but not as much) as each block is not individually answered. I have tried doing a DL_ (double linked) version alternative fix to your tail change (which makes the code logic cleaner and more obvious), but it is a few percent slower - presumably from the maintenance of the |
Hello,
my application uses COAPS with
TRY_Q_BLOCKenabled for regular communication. For (very) large transfers, I want to open a separate TCP-based session to benefit from TCP's superior performance under packet loss. However, when using TCP in a Q-BLOCK-enabled context,coap_io_processblocks up to 30 seconds in my case before the transfer really starts. To avoid opening a separate context and as Q-Block is meant for unreliable protocols only anyways, this commit removes TRY_Q_BLOCK for sessions with reliable protocols.Thank you!