You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Jakes John <ja...@gmail.com> on 2017/08/15 19:15:52 UTC

Log flush

During my Kafka installation,  I got some questions with some of the
parameter configurations

 I see that log.flush.interval.messages and log.flush.interval.ms are
commented out in the default kafka server properties file. I read two
conflicting statements about these parameters. In one place, I read that it
is recommended not to configure these parameters. While in the other, it
says that flush time should not be huge else it will affect the
performance.   What is the best configuration and recommended way? When do
I need to configure these parameters and what is the default behaviour?

Re: Log flush

Posted by Kamal C <ka...@gmail.com>.
If you've noticed the default values of the above configuration, it's
Long.MAX_VALUE.

This is set to discourage the users not to edit / re-configure it. The
above configuration
is to flush the messages from the cache to the disk (fsync). Kafka
delegates the task of
flushing the messages to disk to the OS Kernel. This is done to maintain
faster read &
write performance.

Kafka doesn't rely on `fsync` for message durability. Instead, it relies on
it's own replicated
change-logs located in other brokers.

-- Kamal

On Wed, Aug 16, 2017 at 12:45 AM, Jakes John <ja...@gmail.com>
wrote:

> During my Kafka installation,  I got some questions with some of the
> parameter configurations
>
>  I see that log.flush.interval.messages and log.flush.interval.ms are
> commented out in the default kafka server properties file. I read two
> conflicting statements about these parameters. In one place, I read that it
> is recommended not to configure these parameters. While in the other, it
> says that flush time should not be huge else it will affect the
> performance.   What is the best configuration and recommended way? When do
> I need to configure these parameters and what is the default behaviour?
>