Java performance Windows vs Linux

I developed a Java application that usually runs on Linux. This is a POJO app with Swing. Performance is pretty good.

Now I tried to run it on Windows XP with 2Gb RAM, on a machine with similar or greater efficiency, and the performance is much worse. I noticed that it uses a 100% processor.

For instance:

  • The process that creates the window is very difficult, with many components: Linux 5 seconds, Windows 12.
  • The process that accesses the PostgreSQL database with a heavy query (the server and the JDBC driver are the same): 23 seconds Linux, Windows 43.

    I also tried with a virtualized Windows machine with similar features, and the result is much better!

    This is normal? What parameters can be assigned to increase productivity?

+5
source share
3 answers

If you are not comparing Linux and Windows XP on the same machine, it is very difficult to tell what the difference is. It is possible that when the processor is faster, the GFX board and disk subsystem are slower.

Java transfers all of these I / O and GFX functions to the underlying OS, and the only thing you can do differently is to do less work or work more efficiently. This is likely to make both systems faster, since there are no special features for one OS that you can configure.

+4
source

Java ( JDK): , Profiler Profiler, , .

+1

JRE ( Swing), JRE (, - Swing).

, , - , . , , .

: , Windows (, "" , ).

0

All Articles