Re: SMP: logging

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Tue, 23 Feb 2010 08:47:59 -0700

On 02/23/2010 03:45 AM, Tsantilas Christos wrote:
>> For logs, can we just use O_APPEND and have each process write to the
>> logs as we do now?
>
> It will work. An alternative method is:
> - use an external logging process
> - squid child and parent processes share a pipe to the logging process.
> It will work because multiple process can share a pipe where there are
> multiple writers and one reader (the logging process).
> This will simplify the rotation too.

Let's compare the pros of a dedicated logging daemon with those of O_APPEND.

Daemon: Simplifies log rotation implementation.

O_APPEND: Minimizes performance overheads. Simplifies record logging
implementation. No single point of failure or blocking.

To me, it seems like O_APPEND is a better way to go unless log rotation
becomes way too complex (I do not think it does). For the use case,
consider four or more Squid processes logging 2,000 requests per second.

Alex.
Received on Tue Feb 23 2010 - 15:48:21 MST

This archive was generated by hypermail 2.2.0 : Wed Feb 24 2010 - 12:00:10 MST