<div dir="ltr"><div>As I am researching on the flow control strategy of HTTP/2 recently. The internal buffers will show me something about it. <br></div><div><br></div><div>Thanks Valentin.</div><div><br></div><div>Best Regards</div><div>Muhui Jiang</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-10-20 0:55 GMT+08:00 Valentin V. Bartenev <span dir="ltr"><<a href="mailto:vbart@nginx.com" target="_blank">vbart@nginx.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Sunday 18 October 2015 16:02:04 Muhui Jiang wrote:<br>
> Hi<br>
><br>
> I made a request to nginx 1.9.5 for a large file. Here is a part of debug<br>
> file:<br>
><br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL buf copy: 9<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL buf copy: 8192<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL buf copy: 9<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL buf copy: 8174<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL to write: 16384<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL_write: 16384<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL buf copy: 18<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL buf copy: 9<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL buf copy: 8192<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL buf copy: 9<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL buf copy: 8156<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL to write: 16384<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL_write: 16384<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL buf copy: 36<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL buf copy: 9<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL buf copy: 8182<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL to write: 8227<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 SSL_write: 8227<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 http2:1 DATA frame<br>
> 00007F942205F7A0 was sent<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 http2 frame sent:<br>
> 00007F942205F7A0 sid:1 bl:0 len:8192<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 http2:1 DATA frame<br>
> 00007F942205F8A8 was sent<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 http2 frame sent:<br>
> 00007F942205F8A8 sid:1 bl:0 len:8192<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 http2:1 DATA frame<br>
> 00007F942205F9B0 was sent<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 http2 frame sent:<br>
> 00007F942205F9B0 sid:1 bl:0 len:8192<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 http2:1 DATA frame<br>
> 00007F942205FAB8 was sent<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 http2 frame sent:<br>
> 00007F942205FAB8 sid:1 bl:0 len:8192<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 http2:1 DATA frame<br>
> 00007F942205FBC0 was sent<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 http2 frame sent:<br>
> 00007F942205FBC0 sid:1 bl:0 len:8182<br>
><br>
> It seems that the default max frame size is 8192. But I don't under stand<br>
> the buffer mechanism. I marked them in red color. why there is a very small<br>
> buffer 9, and why some value is 8174, 8156.<br>
<br>
</div></div>You shouldn't care about these numbers as long as they are related to nginx<br>
internal buffers.<br>
<br>
9 is a buffer used for HTTP/2 header of the DATA frame (the header is always<br>
9 bytes long).<br>
<br>
8174 is the rest in the SSL buffer (see the ssl_buffer_size directive) after<br>
coping two DATA headers and 8k of one DATA frame.<br>
<br>
So the rest 18 bytes of DATA frame will be sent in the next TLS record.<br>
<span class=""><br>
<br>
><br>
> BTW: what is the 116 means in the beginning of every row as below:<br>
> 2015/10/18 15:55:34 [debug] 10707#0: *116 http2 frame sent:<br>
> 00007F942205FBC0 sid:1 bl:0 len:8182<br>
<br>
</span>It is a connection identificator for the worker process.<br>
<br>
wbr, Valentin V. Bartenev<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br></div>