users@jaxb.java.net

Re: JAXB 2.0 latest snapshot performance

From: JAXB User <jaxbuser_at_yahoo.com>
Date: Mon, 26 Sep 2005 17:31:38 -0700 (PDT)

Kirill,
 
Thanks for the explanation. I'm able to get very close to your results now. It is fairly labor intensive, though. If the data from JProfiler (saved as XML) could be fed back into your program, that would save a lot of time.
 
For the time calculations, can I just use the avg. time numbers that you print out after a run? Would I just multiply the avg. time by the number of iterations run to get the level measurement?
 
Regards,
 
    Giac

Kirill Grouchnikov <kirillcool_at_yahoo.com> wrote:
Giac,

I'm sending this to the whole JAXB users list so that it
will appear in the archive for the future reference.

I am using JProfiler 3.2, and as i'm not familiar with
JProfiler 4.1 GUI, you will have to find the corresponding
options that match the attached screenshots by your own.
But the main approach is the same.

There are a couple of things that need to be clarified:

1. There's a lot more than marshalling / unmarshalling by a
particular library, so you will need to drill down to the
invocation of the library in order to get the exact
results. For example, before marshalling, the object
hierarchy needs to be allocated (and the memory for that is
not taken into the account). In addition, after the object
is marshalled, there's optional output which is also
ignored in the results. These two specific functions are
org.jvnet.bindmark.benchmark.test.Jaxb2Test.createHierarchy
and
org.jvnet.bindmark.benchmark.marshal.Jaxb2Marshaller.outputFinal
in the first-marshalling.png and level-marshalling.png
attached. Note that the real marshalling that is done in
org.jvnet.bindmark.benchmark.marshal.Jaxb2Marshaller.marshal
calls com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal
and is the real function that is profiled.

2. Every marshalling is done in its own thread (for
checking multi-thread safety and performance). When the
corresponding library allows, the constructor of this
thread performs one-time activity (initializing the
library), and the "real" marshaling / unmarshalling reuse
the same thread-local object. The first-marshalling.png
shows the allocation of JAXBContext object under the
constructor of
org.jvnet.bindmark.benchmark.marshal.Jaxb2Marshaller. As
you can see, this happens in the action listener of the
corresponding button in the GUI.

3. You must set "Live and garbage collected objects" option
on the particular memory view in JProfiler to get the
correct count of memory and objects during the processing.

4. The first-time marshalling involves both the constructor
(first-onetime.png) footprint and the marshalling itself
(first-marshalling.png).

5. The level marshalling footprint is level-marshalling.png
numbers minus first-marshalling.png numbers.

When you run the GUI, choose "1" iterations for the
first-time and "10" iterations for the level.

If you have any questions (the procedure is rather
elaborate in order to get the exact footprint of the
library and not the benchmarking overhead), you are welcome
to ask.

Regards
Kirill


--- JAXB User wrote:

> Hi Kirill,
>
> I've downloaded your bindmark tests on my computer and am
> attempting to reproduce the results. I'm having a hard
> time figuring out how you arrived at the memory usage
> numbers. Would it be possible to get more explicit
> directions on how to measure these using JProfiler? I'm
> using the latest version, JProfiler 4.1 beta.
>
> Once I've configured JProfiler to run the CheckGui
> application, here's the procedure I'm currently
> following:
>
> 1) Use the Memory views section, I chose the Recorded
> objects tab and start recording.
> 2) Go back to the CheckGui application and run one of the
> tests (for example, the JAXB 2.0 Large Data Set test with
> the default options).
> 3) Go back to JProfiler and export the Recorded objects
> view as a CVS into Excel.
> 4) In Excel, sum up all of the object allocations
> (instance count and size of objects).
>
> The numbers I get are very different than what you get.
> For example, after 10 iterations of the large data set
> test for JAXB 2.0, I get 181496 instances taking up 22835
> kb, while you get 6595 instance taking up 63474 kb. I've
> also tried using the All objects tab instead of the
> Recorded objects tab, but still am not able to come close
> to matching your results.
>
> Do you filter any instances from the count? How do you
> take into account the awt objects from your GUI?
>
> Any help would be greatly appreciated! Thanks,
>
> Giac
>
>
>
> Kirill Grouchnikov wrote:
> Hi,
>
> The last evaluation of JAXB 2.0 RI was back in April (on
> its first EA), and it's been a long way since then. You
> are
> welcome to see [1] for the latest results (and great
> improvements on marshalling speeds and memory
> footprints).
>
> Regards
> Kirill
>
> [1]
>
https://bindmark.dev.java.net/servlets/NewsItemView?newsItemID=2572
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection
> around
> http://mail.yahoo.com
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail:
> users-help_at_jaxb.dev.java.net
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection
> around
> http://mail.yahoo.com

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com ---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net
                
---------------------------------
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort.