[
https://issues.apache.org/jira/browse/ARTEMIS-1095?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15958881#comment-15958881
]
ASF GitHub Bot commented on ARTEMIS-1095:
-----------------------------------------
Github user franz1981 commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/1176#discussion_r110154545
--- Diff:
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
---
@@ -183,6 +187,10 @@
public static final int DEFAULT_TCP_RECEIVEBUFFER_SIZE = 1024 * 1024;
+ public static final int DEFAULT_NETTY_WRITE_BUFFER_LOW_WATER_MARK = 32
* 1024;
--- End diff --
In theory the 2 values are not dependent: TCP will fragment the data if
bigger than its MTU (1460 bytes for Ethernet + TCPv4), hence you could have any
size for the TCP buffer (>=MTU AFAIK).
The water marks values affect only the buffering performed by Netty and how
many times it will call channelWritabilityChanged, dependently by our writing
rate and size.
By consequence it will change how many times channel::isWritable will be
true.
I've used the doc and
http://normanmaurer.me/presentations/2014-twitter-meetup-netty/slides.html#9.0
and
http://normanmaurer.me/presentations/2014-twitter-meetup-netty/slides.html#10.0
to have an idea about it.
> Netty's WriteBufferWaterMark configuration via TransportConstants
> -----------------------------------------------------------------
>
> Key: ARTEMIS-1095
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1095
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: Broker
> Reporter: Francesco Nigro
> Assignee: Francesco Nigro
> Priority: Minor
>
> By default Netty uses the write buffer high/low water mark to perform flow
> control while on the event loop.
> Currently these properties are not set in Artemis, that is not being flow
> controlled properly and is not seeing correct activation of the ReadyListener
> on NettyConnection when it is considered writable.
> I propose to define TransportConstants.NETTY_WRITE_BUFFER_LOW_WATER_MARK and
> TransportConstants.NETTY_WRITE_BUFFER_HIGH_WATER_MARK to set the Netty's ones.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)