java slow in unix
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:
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
4 1.16% 70.96% 174366 1356 java.lang.String.equals
|All times are GMT. The time now is 07:10 AM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.