java slow in unix

Discussion in 'Java' started by J. Chris Tilton, Aug 21, 2003.

  1. 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( line)
    java.lang.ref.ReferenceQueue.remove( 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
    J. Chris Tilton, Aug 21, 2003
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
  2. MARTIN Herve \(EXT\)
    Anthony Borla
    Nov 27, 2003
  3. Replies:
    Dave Thompson
    Jan 10, 2005
  4. Replies:
    Dave Thompson
    Jan 10, 2005
  5. Robert Wallace

    my own perl "dos->unix"/"unix->dos"

    Robert Wallace, Jan 21, 2004, in forum: Perl Misc
    Michele Dondi
    Jan 22, 2004

Share This Page