2 Replies Latest reply on Nov 5, 2010 8:52 AM by f_marchioni

    Performance issue related to logging in JBOSS 5

    sachi.dash

      Hi everybody,

       

      I have deployed my application in jboss5

       

      in my logs max no of log file backup created are 3 each of 10 mb

       

      I noticed that server.1.log

      server.2.log

      server.3.log are created but, i found that

      server.1.log

      server.2.log are of 10 mb each when the application is running

       

      but server.3.log size increases rapidly, a background thread keeps on writing to the server.3.log, the memory is actually buffer memory.

       

      when i stop the application or kill the application memory get freed.

       

      can anyone guide me/suggest me on this whether its a log4j issue or JBOSS issue.

       

      How can i avoid this??

        • 1. Re: Performance issue related to logging in JBOSS 5
          f_marchioni

          Post your log4j configuration, I'd need to have a look at your RollingFileAppender configuration.

          Francesco

          Jboss Tutorials

          • 2. Re: Performance issue related to logging in JBOSS 5
            f_marchioni

            From your description it's not clear if the performance issue is related mostly to high CPU usage (because of writer threads) or because of high memory pressure (which will trigger longer and frequent garbage collector pauses).

            For example, you might try adding to your File Appender configuration:

             

            <param name="ImmediateFlush" value="false" />

             

            This will avoid flusing every log statement, thus reducing the stress on CPU, but will engage more memory.

            However the problem appears to me quite complex, so you will need a full CPU-Memory analisys.

            (By the way, I also am not aware of any issue related to log4j file Appender like the one you have mentioned).

             

            Hope it helps

            Francesco