<p>
        If for some reason (for example, here my socket send function in <span style="color:#0550AE;font-family:ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;font-size:12px;white-space:pre;background-color:#FFFFFF;">print_message </span>is blocked and the Babeltrace2 may be suspended), the speed of the <span style="font-family:arial, helvetica, sans-serif;white-space:normal;">reader (babeltrace2)</span> cannot keep up with the speed of the <span style="font-family:arial, helvetica, sans-serif;white-space:normal;">producer(lttng/lttng-consumerd)</span>, can the size of this buffer(<span style="font-family:arial, helvetica, sans-serif;white-space:normal;">"lttng-relayd" )</span> be set? How much data can it store?
</p>
<p>
        Looking forward to your reply!
</p>
<p>
        thx
</p>
<p>
        Yuhua
</p>
<p>
        <br>
</p>
<blockquote name="replyContent" class="ReferenceQuote" style="padding-left:5px;margin-left:5px;border-left:#b6b6b6 2px solid;margin-right:0;">
        -----原始邮件-----<br>
<b>发件人:</b><span id="rc_from">"Jonathan Rajotte-Julien" <jonathan.rajotte-julien@efficios.com></span><br>
<b>发送时间:</b><span id="rc_senttime">2022-03-09 00:39:01 (星期三)</span><br>
<b>收件人:</b> "熊毓华" <xiongyuhua@zju.edu.cn><br>
<b>抄送:</b> lttng-dev <lttng-dev@lists.lttng.org>, "Mathieu Desnoyers" <mathieu.desnoyers@efficios.com>, ychen@northwestern.edu<br>
<b>主题:</b> Re: In lttng-live mode, if the printing speed cannot keep up with the generation speed of the parsed ctf data, where will the data be stored?<br>
<br>
        <div style="font-family:arial, helvetica, sans-serif;font-size:12pt;color:#000000;">
                <div>
                        Hi<br>
                </div>
                <div data-marker="__QUOTED_TEXT__">
                        <blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">
                                <p>
                                        <span style="font-size:14px;white-space:normal;">I wonder if my socket recv function is blocked on the other end, causing the socket send function to block in <span style="color:#0550ae;font-family:'ui-monospace' , 'sfmono-regular' , 'sf mono' , 'menlo' , 'consolas' , 'liberation mono' , monospace;font-size:12px;white-space:pre;background-color:#ffffff;">print_message </span>function in babeltrace2;or when printing to the console, the printing speed can't keep up with the <span style="font-size:14px;white-space:normal;">parsed CTF </span>data generation speed and the print buffer is also full.</span> 
                                </p>
                                <p>
                                        <span style="font-size:14px;">In this case, how will Babeltrace2 handle the parsed CTF data that has not been sent yet, store them in a buffer, a queue or just discard them? Or would the blocking directly cause LTTng to discard the original CTF data at the ring buffer before LTTng Consumer daemon?</span>
                                </p>
                        </blockquote>
                        <div>
                                <br>
                        </div>
                        <div>
                                Not sure I understand your setup but when using lttng-live, you are effectively reading from the data that lttng-relayd is collecting, piece by piece.
                        </div>
                        <div>
                                The producing side is not affected by the speed at which the reader (babeltrace2) consume data from lttng-relayd using the lttng-live protocol.
                        </div>
                        <div>
                                There might be some corner case here and there but for most base usage of the "live" feature reader (babeltrace2) and producer(lttng/lttng-consumerd)
                        </div>
                        <div>
                                are "decoupled". You can consider the "lttng-relayd" (and the trace on the filesystem) as the "buffer" here.
                        </div>
                </div>
        </div>
</blockquote>