Welcome! Log In Create A New Profile

Advanced

Re: logging into script

Valery Kholodkov
January 14, 2010 12:08PM
----- Dennis J. <dennisml@conversis.de> wrote:
> > It is not considered as more efficient. It may be more efficient because of
> > bulk data processing. Note also, that logged data are written to disk, but
> > are not read because they are already in OS cache: they are just copied.
> >
> > Logging to pipe is a CPU waste because it causes a lot of context switches
> > and memory copies for every log operation:
>
> Hm, interesting. I didn't know that writing to a pipe actually forces a
> context switch. I was under the impression that the writing process could
> use up it's time slice to write an arbitrary amount of data into the pipe
> and when the OS scheduler switches to the script it would read all the data
> from that pipe.
>
> The "tail -f" approach looks racy to me though. The log would grow fairly
> fast which means it would probably have to be rotated at least once per
> hour or the disk will fill up. I'm not sure how to process this rotation
> with "tail -f" without potentially missing some data.

Yes. This controversy motivated me to create UDP logger.

Although there are clean ways to do this "tail -f", there might be demand for alternative solution.

--
Regards,
Valery Kholodkov

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

logging into script

Dennis J. January 14, 2010 12:18AM

Re: logging into script

任晓磊 January 14, 2010 12:18AM

Re: logging into script

Peter Leonov January 14, 2010 01:06AM

Re: logging into script

JG January 14, 2010 03:16AM

Re: logging into script

Kruglov Eugenie January 14, 2010 03:40AM

Re: logging into script

Dennis J. January 14, 2010 07:56AM

Re: logging into script

Igor Sysoev January 14, 2010 08:56AM

Re: logging into script

Dennis J. January 14, 2010 09:54AM

Re: logging into script

Maxim Dounin January 14, 2010 10:08AM

Re: logging into script

Valery Kholodkov January 14, 2010 12:08PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 179
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready