By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,667 Members | 2,611 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,667 IT Pros & Developers. It's quick & easy.

Java Dual CPU, Single CPU, Performance

P: n/a
Hi

I have a big j2ee appliction that was so forth run on a single cpu
machine.

I have tested it on a dual cpu machine, its running much slower (about
X3 times slower).

I know that synchronize code fragments (indirect ones as well, such as
the fact that StringBuffer is synchronized) can make code run slower
on dual cpu machines.

What am I to do?
Scan all my code for direct/indirect usage of synchronized (sounds
horrible)?
How can I make my j2ee app run faster on a dual cpu machine?
What else besides synchronization can make my j2ee app run slower on a
dual cpu machine?
Jul 17 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
Can you give a full description of the hardware/OS/App server?

"Tomer Ben-David" <to*****@barak-online.net> wrote in message
news:16**************************@posting.google.c om...
Hi

I have a big j2ee appliction that was so forth run on a single cpu
machine.

I have tested it on a dual cpu machine, its running much slower (about
X3 times slower).

I know that synchronize code fragments (indirect ones as well, such as
the fact that StringBuffer is synchronized) can make code run slower
on dual cpu machines.

What am I to do?
Scan all my code for direct/indirect usage of synchronized (sounds
horrible)?
How can I make my j2ee app run faster on a dual cpu machine?
What else besides synchronization can make my j2ee app run slower on a
dual cpu machine?

Jul 17 '05 #2

P: n/a
sounds to me like you are having an operating system problem,
independent of your j2ee app. run some benchmarks on your new machine
vs. your old machine. incidentally, r u on a linux platform or are you
trying your luck with windows...

- perry

Tomer Ben-David wrote:
Hi

I have a big j2ee appliction that was so forth run on a single cpu
machine.

I have tested it on a dual cpu machine, its running much slower (about
X3 times slower).

I know that synchronize code fragments (indirect ones as well, such as
the fact that StringBuffer is synchronized) can make code run slower
on dual cpu machines.

What am I to do?
Scan all my code for direct/indirect usage of synchronized (sounds
horrible)?
How can I make my j2ee app run faster on a dual cpu machine?
What else besides synchronization can make my j2ee app run slower on a
dual cpu machine?


Jul 17 '05 #3

P: n/a
Hi (for both replies :)
Here are the detials of the machine/appserver that is being used for
development dual cpu testing

System Information report written at: 06/10/2004 08:57:01 AM
[System Summary]

Item Value
OS Name Microsoft Windows 2000 Server
Version 5.0.2195 Service Pack 4 Build 2195
OS Manufacturer Microsoft Corporation
System Manufacturer VIA Technologies, Inc.
System Model MS-6321
System Type X86-based PC
Processor x86 Family 6 Model 8 Stepping 6 GenuineIntel ~800 Mhz
Processor x86 Family 6 Model 8 Stepping 6 GenuineIntel ~800 Mhz
BIOS Version Award Modular BIOS v6.00PG
Windows Directory C:\WINNT
System Directory C:\WINNT\system32
Boot Device \Device\Harddisk0\Partition1
Locale United States
Total Physical Memory 523,760 KB
Available Physical Memory 300,696 KB
Total Virtual Memory 1,802,308 KB
Available Virtual Memory 1,132,408 KB
Page File Space 1,278,548 KB
Page File C:\pagefile.sys

App server : resin2.1.6
perry <pe***@cplusplus.org> wrote in message news:<6c*********************@news20.bellglobal.co m>...
sounds to me like you are having an operating system problem,
independent of your j2ee app. run some benchmarks on your new machine
vs. your old machine. incidentally, r u on a linux platform or are you
trying your luck with windows...

- perry

Tomer Ben-David wrote:
Hi

I have a big j2ee appliction that was so forth run on a single cpu
machine.

I have tested it on a dual cpu machine, its running much slower (about
X3 times slower).

I know that synchronize code fragments (indirect ones as well, such as
the fact that StringBuffer is synchronized) can make code run slower
on dual cpu machines.

What am I to do?
Scan all my code for direct/indirect usage of synchronized (sounds
horrible)?
How can I make my j2ee app run faster on a dual cpu machine?
What else besides synchronization can make my j2ee app run slower on a
dual cpu machine?

Jul 17 '05 #4

P: n/a
here's another site for 9.1

http://ftp.softnet.tuc.gr/ftp/linux/mandrake/iso/

like i said, i strongly recommend 9.1 over it's successors 9.2 and 10.0
for someone trying Mandrake Linux for the first time.

