File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Performance and the fly likes Linux(Ubuntu server, Centos) VS Windows (7,xp) Glassfish v4 Performance [images] Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Performance
Bookmark "Linux(Ubuntu server, Centos) VS Windows (7,xp) Glassfish v4 Performance [images]" Watch "Linux(Ubuntu server, Centos) VS Windows (7,xp) Glassfish v4 Performance [images]" New topic
Author

Linux(Ubuntu server, Centos) VS Windows (7,xp) Glassfish v4 Performance [images]

Paul Monique
Greenhorn

Joined: Jul 16, 2010
Posts: 24
Hello Please take a look at the images,

the 3 responses on each image are for the same page but diferent queries

Windows 7 (Development enviroment, 4gig ram, i3 cpu)


Virtual Machine (Ubuntu server 12.04.4 LTS, 8gig Ram, 8core cpu) THE DATABASE IS ON THIS ONE


Ubuntu server 12.04.4 LTS(16gig Ram, 8core cpu)


Windows XP (1 gig ram, some crapy cpu)


all the response times are with the same glassfish V4 installation and java 7, to the same page on my javaEE app
Why is there so much diference in the response times on firebug? i try Centos 6 as well but i got the same response from ubuntu, also try tunning the glasfish but still the same problem. how can a crappy XP machine run faster than and 8 core 16gig server?
Any ideas, any comments would be apreciated thanks!






Asterisk-java, JSF, Primefaces, JEE & Glassfish.

Jayesh A Lalwani
Bartender

Joined: Jan 17, 2008
Posts: 2272
    
  28

1) how much of this is network and how much is the time taken by the server? If your client and server are both on the same machine or closer on the network, then obviously upi will experience lower network latencies

2) What's the speed of the CPUs? If the CPU speed of an 8Core CPU and an 2 Core CPU is the same, then both will run equally fast on a single request. The main differrence between an 8 core CPU and a 2 Core CPU is that the 8 core CPU will be able to service 4 times the number of requests at the same speed. The clock speed determines how fast the CPU will run. The number of CPUs determine how many things can run in parallel

3) Is CPU your bottleneck? What does the application do? Do a lot of computations? Or get data from database? If it's getting data from database, CPU on the web server may not matter. CPU/memory on the database matters
Paul Monique
Greenhorn

Joined: Jul 16, 2010
Posts: 24
Thanks for your comments!

Jayesh A Lalwani wrote:1) how much of this is network and how much is the time taken by the server? If your client and server are both on the same machine or closer on the network, then obviously upi will experience lower network latencies

One of the tests(Second one) is running glassfish on the same machine as the database(postgres) and still takes longer than the crapy pc (this is some agent pc) :-/

2) What's the speed of the CPUs? If the CPU speed of an 8Core CPU and an 2 Core CPU is the same, then both will run equally fast on a single request. The main differrence between an 8 core CPU and a 2 Core CPU is that the 8 core CPU will be able to service 4 times the number of requests at the same speed. The clock speed determines how fast the CPU will run. The number of CPUs determine how many things can run in parallel

I dont see how this can be a factor when the crapy single core with 1 gig of ram XP machine runs glassfish faster than a poweredge r420 (Intel Xeon processor E5-2400, 16 gigs of ram)

3) Is CPU your bottleneck? What does the application do? Do a lot of computations? Or get data from database? If it's getting data from database, CPU on the web server may not matter. CPU/memory on the database matters

that page i did the test on was just a webpage doing some querys to the database, and the database is locate on the poweredge r420 and never moved the DB for the testing .


Jayesh A Lalwani
Bartender

Joined: Jan 17, 2008
Posts: 2272
    
  28

Paul Monique wrote:Thanks for your comments!

Jayesh A Lalwani wrote:1) how much of this is network and how much is the time taken by the server? If your client and server are both on the same machine or closer on the network, then obviously upi will experience lower network latencies

One of the tests(Second one) is running glassfish on the same machine as the database(postgres) and still takes longer than the crapy pc (this is some agent pc) :-/

I meant the latecy between firefox and server. You need to take that latency into account. If your Windows server and Linux server is on differrent networks, then the only way to do an apple to apple comparison is by measuring how long it took to execute the request on the server not on the client.

Yes, the latency between server and database will affect the performance too, but not by that much, because you probably have connection pooling. Running database on the same machine as the web server will load the server more, so it might affect the performance negatively.. or not.

If you want to do a proper analysis, you need to keep everything the same and change only one thing at a time. Doing multiple changes pollutes your test results.


2) What's the speed of the CPUs? If the CPU speed of an 8Core CPU and an 2 Core CPU is the same, then both will run equally fast on a single request. The main differrence between an 8 core CPU and a 2 Core CPU is that the 8 core CPU will be able to service 4 times the number of requests at the same speed. The clock speed determines how fast the CPU will run. The number of CPUs determine how many things can run in parallel

I dont see how this can be a factor when the crapy single core with 1 gig of ram XP machine runs glassfish faster than a poweredge r420 (Intel Xeon processor E5-2400, 16 gigs of ram)

Which part didn;t you understand? When comparing the response time of a single request, number of cores doesn't matter. It's just as simple as that.



3) Is CPU your bottleneck? What does the application do? Do a lot of computations? Or get data from database? If it's getting data from database, CPU on the web server may not matter. CPU/memory on the database matters

that page i did the test on was just a webpage doing some querys to the database, and the database is locate on the poweredge r420 and never moved the DB for the testing .


The CPU is not your bottleneck. Stop focusing on the number of CPUs.
Paul Monique
Greenhorn

Joined: Jul 16, 2010
Posts: 24
Oka gonna load another virtual machine with win xp on it (on the same machine where i'd been doing the testing), that way would be an equal comparision as far as cpu and ram goes, would update soon
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7529
    
  18

Paul Monique wrote:all the response times are with the same glassfish V4 installation and java 7, to the same page on my javaEE app
Why is there so much diference in the response times on firebug? i try Centos 6 as well but i got the same response from ubuntu, also try tunning the glasfish but still the same problem.

No idea, because the images you supplied don't give us enough information. What are you trying to do?

how can a crappy XP machine run faster than and 8 core 16gig server?
Any ideas, any comments would be apreciated thanks!

Simple. for the same reason that you can load XP onto a 10-year old laptop and have it run like snake-snot. Or run Linux with a minimal desktop on the same; or Linux or Solaris or Debian in character mode on stuff that's even older. Modern systems clog up your CPU and disk drives and memory with all sorts of things that you are totally unaware about and, in many cases, are completely unnecessary.

So: Want convenience? Run a full Linux distro (or Windows 8). Want speed? Run a stripped-down version of Debian or SuSE (is that still around?) in character mode. I currently have Mint running on a 12-year old 512Mb Siemens laptop with a 60G drive; and in many cases it's quicker than my 3Gig tower with 600.

Winston

Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
Paul Monique
Greenhorn

Joined: Jul 16, 2010
Posts: 24
Just an update, there was a firewall on the virtualmachine cloging my network, we moved the firewall to another machine and bang! everything is pretty responsive now.
Thanks again guys, learned a lot about cpus and java threads
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Linux(Ubuntu server, Centos) VS Windows (7,xp) Glassfish v4 Performance [images]
 
Similar Threads
JScrollPane size problem
problem writing ImageServlet?
liferay tomcat running slow on linux
Glassfish with Liferay Portal on CentOS installation
IBM WebSphere - Consuming 99% CPU