java slow in unix

J

J. Chris Tilton

Have a program that was developed on the pc, but runs in unix on solaris.
It is 3 times faster on the pc than on unix. It benchmarked at 51 seconds
on the pc with sample data, 3 minutes and some change on unix. Even figuring
in a difference in cpu loads etc. this is a huge discrepancy compared to
other programs in other languages that were also developed on my pc and ran
in production on unix. So I tested the program using the -Xprof -cputimes
option. On the pc it has some string methods that bubble up to the top as
being the heaviest user of cpu time. However, in unix there are two
instances where the wait method is called and these calls account for 66% or
so of cputime. I am guessing that there is some system resource that the
program is waiting on in unix that it isn't waiting on when it runs on the
pc? That is my guess. Anyway, I am stumped as to how to proceed from here,
there are threads running that the wait method is being called to wait for -
but I am not sure how to determine which threads are the culprit. Any ideas
on where to go from here?

Here is a partial cut and paste from the profile output:

TRACE 2216:
java.lang.Object.wait(Object.java:Unknown line)
java.lang.Object.wait(Object.java:Unknown line)


TRACE 2217:
java.lang.Object.wait(Object.java:Unknown line)
java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:Unknown line)
java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:Unknown line

.....other traces deleted...

CPU TIME (ms) BEGIN (total = 83022) Thu Aug 21 12:53:56 2003
rank self accum count trace method
1 34.29% 34.29% 5 2216 java.lang.Object.wait
2 34.27% 68.56% 3 2217 java.lang.Object.wait
3 1.25% 69.80% 591 1044
org.apache.xerces.impl.dtd.AbstractDTDGrammar.getEntityDeclIndex
4 1.16% 70.96% 174366 1356 java.lang.String.equals
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top