- perry
Tomer Ben-David wrote:
Hi (for both replies :)
Here are the detials of the machine/appserver that is being used for
development dual cpu testing

System Information report written at: 06/10/2004 08:57:01 AM
[System Summary]

Item Value
OS Name Microsoft Windows 2000 Server
Version 5.0.2195 Service Pack 4 Build 2195
OS Manufacturer Microsoft Corporation
System Manufacturer VIA Technologies, Inc.
System Model MS-6321
System Type X86-based PC
Processor x86 Family 6 Model 8 Stepping 6 GenuineIntel ~800 Mhz
Processor x86 Family 6 Model 8 Stepping 6 GenuineIntel ~800 Mhz
BIOS Version Award Modular BIOS v6.00PG
Windows Directory C:\WINNT
System Directory C:\WINNT\system32
Boot Device \Device\Harddisk0\Partition1
Locale United States
Total Physical Memory 523,760 KB
Available Physical Memory 300,696 KB
Total Virtual Memory 1,802,308 KB
Available Virtual Memory 1,132,408 KB
Page File Space 1,278,548 KB
Page File C:\pagefile.sys

App server : resin2.1.6
perry <pe***@cplusplus.org> wrote in message news:<6c*********************@news20.bellglobal.co m>...
sounds to me like you are having an operating system problem,
independent of your j2ee app. run some benchmarks on your new machine
vs. your old machine. incidentally, r u on a linux platform or are you
trying your luck with windows...

- perry

Tomer Ben-David wrote:
Hi

I have a big j2ee appliction that was so forth run on a single cpu
machine.

I have tested it on a dual cpu machine, its running much slower (about
X3 times slower).

I know that synchronize code fragments (indirect ones as well, such as
the fact that StringBuffer is synchronized) can make code run slower
on dual cpu machines.

What am I to do?
Scan all my code for direct/indirect usage of synchronized (sounds
horrible)?
How can I make my j2ee app run faster on a dual cpu machine?
What else besides synchronization can make my j2ee app run slower on a
dual cpu machine?


Jul 17 '05 #5

P: n/a
Ok, here is what you do.

First order of business is to go to this site and download a copy of
Mandrake 9.1. Mandrake 10.0 is available but like everything "new" it
needs time to get it's kinks worked out. I can personally vouche for 9.1.

ftp://ftp.cslab.vt.edu

Download 3 iso's of 9.1 and also do a download of the updates directory.
Burn 3 cd's and another to be labeled "updates".

You also need to get a good disk partition utility that will allow you
create and resize partitions. Unless you have some partition space
available or empty partitions already setup (5 gig is recommended).
Here's are some recommendations:

http://www.v-com.com/product/System_Commander_Home.html
http://www.terabyteunlimited.com/
http://www.acronis.com/products/

Each of these are superb products with System Commander being the
easiest to use in my experience.

The whole objective of this is to setup a dual boot machine (in the end
you'll only need Lilo as a boot manager) so that you can harness the
full power of your machine under a decent operating system.

If it's power you are after, you'll be glad you've begun this endevour.
Not only will you learn quite a bit but you'll see your machine output
2x the performance you now see and that's even before apply any
optimizations. I can only imagine what a dual processor is going to do
on Linux, I'm writing to you now from a Dell Inspiron 7500 (pentium III
500) running 9.1 (with 2k & 98 installed only for convienience).

At the end of the day, you'll something called "choice" and not be a
prisoner of microsoft's unending propanganda.

- perry

Tomer Ben-David wrote:
Hi (for both replies :)
Here are the detials of the machine/appserver that is being used for
development dual cpu testing

System Information report written at: 06/10/2004 08:57:01 AM
[System Summary]

Item Value
OS Name Microsoft Windows 2000 Server
Version 5.0.2195 Service Pack 4 Build 2195
OS Manufacturer Microsoft Corporation
System Manufacturer VIA Technologies, Inc.
System Model MS-6321
System Type X86-based PC
Processor x86 Family 6 Model 8 Stepping 6 GenuineIntel ~800 Mhz
Processor x86 Family 6 Model 8 Stepping 6 GenuineIntel ~800 Mhz
BIOS Version Award Modular BIOS v6.00PG
Windows Directory C:\WINNT
System Directory C:\WINNT\system32
Boot Device \Device\Harddisk0\Partition1
Locale United States
Total Physical Memory 523,760 KB
Available Physical Memory 300,696 KB
Total Virtual Memory 1,802,308 KB
Available Virtual Memory 1,132,408 KB
Page File Space 1,278,548 KB
Page File C:\pagefile.sys

