4

I have a Java Web / SIP Application which runs on Tomcat. The application was sized to run on Windows 2003 for 1000 concurrent sessions with 4 GB RAM and 4 vCPU in an virtualized environment.

Now the application is migrated to Windows 2008, the Tomcat is still 32 bit and the Application is compiled with 32 bit Java so is 32 bit application. With this setup my 2008 perf. test is not working same as it use to work with Windows 2003. The CPU utilization is peaking and many calls getting dropped.

I have following questions here.

  1. Does Running 32 bit application in an 64 environment take extra CPU / Memory which is creating issue here.

  2. Is there a performance difference between Win 2003 and Win 2008.

  3. Does Windows 2008 because of 64 bit environment requires more CPU compare to 2003.

AakashM
  • 62,551
  • 17
  • 151
  • 186
GJ.
  • 4,518
  • 1
  • 19
  • 26
  • Despite the missing signs, I would try more memory first, as a 64 bit system is more resource hungry. Java byte code is the same for 32 and 64 bits, so you could try TomCat 7, 64 bits with 64 bits Java. – Joop Eggen Mar 20 '12 at 07:44
  • Adding more memory doesn't make any impact, however adding more CPU makes the impact on the performance. In the state of confusion. Should I focus on my application to optimize or live with the fact that 2008 will take more resource and increase the resources. Does focusing on the Windows 2008 optimization or Tomcat optimization for 2008 is a option ? If yes then where can I get lead for it ? – GJ. Apr 01 '12 at 20:04

3 Answers3

1

We had a similar situation sometime back and we tried moving a 32 bit app (Tomcat based J2EE app) to 64 bit machine. We observe consequence as you are facing.

BTW you don't mentioned why you moved to 64 bit OS :).

Let's take your questions one by one

Does Running 32 bit application in an 64 environment take extra CPU / Memory which is creating issue here.

In general yes. But it depends on your processor architecture as well. To understand this, look at the way Windows runs 32 bit application on a 64 bit machine. There is a subsystem within 64 bit OS called WoW64 (Windows 32-bit on Windows 64-bit)

Primarily there are two ways WoW64does it

  1. Emulating a 32 bit instruction. This computationally very expensive and probably is the cause of CPU usage spike. This is generally the case when used with Intel Itanium (IA-64) based processors.

  2. Switching the processor to 32 bit mode from 64 bit mode. Here, whenever a 32 bit application thread needs to be executed, the processor is switched to 32 mode (compatibility mode) and then switch back to 64 bit mode. This is relatively faster than earlier emulation mechanism.

Is there a performance difference between Win 2003 and Win 2008.

This is very subjective. It depends on the kind of hardware you use. Even if you have 64 bit OS and hardware, a lot depends on the kind of hardware, motherboard CPU etc. 64 Bit OS is designed to leverage superior hardware which a 32 bit OS and machine cannot by virtue of limitations like addressing space etc.

Does Windows 2008 because of 64 bit environment requires more CPU compare to 2003.

Yes. as @EJP mentioned above, it has more things to offer. A more capable OS would need superior hardware. It may be the case the your particular application may or may not need any Win 2008 specific features. That's the reason you need to take a call on why you need to move to 64 bit from 32 bit. Here is similar post on the same forum.

BTW I am not sure if you have an option but you can run the same code without rebuilding (if you are not using any platform specific libraries) on 64 bit Tomcat.

Community
  • 1
  • 1
Santosh
  • 17,667
  • 4
  • 54
  • 79
0

I think your previous installation of SIP app and Java was optimized while the new is not yet. There are no performance differences for networking and java between latest SP for Windows 2003 and latest SP for 2008 (Vista based), however Win 2008 R2 is faster with java due to more intelligent CPU affinity, which even works in a VM. Basically, I would look into your java, make sure that you are running 64bit java if you can, that it's running with "-server" switch and that you garbage collector has options e.g. -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:NewSize=128m, also check java opts set JAVA_OPTS=-Xmx3000M -server.

Also make sure you run latest java version, you did windows update to your system, including drivers as well you have updated the visualization software, BIOS, BMC as well storage firmware.

And at the end, just check task manager if it's really java peaking, that your LAN connection (ping) is not dropping packets, and that you have power management in the bios of the machine switched off.

I would recommend you upgrading to Win 2008 R2 - win 7 based.

If you are using public cloud, this might not be the problem of the settings, but simply the cloud server is sharing CPU with another virtual server, so your app is stuck.

Andrew
  • 1,037
  • 9
  • 17
  • ps. and if it's network app, increase buffers on the network port, in the vm host and guest - it really helps, and if you can, use 10Gbps link, and if it's still doesnt work, just provide more details on your setup. – Andrew Apr 08 '12 at 20:12
0
  1. Not particularly.
  2. Yes. Sometimes it is very significant. I see all kinds of delays in programs that used to work at warp speed.
  3. Yes but not because of 64 bits, just because there's more in it.
user207421
  • 305,947
  • 44
  • 307
  • 483
  • Thanks for the inputs, could you provide me some data point to prove the point 2, some comparison matrix or something. Also who is the bigger culprit here who is eating up the CPU. 1. 64 Bit Architecture. 2. Windows 2008 which is now running may be more tools to sustain OS. 3. A tomcat 5.5.33 which is a 32 bit App. and running on 64 bit OS. 4. JRE which is 32 bit and is running on 64 bit env. 5. My app. I am seeing a 20-25% performance degradation after migration to Windows 2008, I needs strong data points to prove the requirement of additional resources in a VM environment. – GJ. Mar 21 '12 at 10:57