Hana Bzh
Hana Bzh

Reputation: 2260

monitor log4j behaviour under load

I want to test my J2EE application under high load of sessions accessing different pages.

This web application uses Log4J to log bunch of errors,warnings and infos. I want to test what is the side effect of this load on writing log files, especially concurrent I/O writing actions.

I found that Log4j deadlock under high load conditions.

The question is does OS (linux) has any limitation on concurrent I/O file writing or does Log4j handle this concurrency?

How can I monitor any I/O process delays (Because of high load) or any deadlock happens?

Thanks

Upvotes: 7

Views: 218

Answers (1)

Hana Bzh
Hana Bzh

Reputation: 2260

As nobody answered my question,

This link somehow helped me through solving my problem.

Log4j writes to files and the console serially. so while one thread is writing another thread that wants to write has to wait until the other one is finished. also, stdout can block if whatever is attached to it on the other end is not draining it.

in unix there is a special file descriptor called stdout. when you start applications in the console stdout will be attached to the console. you can also redirect stdout to other files. ex: java Blah > /dev/null. chances are you have stdout pointing to a file that is filling up. for example a pipe is a file and if the program at the other end isn't draining the pipe then the program that is writing to the pipe will eventually block.

Upvotes: 3

Related Questions