Yeah, joining on the producer side and then splitting data on consumer side makes all operations more complicated (and possibly with higher resource consumption than using a couple more cores to upload data (see below).
Anyway, a few updates from my end - after getting rather abysmal performance even with actor implementation (about 100/s, with extremely high CPU/RAM usage - questionable if it could be used in long-term scenario, but I didn’t really do much optimising on this approach), I moved testing to Amazon and used c1.xlarge EC2 instance for testing (
http://www.ec2instances.info/?filter=c1.xlarge) and performance boost was huge - all of this is from default plugin implementation where I was getting about 5 puts/s from my machine, not with my celluloid actor experiment.
First I started experimenting with num_threads parameter:
http://imgur.com/JqsvmAH
From left to right: 1000, 1, 10, 100, 500, 2000
The increase of about 5k puts/s came after switching off dummer (
https://github.com/sonots/dummer) that I used for performance testing - at that point fluentd was no longer ingesting any data and was just processing queue. In all instances I was pushing in 2k records a second.
While not completely obvious from this photo (if anyone interested I can upload detailed pics), the upload speed was highest and most consistent with num_threads=100.
I didn’t experiment with exact value of num_threads any further so maybe there could be some increase still.
So, num_threads=100 gave us about 450 puts/s at which point we got CPU bounded - network was basically sleeping (500KB or something?), RAM was also under no serious stress.
Next stop - multithread plugin. Started with quad core config, figured that machine can take some more, switched to 8-core configuration, each core was pushing a bit less then 450 puts/s (about 350?), so in total about 2700 puts/s.
So yeah, current fluentd to kinesis plugin can achieve quite good throughput (of course, if we/you can optimise, so much the better - Imai, if you need some help do tell), but for really fast upload from a single instance do make sure you are pushing data from EC2 (or be ready to have lots of serves pushing data).
Cheers,
Urban
On 28 Aug 2014, at 03:06, yuta imai <
imai.f...@gmail.com> wrote:
> Hi, sorry about my delayed involvement.
> I'm one of the developer of the plugin.
>
> Currently I'm working on multi-threaden the plugin.
> Also I have considered about merging records on client side, however as Urban mentioned, it may cause some partition key issue. I think plugin should emit each individual record to Kinesis, not to make consumers complicated.
>
> Regarding AWS SDK for Ruby, itself does not have kind of multh-thread or async put method.( Actually it has interface to implement it, it's like this:
https://github.com/JoshMcKin/em_aws )
>
> Thanks
> -Yuta
>
>
>
>
> 2014-08-25 18:25 GMT+09:00 Kazuki Ohta <
k...@treasure-data.com>:
> Maybe you can increase 'num_threads' parameter, to get more parallelism. However, batch insert is the ideal solution anyway. Thanks -K
>
>
>
> ==
> Kazuki Ohta | Founder and CTO, Treasure Data
> Cell:
+1-650-223-5679
>
k...@treasure-data.com |
www.treasuredata.com
> Follow us:
>
>
>