log size handling

Mario Lobo mario.lobo at ipad.com.br
Thu Jul 17 12:29:26 UTC 2008


On Thursday 17 July 2008, Zbigniew Szalbot wrote:
> Hi,
>
> Bill Moran:
> > In response to Zbigniew Szalbot <z.szalbot at lcwords.com>:
> >> Hello,
> >>
> >> I am just wondering if for the software like Apache the log size
> >> matters at all. I rotate httpd logs monthly and each domain has its
> >> own log. One is over 145 MB in size. Just curious if I can keep it
> >> like that or should rotate more often? I have enough space on HD so
> >> the log's size is of no concern for me. I guess I am just asking
> >> for best practices advice... Thanks!
> >
> > There are potential performance issues.  I believe that appending to
> > a file becomes more expensive when a file gets very large (which is
> > obviously the scenario with log files)
>
> Thank you Bill - this is what I had in mind - whether appending to a
> large file will not be an issue? It is currently about 145MB. By the end
> of month it will surely be around 300MB.
>
> > Also, at rotation time, if you're compressing those logs it can be a
> > pretty big load to compress 145M.  If you're not compressing and not
> > moving the files to another partition when you rotate them, then this
> > part probably isn't an issue.
>
> Yes, I am compressing them. Load is not an issue yet but I want to
> optimize things that can be optimized. So I guess, rotate more often? I
> like the idea of having one monthly log because it is then processed by
> web stat software so it is easier to submit one than a couple of them.
>
> Thanks!

What would be the proper way to set the rotation of apache logs in 
newsyslog.conf when there are separate log files for each virtual host?

Do I have to rotate them myself via a script in crontab?

Thanks

-- 
Mario Lobo
Segurança de Redes - Desenvolvimento e Análise
IPAD - Instituto de Pesquisa e Apoio ao Desenvolvimento Tecnológico e 
Científico




More information about the freebsd-questions mailing list