You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by masaori335 <gi...@git.apache.org> on 2016/06/02 19:16:45 UTC

[GitHub] trafficserver pull request #693: TS-4324: Buffer responses to not send small...

GitHub user masaori335 opened a pull request:

    https://github.com/apache/trafficserver/pull/693

    TS-4324: Buffer responses to not send small size DATA frames

    If body_done flag is not marked and read available size is smaller
    than 16KB in Http2ConnectionState::send_a_data_frame(), wait until
    body_done flag is marked or read available size is over 16KB.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/masaori335/trafficserver ts-4324

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafficserver/pull/693.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #693
    
----
commit 5f6987bca382ffbdb7eb87497d2ec56be268b5b7
Author: Masaori Koshiba <ma...@apache.org>
Date:   2016-05-24T21:26:58Z

    TS-4324: Buffer responses to not send small size DATA frames
    
    If body_done flag is not marked and read available size is smaller
    than 16KB in Http2ConnectionState::send_a_data_frame(), wait until
    body_done flag is marked or read available size is over 16KB.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #693: TS-4324: Buffer responses to not send small size D...

Posted by bgaff <gi...@git.apache.org>.
Github user bgaff commented on the issue:

    https://github.com/apache/trafficserver/pull/693
  
    Agree. If we have N bytes available we should send N bytes immediately, we should never wait for more than N bytes if only N are available.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #693: TS-4324: Buffer responses to not send small size D...

Posted by masaori335 <gi...@git.apache.org>.
Github user masaori335 commented on the issue:

    https://github.com/apache/trafficserver/pull/693
  
    ## before
    ```
    $ nghttp --no-dep -vn "https://127.0.0.1:4443/stream-bytes/163840?chunk_size=16284"
    ...
    [  0.130] recv DATA frame <length=7946, flags=0x00, stream_id=1>
    [  0.130] recv DATA frame <length=8438, flags=0x00, stream_id=1>
    [  0.169] recv DATA frame <length=16375, flags=0x00, stream_id=1>
    [  0.169] recv DATA frame <length=9, flags=0x00, stream_id=1>
    [  0.206] recv DATA frame <length=16375, flags=0x00, stream_id=1>
    [  0.206] recv DATA frame <length=9, flags=0x00, stream_id=1>
    [  0.242] recv DATA frame <length=16375, flags=0x00, stream_id=1>
    [  0.242] recv DATA frame <length=9, flags=0x00, stream_id=1>
    [  0.279] recv DATA frame <length=16375, flags=0x00, stream_id=1>
    [  0.279] recv DATA frame <length=9, flags=0x00, stream_id=1>
    [  0.316] recv DATA frame <length=16375, flags=0x00, stream_id=1>
    [  0.316] recv DATA frame <length=9, flags=0x00, stream_id=1>
    [  0.325] recv DATA frame <length=4096, flags=0x00, stream_id=1>
    [  0.325] recv DATA frame <length=0, flags=0x01, stream_id=1>
              ; END_STREAM
    ...
    ```
    
    ## after
    ```
    $ nghttp --no-dep -vn "https://127.0.0.1:4443/stream-bytes/163840?chunk_size=16284"
    ...
    [  0.135] recv DATA frame <length=16375, flags=0x00, stream_id=1>
    [  0.168] recv DATA frame <length=16375, flags=0x00, stream_id=1>
    [  0.205] recv DATA frame <length=16375, flags=0x00, stream_id=1>
    [  0.241] recv DATA frame <length=16375, flags=0x00, stream_id=1>
    [  0.277] recv DATA frame <length=16375, flags=0x00, stream_id=1>
    [  0.288] recv DATA frame <length=16375, flags=0x00, stream_id=1>
    [  0.288] recv DATA frame <length=4150, flags=0x01, stream_id=1>
              ; END_STREAM
    ...
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #693: TS-4324: Buffer responses to not send small size D...

Posted by bgaff <gi...@git.apache.org>.
Github user bgaff commented on the issue:

    https://github.com/apache/trafficserver/pull/693
  
    I actually don't think we should do buffering at all. I believe the TCP implementation should be responsible for determining how the data goes over the wire.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #693: TS-4324: Buffer responses to not send small size D...

Posted by bgaff <gi...@git.apache.org>.
Github user bgaff commented on the issue:

    https://github.com/apache/trafficserver/pull/693
  
    This is undesirable for content such as HTML where it's a common pattern for pages to "early flush" so that clients can begin downloading static resources earlier (such as js/css/images).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #693: TS-4324: Buffer responses to not send small size D...

Posted by masaori335 <gi...@git.apache.org>.
Github user masaori335 commented on the issue:

    https://github.com/apache/trafficserver/pull/693
  
    Yes, this could increase time to first byte. We should send the first chunk in anyway.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request #693: TS-4324: Buffer responses to not send small...

Posted by masaori335 <gi...@git.apache.org>.
Github user masaori335 closed the pull request at:

    https://github.com/apache/trafficserver/pull/693


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #693: TS-4324: Buffer responses to not send small size D...

Posted by zwoop <gi...@git.apache.org>.
Github user zwoop commented on the issue:

    https://github.com/apache/trafficserver/pull/693
  
    I'm not saying buffering, I'm saying, use as much from what's already buffered before you send a frame. There's zero reason to send a 9 byte frame, which could theoretically become TCP packet with 9 byte body, right ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #693: TS-4324: Buffer responses to not send small size D...

Posted by masaori335 <gi...@git.apache.org>.
Github user masaori335 commented on the issue:

    https://github.com/apache/trafficserver/pull/693
  
    OK, I'll close this and think this issue again.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---