kafka stream latency

2018-08-17 Thread Nan Xu
I am working on a kafka stream app, and see huge latency variance, wondering what can cause this? the processing is very simple and don't have state, linger.ms already change to 5ms. the message size is around 10K byes and published as 2000 messages/s, network is 10G. using a regular consumer wat

Re: kafka stream latency

2018-08-17 Thread Nan Xu
btw, I am using version 0.10.2.0 On Fri, Aug 17, 2018 at 2:04 PM Nan Xu wrote: > I am working on a kafka stream app, and see huge latency variance, > wondering what can cause this? > > the processing is very simple and don't have state, linger.ms already > change to 5ms.

Re: kafka stream latency

2018-08-18 Thread Nan Xu
latency spikes original on write and not on read: you might > want to have a look into Kafka Streams JMX metric to see if processing > latency spikes or throughput drops. > > Also watch for GC pauses in the JVM. > > Hope this helps. > > > -Matthias > > On 8/1

Re: kafka stream latency

2018-08-19 Thread Nan Xu
RUNNING since only after > that the streams client will start to process the first record. > > > Guozhang > > > On Sat, Aug 18, 2018 at 8:52 PM, Nan Xu wrote: > > > thanks, which JMX properties indicate "processing latency spikes" / > > "through

Re: kafka stream latency

2018-08-19 Thread Nan Xu
; only the latter has rebalance process, while the Kafak brokers do not > really have "rebalances" except balancing load by migrating partitions. > > Guozhang > > > > On Sun, Aug 19, 2018 at 7:47 PM, Nan Xu wrote: > > > right, so my kafka cluster is alr

Re: Kafka issue

2018-08-19 Thread Nan Xu
I did several test. one is with 10 brokers (remote server), one with 3 brokers. (local docker) both exhibit the same behavior, I was thinking the same but from at least the kafka log, I don't see a rebalance happening. and I am sure my cpu is only used about half. and all broker still running.

Re: Kafka issue

2018-08-19 Thread Nan Xu
more expecting 100,000 m/s and less than 10ms latency for a single powerful broker. Nan On Mon, Aug 20, 2018 at 12:45 AM Nan Xu wrote: > I did several test. one is with 10 brokers (remote server), > one with 3 brokers. (local docker) > > both exhibit the same behavior, I was thinking

Re: kafka stream latency

2018-08-22 Thread Nan Xu
ds). Is that aligned > with the frequency you observe latency spikes? > > > Guozhang > > > On Sun, Aug 19, 2018 at 10:41 PM, Nan Xu wrote: > > > did more test and and make the test case simple. > > all the setup now is a single physical machine. running 3 docker &g

kafka local single partition, what's the limit?

2018-08-22 Thread Nan Xu
I setup a local single node test. producer and broker are sitting at the same VM. broker only has a single node(localhost) and a single partition. producer produce message as fast as it could in a single thread. all update to a SINGLE key(String). the kafka broker data directory is memory based dir

Re: kafka local single partition, what's the limit?

2018-08-22 Thread Nan Xu
r hard drive bandwidth ? So you can take a look at your iostats > > -- > Sent from my iPhone > > On Aug 22, 2018, at 8:20 PM, Nan Xu wrote: > > I setup a local single node test. producer and broker are sitting at the > same VM. broker only has a single node(localhost) and

Re: kafka stream latency

2018-08-23 Thread Nan Xu
> > > > which is pure stateless, committing will not touch on an state directory at > all. Hence committing only involves committing offsets to Kafka. > > > Guozhang > > > On Wed, Aug 22, 2018 at 8:11 PM, Nan Xu wrote: > > > I

Re: kafka stream latency

2018-08-24 Thread Nan Xu
ker machine? it’s > a > > Linux kernel parameter. > > > > -Sudhir > > > > > On Aug 23, 2018, at 4:46 PM, Nan Xu wrote: > > > > > > I think I found where the problem is, how to solve and why, still not > > sure. > > > > > >

kafka stream latency

2018-08-24 Thread Nan Xu
Hi Guozhang, Here is the very simple kafka producer/consumer/stream app, using the latest version and just create 2 topics input and output all component are just running on localhost. Thanks, Nan -Original Message- From: Nan Xu [mailto:nanxu1...@gmail.com] Sent: Friday

Re: kafka stream latency