App server : resin2.1.6
perry <pe***@cplusplus.org> wrote in message news:<6c*********************@news20.bellglobal.co m>...
sounds to me like you are having an operating system problem,
independent of your j2ee app. run some benchmarks on your new machine
vs. your old machine. incidentally, r u on a linux platform or are you
trying your luck with windows...

- perry

Tomer Ben-David wrote:
Hi

I have a big j2ee appliction that was so forth run on a single cpu
machine.

I have tested it on a dual cpu machine, its running much slower (about
X3 times slower).

I know that synchronize code fragments (indirect ones as well, such as
the fact that StringBuffer is synchronized) can make code run slower
on dual cpu machines.

What am I to do?
Scan all my code for direct/indirect usage of synchronized (sounds
horrible)?
How can I make my j2ee app run faster on a dual cpu machine?
What else besides synchronization can make my j2ee app run slower on a
dual cpu machine?


Jul 17 '05 #6

P: n/a
also, as you probably be aware, you'll be needing Linux versions of
J2EE, these can easily be obtained from J2EE provider. assuming your new
to the java world, i'll hazzard to guess that your a borland user.
borland has 30 evals on most of their products.

keep me abreast on how you make out

- perry

pe***@cplusplus.org
Tomer Ben-David wrote:
Hi (for both replies :)
Here are the detials of the machine/appserver that is being used for
development dual cpu testing

System Information report written at: 06/10/2004 08:57:01 AM
[System Summary]

Item Value
OS Name Microsoft Windows 2000 Server
Version 5.0.2195 Service Pack 4 Build 2195
OS Manufacturer Microsoft Corporation
System Manufacturer VIA Technologies, Inc.
System Model MS-6321
System Type X86-based PC
Processor x86 Family 6 Model 8 Stepping 6 GenuineIntel ~800 Mhz
Processor x86 Family 6 Model 8 Stepping 6 GenuineIntel ~800 Mhz
BIOS Version Award Modular BIOS v6.00PG
Windows Directory C:\WINNT
System Directory C:\WINNT\system32
Boot Device \Device\Harddisk0\Partition1
Locale United States
Total Physical Memory 523,760 KB
Available Physical Memory 300,696 KB
Total Virtual Memory 1,802,308 KB
Available Virtual Memory 1,132,408 KB
Page File Space 1,278,548 KB
Page File C:\pagefile.sys

App server : resin2.1.6
perry <pe***@cplusplus.org> wrote in message news:<6c*********************@news20.bellglobal.co m>...
sounds to me like you are having an operating system problem,
independent of your j2ee app. run some benchmarks on your new machine
vs. your old machine. incidentally, r u on a linux platform or are you
trying your luck with windows...

- perry

Tomer Ben-David wrote:
Hi

I have a big j2ee appliction that was so forth run on a single cpu
machine.

I have tested it on a dual cpu machine, its running much slower (about
X3 times slower).

I know that synchronize code fragments (indirect ones as well, such as
the fact that StringBuffer is synchronized) can make code run slower
on dual cpu machines.

What am I to do?
Scan all my code for direct/indirect usage of synchronized (sounds
horrible)?
How can I make my j2ee app run faster on a dual cpu machine?
What else besides synchronization can make my j2ee app run slower on a
dual cpu machine?


Jul 17 '05 #7

P: n/a
Ok, i think your problem is that your application server does not support
dual cpu, so going to linux wouldnt solve your problem but its not a bad
idea anyway :-) short of getting it to run on more than one jvm i dont know
what you could do..

apart from give jboss a try.. i'm sure it supports dual cpu
"Tomer Ben-David" <to*****@barak-online.net> wrote in message
news:16**************************@posting.google.c om...
Hi (for both replies :)
Here are the detials of the machine/appserver that is being used for
development dual cpu testing

System Information report written at: 06/10/2004 08:57:01 AM
[System Summary]

Item Value
OS Name Microsoft Windows 2000 Server
Version 5.0.2195 Service Pack 4 Build 2195
OS Manufacturer Microsoft Corporation
System Manufacturer VIA Technologies, Inc.
System Model MS-6321
System Type X86-based PC
Processor x86 Family 6 Model 8 Stepping 6 GenuineIntel ~800 Mhz
Processor x86 Family 6 Model 8 Stepping 6 GenuineIntel ~800 Mhz
BIOS Version Award Modular BIOS v6.00PG
Windows Directory C:\WINNT
System Directory C:\WINNT\system32
Boot Device \Device\Harddisk0\Partition1
Locale United States
Total Physical Memory 523,760 KB
Available Physical Memory 300,696 KB
Total Virtual Memory 1,802,308 KB
Available Virtual Memory 1,132,408 KB
Page File Space 1,278,548 KB
Page File C:\pagefile.sys

