You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Stephen Cresswell <st...@gmail.com> on 2016/12/08 15:21:59 UTC

kafka commands taking a long time

I followed the quickstart instructions at
https://kafka.apache.org/quickstart and everything seems to be working ok,
except that commands take a long time to run, e.g.

$ time bin/kafka-topics.sh --list --zookeeper localhost:2181

real 0m11.751s
user 0m1.540s
sys 0m0.273s

The zookeeper logging shows that the request is processed in a few
milliseconds, so I think it's related to the kafka JVM configuration. If I
remove com.sun.management.jmxremote it's takes 6 seconds but this is still
much longer than I would have expected.

Any suggestions on how to speed things up?

Re: kafka commands taking a long time

Posted by Gwen Shapira <gw...@confluent.io>.
Interesting. Your sys time is sub-sec and user-time is 1s (which is what
I'm seeing), but "real" time is 11 sec which is really significant.
Is the machine super loaded, or running something at a high priority that
prevents you from accessing CPU?

Maybe you can check the system load with vmstat or top

Gwen

On Thu, Dec 8, 2016 at 7:21 AM, Stephen Cresswell <
stephen.cresswell@gmail.com> wrote:

> I followed the quickstart instructions at
> https://kafka.apache.org/quickstart and everything seems to be working ok,
> except that commands take a long time to run, e.g.
>
> $ time bin/kafka-topics.sh --list --zookeeper localhost:2181
>
> real 0m11.751s
> user 0m1.540s
> sys 0m0.273s
>
> The zookeeper logging shows that the request is processed in a few
> milliseconds, so I think it's related to the kafka JVM configuration. If I
> remove com.sun.management.jmxremote it's takes 6 seconds but this is still
> much longer than I would have expected.
>
> Any suggestions on how to speed things up?
>



-- 
*Gwen Shapira*
Product Manager | Confluent
650.450.2760 | @gwenshap
Follow us: Twitter <https://twitter.com/ConfluentInc> | blog
<http://www.confluent.io/blog>

Re: kafka commands taking a long time

Posted by Apurva Mehta <ap...@confluent.io>.
That is certainly odd. What's the latency when using the kafka console
producers and consumers? Is it much faster? If it is, I would just strace
the kafka-topics command to see where it is spending the time.

On Thu, Dec 8, 2016 at 7:21 AM, Stephen Cresswell <
stephen.cresswell@gmail.com> wrote:

> I followed the quickstart instructions at
> https://kafka.apache.org/quickstart and everything seems to be working ok,
> except that commands take a long time to run, e.g.
>
> $ time bin/kafka-topics.sh --list --zookeeper localhost:2181
>
> real 0m11.751s
> user 0m1.540s
> sys 0m0.273s
>
> The zookeeper logging shows that the request is processed in a few
> milliseconds, so I think it's related to the kafka JVM configuration. If I
> remove com.sun.management.jmxremote it's takes 6 seconds but this is still
> much longer than I would have expected.
>
> Any suggestions on how to speed things up?
>