Re: less invocation time with larger data size
fatma elshehri <[email protected]>
| Newsgroups | gmane.comp.java.sun.jini |
|---|---|
| Message-ID | <[email protected]> |
In some cases I found that 2 clients version is 30% faster than 1 client version for the same daat size, but i can get now that i shoudl take care of VM warm up. Arguments to these calls is a String object and the return values are an array of objects (object of my definition). Does this have more effects? Regards John McClain <[email protected]> wrote: fatma elshehri wrote: > > First of all thanks for guidance. For not using database unfortunately > it is not possible now. You can't write a "stub" server that implements the same interface but doesn't do any real work? > In this test the server is using one CPU and the > client is running on a different machine. And i'm always measuring > throughput not latency and when i compare invocation time for two > clients version to one client version i usaully take the average of > serveral invocations for both versions. How many is "several" and what is the average call time you are seeing? How much faster was the 2 client case over the 1 client case. Even with a single CPU on the server I might expect a 2x improvement in latency (and more if hotspot warm up threw things off). > What i did not really do is dropping the first 30000 calls and taking > care of restarting the client machine before changing data size and > rerunning the test. Are these reasons sufficient to give the results > that i got. And does optimizing serialization has really something to do > with the results i got or not. You don't necessarily have to restart the client or the server, you just need to make sure that for all of your real runs both the server and the client have had a change to warm up. If you can keep the client up and change your data size you can keep the client up the whole time, you just need to throw out the results from the warm up period. When running with the server version of hotspot I will generally do batches of 10,000 calls and watch as the time/batch drops, when it stops dropping I consider the VM warmed up. For me it typically takes ~30,000 iterations (3 batches) but it is likely to be environment dependent. Not, the hostspot "client" VM warms up much faster, generally in the first 1000 calls or so - of course that means you could odd results if you are only running a few calls (10? 100?) You might also want to consider alternating between 100 and 500 in smaller batches (10? 100? 1000? iterations each), instead of doing all the size 100 calls, and then all the size 500 calls. Without knowing a lot more about you setup (which VM your are running, who many calls/run, when you are restarting which VMs when) I can't say for sure if this is what you are seeing, but between the efficiencies you can get from larger transfers (in most any networked system, not just JERI - but it can be very strong in JERI) and odd effects from hotspot warmup, I can easily imagine scenarios where the bigger batch size seems faster. What do the arguments and return values to/from the these calls look like? -------------------------------------------------------------------------- Getting Started: http://www.jini.org/wiki/Category:Getting_Started Community Web Site: http://jini.org jini-users Archive: http://archives.java.sun.com/archives/jini-users.html Unsubscribing: email "signoff JINI-USERS" to [email protected] --------------------------------- Bored stiff? Loosen up... Download and play hundreds of games for free on Yahoo! Games. -------------------------------------------------------------------------- Getting Started: http://www.jini.org/wiki/Category:Getting_Started Community Web Site: http://jini.org jini-users Archive: http://archives.java.sun.com/archives/jini-users.html Unsubscribing: email "signoff JINI-USERS" to [email protected]