Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] get the connection events of clients

----- Original Message -----
> From: "Karl Palsson" <karlp@xxxxxxxxxxxx>
> To: "General development discussions for the mosquitto project" <mosquitto-dev@xxxxxxxxxxx>
> Sent: Saturday, 15 September, 2018 16:44:55
> Subject: Re: [mosquitto-dev] get the connection events of clients
>
>> 
>> Mosquitto doesn't flush the buffer after each line
>> unfortunately.
> 
> It doesn't flush on every line because you don't actually want it
> to, you just believe you do. (I know, I know, everybody lives
> being spoken too)
> 
> If it was flushing all the time you'd be seeing substantially
> higher blocking io and reduced throughput on busy brokers. It's a
> log file, not an API.

Hmm, interesting. Did you do any benchmarks? I experimented with enabling the buffer (32k) on the access log of one of my Nginx servers that handles 140 requests per second, printing a line in the access log for each request. It didn't make any difference, in IOs per second, nor latency, nor CPU, nor IO throughput, nor IO utilization. My guess is as long as you don't do fsync as well, you won't see it.


Back to the top