Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What are the best linux performance tweaks for javac without a makefile?

I am talking about the use of ant build files and IDEs that scan the source and create the dependencies as well as doing the compilation (source to class file generation).

In saying "without a makefile", I mean that make should not be used.

Basically, source scanning, compiling, and class generation.

Kernel: 2.6.18-8
Distro: Ubuntu Hardy Heron
SCM: clearcase
compiler: javac 1.6
IDE: Eclipse
filesystem: XFS mounted with noatime and nodirtime
share|improve this question
Well, what are your bottlenecks? – Alex J Jun 1 '09 at 14:50
^^^^ What Alex said. You need to know whether you're spending most of your time in the CPU or whether your CPU is waiting on disk IO. If it's disk IO, why? Are you swapping? Are you copying a bunch of files? – kbyrd Jun 1 '09 at 14:52
Shouldn't this be on – David Thornley Jun 1 '09 at 15:49
  • make -j <number of processes> to use several cores
  • distcc to use extra idle machines
  • ccache to avoid compiling again and again
share|improve this answer

Java performance usually lies in memory. Check with the developers what is the expected memory footprint of the application, and play with the -Xmx and -Xms options to define, respectively, the maximum and initial memory allocation.

A very useful tool to monitor the VM performance at runtime is the jconsole. Start your JVM with an jconsole port (add a password if it's production), and check all the parameters: memory, thread count, etc. Besides memory, you'll probably want to check the jdbc connection pool (you can view it realtime if the applications uses C3PO, for instance).

share|improve this answer

The question isn't entirely clear to me. But if are talking about speeding up the build process of the software than GNU make with the -j switch can speed things up by creating multiple build jobs. This is a parallel build, but lots of software doesn't support this and you can end up with race condition problems.

This will help if your bottleneck is CPU. I think you would need multiple cores to see any advantage from this.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.