2018-08-25 Thread Nan Xu
void spaceMessageWithInterval(){ int i =0 ; long baseTime = System.nanoTime(); long doneTime = baseTime + duration; while(true) { task.run(); pubTime.add(System.nanoTime()); long targetTime = System.nanoTime() + interval; i

Re: kafka stream latency

2018-08-25 Thread Nan Xu
maybe easier to use github. https://github.com/angelfox123/kperf On Sat, Aug 25, 2018 at 8:43 PM Nan Xu wrote: > so I did upgrade to 2.0.0 and still seeing the same result. below is the > program I am using. I am running everything on a single server. (centos 7, > 24 core, 32

Re: kafka stream latency

2018-08-28 Thread Nan Xu
tly what is the root cause: the > community can share with your some past experience and a few quick hinters, > but most likely the issue varies case by case and hence can only be fully > understandable by yourself. > > > Guozhang > > On Sat, Aug 25, 2018 at 6:58 PM, Nan Xu wro

kafka stream depends on it's own derived table

2019-01-28 Thread Nan Xu
hi, I was writing a simple stream app, all it does is producer send a sequence of path and value, for example path /0 , value 1 path /0/1, value 2 path /0/1/2, value 3 and kafka stream take those input and produce a ktable store. There is a rule. if parent path is not exist, then child can not i

kstream transform forward to different topics

2019-02-06 Thread Nan Xu
when I do the transform, for a single input record, I need to output 3 different records, those 3 records are in different classes. I want to send the each type of records to a separate topic, my understanding is I should use context.forward inside the transformer like Transformer{.. context.fo

Re: kstream transform forward to different topics

2019-02-07 Thread Nan Xu
the parent node of all 3 sink nodes. > Then in your Transformer, you can forward the key-value pairs by using one > of two approaches. > > Sending to all child nodes with this call: > > context().forward(key, value, To.all()). > > Or by listing each child node individually like so &g

Re: kstream transform forward to different topics

2019-02-07 Thread Nan Xu
I, sorry if I > > didn't make this clear from before. > > > > Thanks, > > Bill > > > > On Thu, Feb 7, 2019 at 10:41 AM Nan Xu wrote: > > > >> thanks, just to make sure I understand this correctly,. > >> > >> I have some proce

Re: kstream transform forward to different topics

2019-02-07 Thread Nan Xu
0).to("topic1"..); > val allStreams(1).to("topic2"..); > val allStreams(2).to("topic3"..); > > HTH, > Bill > > > > On Thu, Feb 7, 2019 at 11:51 AM Nan Xu wrote: > > > hmm, but my DSL logic at beginning involve some join between di

Re: kstream transform forward to different topics

2019-02-07 Thread Nan Xu
[2] > > https://cwiki.apache.org/confluence/display/KAFKA/KIP-313%3A+Add+KStream.flatTransform+and+KStream.flatTransformValues > > > Guozhang > > On Thu, Feb 7, 2019 at 12:59 PM Nan Xu wrote: > > > awesome, this solution is great, thanks a lot. > > > > Nan &

Can I query ktable/stream/store with SQL like statment.

2019-02-12 Thread Nan Xu
Hi, Just wondering if there is a way to do a sql like "select key, value.fieild1 from ktable where key like abc%" The purpose of this to select some value from a ktable without a fully defined key. Store.all then filter on them would be very inefficient if store is big. Thanks, Nan

Re: Can I query ktable/stream/store with SQL like statment.

2019-02-13 Thread Nan Xu
ore > false positives. > > Also, this only work for prefix queries, ie, if you query with a know > prefix of the key. > > Hope this helps. > > -Matthias > > On 2/12/19 8:25 AM, Nan Xu wrote: > > Hi, > > > > Just wondering if there is a way to do a s

what's in the rocksdb in the tmp dir?

2019-02-20 Thread Nan Xu
just a general question about the rocksdb in the Kafka stream, I see there is a folder at /tmp/kafka-stream/, which is used by the rocksdb in the kafka stream. so when a stream app get restarted, can the store data directly loaded from this folder? because I see there is very heavy traffic on the n

kafka stream. streams.allMetadata() get nothing back.

2019-02-27 Thread Nan Xu
hi, trying the following program and want to see the metadata for test_store, and nothing get back, the val metaIter = streams.allMetadata().iterator() size is 0. I can see data in the store though, but I need metadata so when I have multiple instance running. I can find the right store. is th

Re: kafka latency for large message

2019-03-18 Thread Nan Xu
anyone can give some suggestion? or an explanation why kafka give a big latency for large payload. Thanks, Nan On Thu, Mar 14, 2019 at 3:53 PM Xu, Nan wrote: > Hi, > > We are using kafka to send messages and there is less than 1% of > message is very big, close to 30M. understanding kafka i

Re: kafka latency for large message

2019-03-19 Thread Nan Xu
that's very good information from the slides, thanks. Our design to use kafka has 2 purpose. one is use it as a cache, we use ktable for that purpose, second purpose is use as message delivery mechanism to send it to other system. Because we very much care the latency, the ktable with a compact top