{"action":"created","issue":{"url":"https://api.github.com/repos/netty/netty/issues/3860","labels_url":"https://api.github.com/repos/netty/netty/issues/3860/labels{/name}","comments_url":"https://api.github.com/repos/netty/netty/issues/3860/comments","events_url":"https://api.github.com/repos/netty/netty/issues/3860/events","html_url":"https://github.com/netty/netty/pull/3860","id":85231480,"number":3860,"title":"Make the flow-controllers more 'batchy'","user":{"login":"louiscryan","id":9046588,"avatar_url":"https://avatars.githubusercontent.com/u/9046588?v=3","gravatar_id":"","url":"https://api.github.com/users/louiscryan","html_url":"https://github.com/louiscryan","followers_url":"https://api.github.com/users/louiscryan/followers","following_url":"https://api.github.com/users/louiscryan/following{/other_user}","gists_url":"https://api.github.com/users/louiscryan/gists{/gist_id}","starred_url":"https://api.github.com/users/louiscryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/louiscryan/subscriptions","organizations_url":"https://api.github.com/users/louiscryan/orgs","repos_url":"https://api.github.com/users/louiscryan/repos","events_url":"https://api.github.com/users/louiscryan/events{/privacy}","received_events_url":"https://api.github.com/users/louiscryan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/netty/netty/labels/feature","name":"feature","color":"009800"},{"url":"https://api.github.com/repos/netty/netty/labels/improvement","name":"improvement","color":"0052cc"}],"state":"open","locked":false,"assignee":{"login":"Scottmitch","id":7562868,"avatar_url":"https://avatars.githubusercontent.com/u/7562868?v=3","gravatar_id":"","url":"https://api.github.com/users/Scottmitch","html_url":"https://github.com/Scottmitch","followers_url":"https://api.github.com/users/Scottmitch/followers","following_url":"https://api.github.com/users/Scottmitch/following{/other_user}","gists_url":"https://api.github.com/users/Scottmitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Scottmitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Scottmitch/subscriptions","organizations_url":"https://api.github.com/users/Scottmitch/orgs","repos_url":"https://api.github.com/users/Scottmitch/repos","events_url":"https://api.github.com/users/Scottmitch/events{/privacy}","received_events_url":"https://api.github.com/users/Scottmitch/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/netty/netty/milestones/117","html_url":"https://github.com/netty/netty/milestones/4.1.0.Beta6","labels_url":"https://api.github.com/repos/netty/netty/milestones/117/labels","id":1100817,"number":117,"title":"4.1.0.Beta6","description":"","creator":{"login":"normanmaurer","id":439362,"avatar_url":"https://avatars.githubusercontent.com/u/439362?v=3","gravatar_id":"","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},"open_issues":66,"closed_issues":27,"state":"open","created_at":"2015-05-07T19:29:09Z","updated_at":"2015-06-10T17:43:52Z","due_on":null,"closed_at":null},"comments":23,"created_at":"2015-06-04T19:01:54Z","updated_at":"2015-06-11T23:01:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/netty/netty/pulls/3860","html_url":"https://github.com/netty/netty/pull/3860","diff_url":"https://github.com/netty/netty/pull/3860.diff","patch_url":"https://github.com/netty/netty/pull/3860.patch"},"body":"- Remote flow controller can merge small writes into a single DATA frame\r\n- Add listener to remote flow-controller that notifies the number of bytes written for a stream.\r\n- Local flow-controller defers writing WINDOW_UPDATE until asked to do so, this allows for a single WINDOW_UPDATE to be written per stream in a read-write cycle as opposed to one update each time the number of returned bytes triggers the threshold.\r\n\r\nThis will improve throughput in a number of ways\r\n- Coalescing payloads into a single DATA frame causes fewer onDataRead calls on the remote side\r\n- Applications can use the flow-controller listener to receive more granular notifications of written bytes rather than listening to each individual payload\r\n- Deferring WINDOW_UPDATE allows more flow-control to be returned to the remote side as all consumed bytes are returned and not just the amount consumed when the threshold was crossed.\r\n\r\nFixes\r\nhttps://github.com/netty/netty/issues/3852"},"comment":{"url":"https://api.github.com/repos/netty/netty/issues/comments/111301537","html_url":"https://github.com/netty/netty/pull/3860#issuecomment-111301537","issue_url":"https://api.github.com/repos/netty/netty/issues/3860","id":111301537,"user":{"login":"louiscryan","id":9046588,"avatar_url":"https://avatars.githubusercontent.com/u/9046588?v=3","gravatar_id":"","url":"https://api.github.com/users/louiscryan","html_url":"https://github.com/louiscryan","followers_url":"https://api.github.com/users/louiscryan/followers","following_url":"https://api.github.com/users/louiscryan/following{/other_user}","gists_url":"https://api.github.com/users/louiscryan/gists{/gist_id}","starred_url":"https://api.github.com/users/louiscryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/louiscryan/subscriptions","organizations_url":"https://api.github.com/users/louiscryan/orgs","repos_url":"https://api.github.com/users/louiscryan/repos","events_url":"https://api.github.com/users/louiscryan/events{/privacy}","received_events_url":"https://api.github.com/users/louiscryan/received_events","type":"User","site_admin":false},"created_at":"2015-06-11T23:01:39Z","updated_at":"2015-06-11T23:01:39Z","body":"Here's the numbers from the other benchmark with some payload size variety.\r\n\r\nBefore\r\n```\r\nFlowControlledMessagesPerSecondBenchmark.stream:messagesPerSecond               1            DIRECT                       1           SMALL  thrpt   20  421393.808 ± 29778.256  ops/s\r\nFlowControlledMessagesPerSecondBenchmark.stream:messagesPerSecond               1            DIRECT                       1          MEDIUM  thrpt   20  203715.454 ±  7310.145  ops/s\r\nFlowControlledMessagesPerSecondBenchmark.stream:messagesPerSecond               1            DIRECT                       1           LARGE  thrpt   20    5839.479 ±   225.818  ops/s\r\n```\r\nAfter\r\n```\r\nBenchmark                                                          (channelCount)  (clientExecutor)  (maxConcurrentStreams)  (responseSize)   Mode  Cnt       Score       Error  Units\r\nFlowControlledMessagesPerSecondBenchmark.stream:messagesPerSecond               1            DIRECT                       1           SMALL  thrpt   20  711373.623 ± 34085.676  ops/s\r\nFlowControlledMessagesPerSecondBenchmark.stream:messagesPerSecond               1            DIRECT                       1          MEDIUM  thrpt   20  261626.277 ± 13361.214  ops/s\r\nFlowControlledMessagesPerSecondBenchmark.stream:messagesPerSecond               1            DIRECT                       1           LARGE  thrpt   20    5486.760 ±   210.770  ops/s\r\n```"}}