Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3952028
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:48:05+00:00 2026-05-20T01:48:05+00:00

Using log4j on Unix, which Appender would perform the best to write 1000Meg :

  • 0

Using log4j on Unix, which Appender would perform the best to write 1000Meg :

1) Using RollingFileAppender writing 10 file of 100 Meg

or

2) Using a FileAppender and writing a single 1000Meg file

In other words, using java on unix, does the size matter?

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T01:48:06+00:00Added an answer on May 20, 2026 at 1:48 am

    There no Java-side performance difference between writing to a small file or writing to a large file. There might be a small difference at the OS level when a file gets big enough that an extra level of index blocks is required (FS dependent), but it is probably not worth worrying about.

    There will be a performance cost in implementing the file rolling behavior. The appender has to:

    • test / remember how big the file is,
    • close the current one,
    • rename it,
    • open a new file.

    My gut feeling is that this is not likely to be significant. (However, it would be worth measuring to see if the performance impact should be a concern. Also, you should probably ask yourself if you are not doing too much logging.)

    You have to compare all of the above against the advantages of file rolling:

    • Having a bounded size on log files means that your logging won’t fill the disk, causing problems for the application and potentially others on the same machine.
    • Smaller log files can make it easier / quicker to do searches for events at specific times. (Running less on a 1000Mb file can be painful …)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed a web project. Which is generating log file using log4j. But
im using log4j to write into a file with the following properties file :
I want to write log for each thread using log4j and log file name
Using log4j, I used to have an appender that logs directly to one of
My procedure for using log4j is this: put a .properties file somewhere in a
I am trying to write separate logs for different packages using log4j. I am
What is the best practice in using log4j levels while coding. I mean when
I'm using Log4j in a application in which I also use Axis2 and Jetty
We have weblogic appserver running on unix box with our application which uses log4j
I have an application for which log4j logging is configured in a log4j.properties file.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.