App server : resin2.1.6
perry <pe***@cplusplus.org> wrote in message

news:<6c*********************@news20.bellglobal.co m>...
sounds to me like you are having an operating system problem,
independent of your j2ee app. run some benchmarks on your new machine
vs. your old machine. incidentally, r u on a linux platform or are you
trying your luck with windows...

- perry

Tomer Ben-David wrote:
Hi

I have a big j2ee appliction that was so forth run on a single cpu
machine.

I have tested it on a dual cpu machine, its running much slower (about
X3 times slower).

I know that synchronize code fragments (indirect ones as well, such as
the fact that StringBuffer is synchronized) can make code run slower
on dual cpu machines.

What am I to do?
Scan all my code for direct/indirect usage of synchronized (sounds
horrible)?
How can I make my j2ee app run faster on a dual cpu machine?
What else besides synchronization can make my j2ee app run slower on a
dual cpu machine?

Jul 17 '05 #8

P: n/a
Hi all

Found the problem...

My application is communicating with domino server.
When my application is on dual cpu and domino is on single cpu the
performance is much better (10 times better). The methods of the stub
of the domino, (the jar i have of domino) its a CORBA turns out... Are
taking X10 times when the domino server is on dual cpu...

Anyone had this problem before?
"David Ashe" <ls********@blueyonder.co.uk> wrote in message news:<jP*******************@doctor.cableinet.net>. ..
Ok, i think your problem is that your application server does not support
dual cpu, so going to linux wouldnt solve your problem but its not a bad
idea anyway :-) short of getting it to run on more than one jvm i dont know
what you could do..

apart from give jboss a try.. i'm sure it supports dual cpu
"Tomer Ben-David" <to*****@barak-online.net> wrote in message
news:16**************************@posting.google.c om...
Hi (for both replies :)
Here are the detials of the machine/appserver that is being used for
development dual cpu testing

System Information report written at: 06/10/2004 08:57:01 AM
[System Summary]

Item Value
OS Name Microsoft Windows 2000 Server
Version 5.0.2195 Service Pack 4 Build 2195
OS Manufacturer Microsoft Corporation
System Manufacturer VIA Technologies, Inc.
System Model MS-6321
System Type X86-based PC
Processor x86 Family 6 Model 8 Stepping 6 GenuineIntel ~800 Mhz
Processor x86 Family 6 Model 8 Stepping 6 GenuineIntel ~800 Mhz
BIOS Version Award Modular BIOS v6.00PG
Windows Directory C:\WINNT
System Directory C:\WINNT\system32
Boot Device \Device\Harddisk0\Partition1
Locale United States
Total Physical Memory 523,760 KB
Available Physical Memory 300,696 KB
Total Virtual Memory 1,802,308 KB
Available Virtual Memory 1,132,408 KB
Page File Space 1,278,548 KB
Page File C:\pagefile.sys

App server : resin2.1.6
perry <pe***@cplusplus.org> wrote in message

news:<6c*********************@news20.bellglobal.co m>...
sounds to me like you are having an operating system problem,
independent of your j2ee app. run some benchmarks on your new machine
vs. your old machine. incidentally, r u on a linux platform or are you
trying your luck with windows...

- perry

Tomer Ben-David wrote:
> Hi
>
> I have a big j2ee appliction that was so forth run on a single cpu
> machine.
>
> I have tested it on a dual cpu machine, its running much slower (about
> X3 times slower).
>
> I know that synchronize code fragments (indirect ones as well, such as
> the fact that StringBuffer is synchronized) can make code run slower
> on dual cpu machines.
>
> What am I to do?
> Scan all my code for direct/indirect usage of synchronized (sounds
> horrible)?
> How can I make my j2ee app run faster on a dual cpu machine?
> What else besides synchronization can make my j2ee app run slower on a
> dual cpu machine?

Jul 17 '05 #9

P: n/a
I run a dual cpu p3-1000 and a gig of ram and my java programs runs quicker
than other machines i have tested the programs on
my programs are simple things no threads or anything just basic command line
programs with time at start of program and end of program
i have just started learning java :-)
in my case the the other machines are all slower and i haven't got access to
faster machine to try my programs on
to compare but i'd say if i put on a faster machime they would run faster
yet again
i am trying my luck with xp which seems to be the best micro$oft os so far
:-)
with an extra cpu seems to bring a bit of stability to the os or more
headroom so to speak

Jul 17 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.