[ 
https://issues.apache.org/jira/browse/CASSANDRA-11303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15314148#comment-15314148
 ] 

Paulo Motta commented on CASSANDRA-11303:
-----------------------------------------

Thanks for the update [~skonno]! This looks good and we're getting close, just 
a few minor nits:
* Rename StorageService.(get/set)(Inbound/Outbound)StreamThroughputMbPerSec to 
be consistent with 
DatabaseDescriptor.(get/set)StreamThroughput(Inbound/Outbound)MegabitsPerSec 
(even though it's a bit uglier, it's been there first so we should probably 
keep it)
* Add stream_throughput_inbound_megabits_per_sec to inter_dc_stream_throughput* 
property description on cassandra.yaml
* Add deprecation javadoc to deprecated StorageServiceMBean methods (see 
forceRepairAsync for example)
* remove additional spaces from  throw new IOException("CF   "    + cfId + " 
was dropped during streaming");
* It seems your IDE removed static qualifiers on StreamReader constants and 
static methods
* Keep old methods on NodeProbe (add deprecation flag) in case they're used 
externally
* Right now we're only setting the throughput when the rate limiter is created, 
but we must also update it on StorageService.set*StreamThroughput methods, so 
the new rate is valid for ongoing streams. We can probably simplify this to set 
the rate only on static initialization and when set*StreamThroughput methods 
are called for dynamic updating.
** After this we can probably get rid of specific Inbound/Outbound and have 
just a single StreamRateLimiter that is created with a limiter/interDcLimiter 
by the factory method

I tested the patch locally with default settings (25MiB/s) vs throttling 
inbound at 5MiB/s and worked like a charm (attached bmon output). I will test 
updating it dynamically during ongoing stream with the new version.

I also submitted dtests and unit tests on CI:

||trunk||
|[branch|https://github.com/apache/cassandra/compare/trunk...pauloricardomg:trunk-11303]|
|[testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-trunk-11303-testall/lastCompletedBuild/testReport/]|
|[dtest|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-trunk-11303-dtest/lastCompletedBuild/testReport/]|

> New inbound throughput parameters for streaming
> -----------------------------------------------
>
>                 Key: CASSANDRA-11303
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11303
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Configuration
>            Reporter: Satoshi Konno
>            Priority: Minor
>         Attachments: 11303_inbound_limit_debug_20160419.log, 
> 11303_inbound_nolimit_debug_20160419.log, 
> 11303_inbound_patch_for_trunk_20160419.diff, 
> 11303_inbound_patch_for_trunk_20160525.diff, 
> 200vs40inboundstreamthroughput.png, cassandra_inbound_stream.diff
>
>
> Hi,
> To specify stream throughputs of a node more clearly, I would like to add the 
> following new inbound parameters like existing outbound parameters in the 
> cassandra.yaml.
> - stream_throughput_inbound_megabits_per_sec
> - inter_dc_stream_throughput_outbound_megabits_per_sec  
> We use only the existing outbound parameters now, but it is difficult to 
> control the total throughputs of a node. In our production network, some 
> critical alerts occurs when a node exceed the specified total throughput 
> which is the sum of the input and output throughputs.
> In our operation of Cassandra, the alerts occurs during the bootstrap or 
> repair processing when a new node is added. In the worst case, we have to 
> stop the operation of the exceed node.
> I have attached the patch under consideration. I would like to add a new 
> limiter class, StreamInboundRateLimiter, and use the limiter class in 
> StreamDeserializer class. I use Row::dataSize( )to get the input throughput 
> in StreamDeserializer::newPartition(), but I am not sure whether the 
> dataSize() returns the correct data size.
> Can someone please tell me how to do it ?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to