Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Performance G4 --> G5



When I started comparing the client vs server performance I had a program that took 1 minute
of CPU time with the client compiler and also 1 minute with the server compiler. But when
I ran it with profiling turned on (-Xprof) I noticed that the client compiler was spending 10s
on compilation and 50s on execution, while the server compiler spent 30s on compilation
and 30s on execution. Then I decided to try my program on something that would require
much more than 1 minute to execute, and the result was that the client compiler still spent
10s on compilation while the server compiler spent about 30s on compilation, but the total
execution time with the server compiler was less than half the time needed with client compiler.


I assume this is because the server compiler does much more agressive optimizations which
require more cpu time but produce better code. In my case the program was about 25,000 lines
long, but the really cpu intensive part is about 1,000 lines.



On Sep 28, 2004, at 2:45 PM, email@hidden wrote:

On Tue, 28 Sep 2004, Greg Guerin wrote:

The server VM is intended for processes with long lifetimes. It's not just
that a few routines get executed millions of times. The process itself
typically has to run for a long enough period of time that the overhead of
performing the optimizations gets amortized.

That's exactly my point. Many people speak of the server VM as a
panacea for all performance problems, and assert that nearly all programs
should be run with the server VM. Based on my experience, the opposite is
true. The set of programs which consistently perform better with the
server VM than the client VM may be quite small.
Also, the phrase "processes with long lifetimes" is quite deceptive.
How is that to be measured? Ultimately, each routine is optimized
separately. If a million invocations is not enough for it to be optimized
yet, then what is? Or if the overhead to optimize a small handful
of methods takes an extra 9 minutes (over what the client VM takes, which
is measured in seconds), how many hours will it take a large application
to even become usable?
But of course, that's not the point. If the server consistently took
ten minutes to optimize your program, you could work with that. You could
run an automated warm-up process every time you started it, before
allowing clients to connect. Or you could make an educated judgement that
the client VM would give better performance. But when the performance is
wildly unpredicable, it becomes very hard to work with in any useful way.


Peter

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/ email@hidden


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: Performance G4 --> G5 (From: email@hidden)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.