RE: Concurrency and performance degradation

2003-11-21 Thread Shapira, Yoav

Howdy,

There is anyway to improve the performance in a concurrency environment
(maybe defining a buffer size and have only one thread writing to the
file
and to the console? ) and prevent this concurrency problems?
If, instead of having the logger for each class as a static variable,
if i
have a Logger instance for each instance of each class (as an instance
variable), the performance is improved?

No, keep one instance per class.

Consider using the AsyncAppender or writing a buffered appender like the
SMTPAppender.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Concurrency and performance degradation

2003-11-21 Thread Campos Rui Oliveira
Hi.

Thanks for the reply.

What are the implications of using an AsyncAppender? With AsyncAppender don't i have 
an high probability of get a confused log with lines cutted at half by other lines 
that are being added?

Rui Campos

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: 21 November 2003 16:37
To: Log4J Users List
Subject: RE: Concurrency and performance degradation



Howdy,

There is anyway to improve the performance in a concurrency environment
(maybe defining a buffer size and have only one thread writing to the
file
and to the console? ) and prevent this concurrency problems?
If, instead of having the logger for each class as a static variable,
if i
have a Logger instance for each instance of each class (as an instance
variable), the performance is improved?

No, keep one instance per class.

Consider using the AsyncAppender or writing a buffered appender like the
SMTPAppender.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Concurrency and performance degradation

2003-11-21 Thread Shapira, Yoav

Howdy,
I don't know, I haven't used it, as I haven't found the need for it.
What I do in high-load environment is surround INFO and DEBUG level
statements with is-enabled checks (Logger.isDebugEnabled() etc.), which
reduces their overhead by nearly 100%.  I don't have INFO and DEBUG
enabled in production, so I don't suffer from high load at all.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Campos Rui Oliveira [mailto:[EMAIL PROTECTED]
Sent: Friday, November 21, 2003 11:57 AM
To: Log4J Users List
Subject: RE: Concurrency and performance degradation

Hi.

Thanks for the reply.

What are the implications of using an AsyncAppender? With AsyncAppender
don't i have an high probability of get a confused log with lines
cutted at
half by other lines that are being added?

Rui Campos

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: 21 November 2003 16:37
To: Log4J Users List
Subject: RE: Concurrency and performance degradation



Howdy,

There is anyway to improve the performance in a concurrency
environment
(maybe defining a buffer size and have only one thread writing to the
file
and to the console? ) and prevent this concurrency problems?
If, instead of having the logger for each class as a static variable,
if i
have a Logger instance for each instance of each class (as an instance
variable), the performance is improved?

No, keep one instance per class.

Consider using the AsyncAppender or writing a buffered appender like
the
SMTPAppender.

Yoav Shapira



This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
proprietary and/or privileged.  This e-mail is intended only for the
individual(s) to whom it is addressed, and may not be saved, copied,
printed, disclosed or used by anyone else.  If you are not the(an)
intended
recipient, please immediately delete this e-mail from your computer
system
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Concurrency and performance degradation

2003-11-21 Thread Horst Scheruga
Date: Fri, 21 Nov 2003 18:48:31 +0100 (MET)
From: Horst Scheruga [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: Concurrency and performance degradation

This problem seems very common to me.
Costs me 2 days to figure out the trivial and obviousliy reason in my case.

I your question I found that you are using a console appender.
First remove it and look at the performance again.
(Best done by setting the threshold of the appender to WARN or ERROR)
If your problem still exists then sorry, I cannot help you.

For me the problem was to have the console appender activly logging
everything and accessing the
Server via a remote tool (VNC).

I think LOG4J should have a FAQ and one common question would be
Why takes my log-statement so long to execute?
The problem I described should be one point of the answer to this question.

regards
Horst Scheruga

-- 
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService

Jetzt kostenlos anmelden unter http://www.gmx.net

+++ GMX - die erste Adresse für Mail, Message, More! +++


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Concurrency and performance degradation

2003-11-21 Thread Shapira, Yoav

Howdy
Firstly, log4j already has a FAQ, and moreover it's wiki so you can put your money 
where your mouth is.

Secondly, I don't think this is technically a FAQ as it's asked very rarely (about 
once in six months I think).

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Horst Scheruga [mailto:[EMAIL PROTECTED]
Sent: Friday, November 21, 2003 12:53 PM
To: [EMAIL PROTECTED]
Subject: Re: Concurrency and performance degradation

Date: Fri, 21 Nov 2003 18:48:31 +0100 (MET)
From: Horst Scheruga [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: Concurrency and performance degradation

This problem seems very common to me.
Costs me 2 days to figure out the trivial and obviousliy reason in my case.

I your question I found that you are using a console appender.
First remove it and look at the performance again.
(Best done by setting the threshold of the appender to WARN or ERROR)
If your problem still exists then sorry, I cannot help you.

For me the problem was to have the console appender activly logging
everything and accessing the
Server via a remote tool (VNC).

I think LOG4J should have a FAQ and one common question would be
Why takes my log-statement so long to execute?
The problem I described should be one point of the answer to this question.

regards
Horst Scheruga

--
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService

Jetzt kostenlos anmelden unter http://www.gmx.net

+++ GMX - die erste Adresse für Mail, Message, More! +++


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]