The moose likes Java in General and the fly likes Java in Linux and Windows Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Java in Linux and Windows" Watch "Java in Linux and Windows" New topic
Author

Java in Linux and Windows

SoonAnn Lim
Ranch Hand

Joined: Jun 21, 2001
Posts: 155
Hi all,
Out of curiousity, is it true, in general, that Java application (with GUI) runs slower on Linux platform compared to Windows? Does JVM consume more resources on Linux ( i see many threads are started) platform? For example, i run a java GUI apps on a P4 1.8GHz Linux platform and Celeron 600MHz Win2k both have same amount of 512MB Ram. I realize that Win2k fires up the apps much faster than Linux platform. If my observation is true, why? Can someone points me some articles on this topic or share your knowledge with us(me)?
Regards,
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6913
There are several things you should be aware of when comparing such things.
  • Linux is usually more open about the number of threads started by Java, often even listing them as if they were separate processes. I am not aware that an appllication on Linux typically starts more threads or processes than an equivalent one on Windows.
  • The "X Windows" GUI on Linux was designed from the start as a system to allow the UI to be split between several machines, rather than a single closely-coupled graphical console like Windows. This often has the unfortunate upshot that local GUI applications take longer to start up, because of a more complicated approach. Once initialisaed and running, or for non-GUI applications, I often find that Linux is actualy faster.
  • Linux systems (and Unix systems in general) are often running a lot more programs at once than a typically configured Windows system. What is running depends largely on the choices made by whover built your Linux distribution, but also by later choices to start/stop "daemons".


  • In my experience a Windows box being used for nothing else is indeed often faster at starting up and completing small GUI applications than a Linux box where the installer has accepted the (typically inclusive) installation options.
    Also in my experience, a Linux box being used for nothing else (ie, with only one user logged on and all the web servers, mail servers, DNS servers and so on switched off) is often faster at executing longer-running or non-GUI applications. This is one reason why Linux is so often the platform of choice for server applications.


    A Convergent Visionary ~ Frank's Punchbarrel Blog ~ LinkedIn profile
     
    IntelliJ Java IDE
     
    subject: Java in Linux and Windows
     
    Threads others viewed
    swing in the market?
    Delphi vs. Java
    Jobs offered in Calgary
    Who uses Linux and only Linux
    Microsoft Technologies Veteran seeks entrance into Java World!
    WebSphere development made easy
    without the weight of IBM tools
    http://www.myeclipseide.com