Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
RAM: 2GB
share|improve this question
1  
Well, what are your bottlenecks? –  Alex Jurkiewicz 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 stackoverflow.com? –  David Thornley Jun 1 '09 at 15:49
add comment

3 Answers 3

  • 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
add comment

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
add comment

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
add comment

Your Answer

 
discard

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.