Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > java slow in unix

Thread Tools

java slow in unix

J. Chris Tilton
Posts: n/a
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( line)
java.lang.Object.wait( line)

TRACE 2217:
java.lang.Object.wait( 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.getE ntityDeclIndex
4 1.16% 70.96% 174366 1356 java.lang.String.equals

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: slow slow slow! Expert lino fitter Computer Support 5 12-12-2008 04:00 PM
Re: slow slow slow! General Patron Computer Support 0 12-11-2008 11:01 PM
Re: slow slow slow! chuckcar Computer Support 0 12-10-2008 11:25 PM
Re: slow slow slow! Beauregard T. Shagnasty Computer Support 2 12-10-2008 09:03 PM
Re: slow slow slow! Expert lino fitter Computer Support 0 12-10-2008 02:33 PM