--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platf...@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/7b6f31df-2629-405d-93ce-c4cbf924a7fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
KGroupedStream<byte[], byte[]> inputStream = builder.stream(byteArraySerde, byteArraySerde, inputTopic)
.filter((key, value) -> ...)
.groupByKey(byteArraySerde, byteArraySerde);
KStream<Windowed<byte[]>, byte[]> kStream1 = inputStream.aggregate(() -> StreamAggregation.build(),
(aggKey, value, aggregation) -> StreamAggregation.aggregate(aggregation, StreamValue.getValue(value)),
TimeWindows.of(TimeUnit.MINUTES.toMillis(5)).until(TimeUnit.HOURS.toMillis(3)),
byteArraySerde,
"metrics-store-name-5m")
.toStream();
// 1 hour aggregation also on `inputStream`
KStream<Windowed<byte[]>, byte[]> kStream2 = inputStream.aggregate(() -> StreamAggregation.build(),
(aggKey, value, aggregation) -> StreamAggregation.aggregate(aggregation, StreamValue.getValue(value)),
TimeWindows.of(TimeUnit.HOURS.toMillis(1)).until(TimeUnit.HOURS.toMillis(3)),
byteArraySerde,
"metrics-store-name-1h")
.toStream().filter();kStream1.map((key, value) -> ...).filter((key, value) -> filter1 ).to(byteArraySerde, byteArraySerde, outputTopic);
kStream1.map((key, value) -> ...).filter((key, value) -> filter2 ).to(byteArraySerde, byteArraySerde, outputTopic);kStream2.map((key, value) -> ...).filter((key, value) -> filter1 ).to(byteArraySerde, byteArraySerde, outputTopic);
kStream2.map((key, value) -> ...).filter((key, value) -> filter2 ).to(byteArraySerde, byteArraySerde, outputTopic);For the stats, our cpu is always 100%. Memory usage is about 80%. Network In is about 1 MiB/Sec for the stream workers. The message injection rate is about 0.3 million messages per sec.Let me know if there is anything else I can provide.
Thanks,
Sicheng Liu
Hi,Is it window operations? Can you provide the topology that you are running?Have you had a look here for some sizing guidlines: https://docs.confluent.io/current/streams/sizing.html#stateful-applicationsDo you have any io stats?Thanks,Damian
On Sun, 24 Sep 2017 at 19:55 Sicheng Liu <lzd...@gmail.com> wrote:
Hi Confluent Platform Team,--Currently we are using Kafka Stream to do aggregations for our metrics data with 96 partitions. The topology is as simple as one source and two aggregations (using DSL). The aggregation logic is very simple: just some basic math operations like sum and max. We have already get rid of serialization/deserialization by doing byte operations. Key size is about 50 bytes after compression and value size is about 20 bytes. We run our stream workers on ec2 instances with type m4.xlarge (8 cores, 16GB memory) and the throughput we achieve is only about 4k metrics per core per second.The CPU is already 100% so increasing threads would not help. During profiling we saw that one time consuming method "rocksIterator.seek" (average 20 microsecond) but we tried to tune rocksdb with hash index and plain table but seeing no improvement. I'm not sure what I can do to improve the performance. Could you give some help?Thanks,Sicheng
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platform+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platf...@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/7b6f31df-2629-405d-93ce-c4cbf924a7fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platf...@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/058404af-c7c7-47ec-bdb1-53b9b5d2f7e9%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platform+unsub...@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.--
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/7b6f31df-2629-405d-93ce-c4cbf924a7fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platform+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/1a3b65df-788a-7013-d517-944e1f3fdeb1%40confluent.io.
>
> To post to this group, send email to
> confluent...@googlegroups.com.
>
>
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/confluent-platform/7b6f31df-2629-405d-93ce-c4cbf924a7fb%40googlegroups.com
> <https://groups.google.com/d/msgid/confluent-platform/7b6f31df-2629-405d-93ce-c4cbf924a7fb%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit
> https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
> --
> You received this message because you are subscribed to the
> Google Groups "Confluent Platform" group.
> To unsubscribe from this group and stop receiving emails from
> it, send an email to
> confluent-platform+unsub...@googlegroups.com <javascript:>.
> To post to this group, send email to
> confluent...@googlegroups.com <javascript:>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/confluent-platform/058404af-c7c7-47ec-bdb1-53b9b5d2f7e9%40googlegroups.com
> <https://groups.google.com/d/msgid/confluent-platform/058404af-c7c7-47ec-bdb1-53b9b5d2f7e9%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Confluent Platform" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to confluent-platform+unsub...@googlegroups.com
> <mailto:confluent-platform+unsub...@googlegroups.com>.