[infinispan-dev] Using Dummy VS JBossTM for running tests

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

[infinispan-dev] Using Dummy VS JBossTM for running tests

Mircea Markus
Hi,

I've just run core's test suite with JBossTM and DummyTM.
The duration on my local machine are:
With dummy TM:  5:46.800s
With JBossTM:      5:23.671s

A explanation for JBossTM over performing  DummyTM in spite keeping a tx log on the disk (which dummyTm doesn't) is the fact that it has 2PC optimisations for situations where only one resource is registered. In other words if there is only one cache participating in the transaction (most of our tests are like that) there won't be 2RPC but only one.
Shall we use JBossTM as default TM for running local tests ?

Cheers,
Mircea
_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Using Dummy VS JBossTM for running tests

Sanne Grinovero
2011/2/22 Mircea Markus <[hidden email]>:
> Hi,
>
> I've just run core's test suite with JBossTM and DummyTM.
> The duration on my local machine are:
> With dummy TM:  5:46.800s
> With JBossTM:      5:23.671s
>
> A explanation for JBossTM over performing  DummyTM in spite keeping a tx log on the disk (which dummyTm doesn't) is the fact that it has 2PC optimisations for situations where only one resource is registered. In other words if there is only one cache participating in the transaction (most of our tests are like that) there won't be 2RPC but only one.
> Shall we use JBossTM as default TM for running local tests ?

+1 it seems to be a win+win :)

Considering these nice optimizations, would it make sense to use it
for batching too?
(if it's possible)

Cheers,
Sanne

>
> Cheers,
> Mircea
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>

_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Using Dummy VS JBossTM for running tests

Jonathan Halliday
In reply to this post by Mircea Markus

That's actually going to change your test semantics slightly. You may
want to run in both optimized and non-optimized modes to ensure full
coverage - some code paths may not get exercised in one or the other case.

On 02/22/2011 03:03 PM, Mircea Markus wrote:

> Hi,
>
> I've just run core's test suite with JBossTM and DummyTM.
> The duration on my local machine are:
> With dummy TM:  5:46.800s
> With JBossTM:      5:23.671s
>
> A explanation for JBossTM over performing  DummyTM in spite keeping a tx log on the disk (which dummyTm doesn't) is the fact that it has 2PC optimisations for situations where only one resource is registered. In other words if there is only one cache participating in the transaction (most of our tests are like that) there won't be 2RPC but only one.
> Shall we use JBossTM as default TM for running local tests ?
>
> Cheers,
> Mircea
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>

--
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SI4 1TE, United Kingdom.
Registered in UK and Wales under Company Registration No. 3798903
Directors: Michael Cunningham (USA), Charlie Peters (USA), Matt Parsons
(USA) and Brendan Lane (Ireland).
_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Using Dummy VS JBossTM for running tests

Mircea Markus
Good point. how can I disable the optimisation within TM?
On 22 Feb 2011, at 16:37, Jonathan Halliday wrote:

> That's actually going to change your test semantics slightly. You may want to run in both optimized and non-optimized modes to ensure full coverage - some code paths may not get exercised in one or the other case.
>
> On 02/22/2011 03:03 PM, Mircea Markus wrote:
>> Hi,
>>
>> I've just run core's test suite with JBossTM and DummyTM.
>> The duration on my local machine are:
>> With dummy TM:  5:46.800s
>> With JBossTM:      5:23.671s
>>
>> A explanation for JBossTM over performing  DummyTM in spite keeping a tx log on the disk (which dummyTm doesn't) is the fact that it has 2PC optimisations for situations where only one resource is registered. In other words if there is only one cache participating in the transaction (most of our tests are like that) there won't be 2RPC but only one.
>> Shall we use JBossTM as default TM for running local tests ?
>>
>> Cheers,
>> Mircea
>> _______________________________________________
>> infinispan-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>
>
> --
> Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom.
> Registered in UK and Wales under Company Registration No. 3798903 Directors: Michael Cunningham (USA), Charlie Peters (USA), Matt Parsons (USA) and Brendan Lane (Ireland).


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Using Dummy VS JBossTM for running tests

Patrick McFarland
In reply to this post by Jonathan Halliday
On Tue, Feb 22, 2011 at 11:37 AM, Jonathan Halliday
<[hidden email]> wrote:
> That's actually going to change your test semantics slightly. You may
> want to run in both optimized and non-optimized modes to ensure full
> coverage - some code paths may not get exercised in one or the other case.

*ding!* Achievement unlocked: Over 9000 tests ;)

--
Patrick "Diablo-D3" McFarland || www.AdTerrasPerAspera.com
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd
all be running around in darkened rooms, munching magic pills and listening to
repetitive electronic music." -- Kristian Wilson, Nintendo, Inc, 1989
_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Using Dummy VS JBossTM for running tests

Mark Little
In reply to this post by Mircea Markus
It's a configuration option. In the manuals :-)

Mark.


On 22 Feb 2011, at 16:39, Mircea Markus wrote:

> Good point. how can I disable the optimisation within TM?
> On 22 Feb 2011, at 16:37, Jonathan Halliday wrote:
>> That's actually going to change your test semantics slightly. You may want to run in both optimized and non-optimized modes to ensure full coverage - some code paths may not get exercised in one or the other case.
>>
>> On 02/22/2011 03:03 PM, Mircea Markus wrote:
>>> Hi,
>>>
>>> I've just run core's test suite with JBossTM and DummyTM.
>>> The duration on my local machine are:
>>> With dummy TM:  5:46.800s
>>> With JBossTM:      5:23.671s
>>>
>>> A explanation for JBossTM over performing  DummyTM in spite keeping a tx log on the disk (which dummyTm doesn't) is the fact that it has 2PC optimisations for situations where only one resource is registered. In other words if there is only one cache participating in the transaction (most of our tests are like that) there won't be 2RPC but only one.
>>> Shall we use JBossTM as default TM for running local tests ?
>>>
>>> Cheers,
>>> Mircea
>>> _______________________________________________
>>> infinispan-dev mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>>
>>
>> --
>> Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom.
>> Registered in UK and Wales under Company Registration No. 3798903 Directors: Michael Cunningham (USA), Charlie Peters (USA), Matt Parsons (USA) and Brendan Lane (Ireland).
>
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

---
Mark Little
[hidden email]

JBoss, by Red Hat
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom.
Registered in UK and Wales under Company Registration No. 3798903 Directors: Michael Cunningham (USA), Charlie Peters (USA), Matt Parsons (USA) and Brendan Lane (Ireland).





_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Using Dummy VS JBossTM for running tests

Mircea Markus
In reply to this post by Patrick McFarland
FYI: https://issues.jboss.org/browse/ISPN-957
On 22 Feb 2011, at 20:15, Patrick McFarland wrote:

> On Tue, Feb 22, 2011 at 11:37 AM, Jonathan Halliday
> <[hidden email]> wrote:
>> That's actually going to change your test semantics slightly. You may
>> want to run in both optimized and non-optimized modes to ensure full
>> coverage - some code paths may not get exercised in one or the other case.
>
> *ding!* Achievement unlocked: Over 9000 tests ;)
>
> --
> Patrick "Diablo-D3" McFarland || www.AdTerrasPerAspera.com
> "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd
> all be running around in darkened rooms, munching magic pills and listening to
> repetitive electronic music." -- Kristian Wilson, Nintendo, Inc, 1989
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Using Dummy VS JBossTM for running tests

Manik Surtani
In reply to this post by Jonathan Halliday

On 22 Feb 2011, at 16:37, Jonathan Halliday wrote:

>
> That's actually going to change your test semantics slightly. You may
> want to run in both optimized and non-optimized modes to ensure full
> coverage - some code paths may not get exercised in one or the other case.

Right; we actually DO want to test a full 2PC cycle.  So we should disable any such optimisations.

--
Manik Surtani
[hidden email]
twitter.com/maniksurtani

Lead, Infinispan
http://www.infinispan.org




_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Using Dummy VS JBossTM for running tests

Mircea Markus

On 28 Feb 2011, at 17:21, Manik Surtani wrote:
>
> On 22 Feb 2011, at 16:37, Jonathan Halliday wrote:
>
>>
>> That's actually going to change your test semantics slightly. You may
>> want to run in both optimized and non-optimized modes to ensure full
>> coverage - some code paths may not get exercised in one or the other case.
>
> Right; we actually DO want to test a full 2PC cycle.  So we should disable any such optimisations.
Both scenarios are equally important iMO, as I'd expect TM to use this optimisation.
ISPN-957 makes local suite run with the optimisation (also means it runs faster) and the hudson suite run with full 2PC. Best of both worlds :)
_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Using Dummy VS JBossTM for running tests

Manik Surtani

On 28 Feb 2011, at 17:24, Mircea Markus wrote:

>
> On 28 Feb 2011, at 17:21, Manik Surtani wrote:
>>
>> On 22 Feb 2011, at 16:37, Jonathan Halliday wrote:
>>
>>>
>>> That's actually going to change your test semantics slightly. You may
>>> want to run in both optimized and non-optimized modes to ensure full
>>> coverage - some code paths may not get exercised in one or the other case.
>>
>> Right; we actually DO want to test a full 2PC cycle.  So we should disable any such optimisations.
> Both scenarios are equally important iMO, as I'd expect TM to use this optimisation.

Fair comment.  Then we should set up Hudson to have 2 runs - one with and one without.  Hudson needs to be our definitive source of whether something is broken or not, and running tests locally this behaviour can be controlled with a flag.

Cheers
Manik
--
Manik Surtani
[hidden email]
twitter.com/maniksurtani

Lead, Infinispan
http://www.infinispan.org




_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Using Dummy VS JBossTM for running tests

Sanne Grinovero
In reply to this post by Manik Surtani
2011/2/28 Manik Surtani <[hidden email]>:
>
> On 22 Feb 2011, at 16:37, Jonathan Halliday wrote:
>
>>
>> That's actually going to change your test semantics slightly. You may
>> want to run in both optimized and non-optimized modes to ensure full
>> coverage - some code paths may not get exercised in one or the other case.
>
> Right; we actually DO want to test a full 2PC cycle.  So we should disable any such optimisations.

why should we disable any TM optimization, assuming we're not testing
the TM and it's able to figure out if going into "commitOnePhase" mode
is a possible option?
We could of course run in both modes to make sure, but I dind't
understand why you want to disable it; especially as I'd expect end
users to want to use it enabled.

Sanne

>
> --
> Manik Surtani
> [hidden email]
> twitter.com/maniksurtani
>
> Lead, Infinispan
> http://www.infinispan.org
>
>
>
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>

_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Using Dummy VS JBossTM for running tests

Manik Surtani

On 28 Feb 2011, at 17:28, Sanne Grinovero wrote:

> 2011/2/28 Manik Surtani <[hidden email]>:
>>
>> On 22 Feb 2011, at 16:37, Jonathan Halliday wrote:
>>
>>>
>>> That's actually going to change your test semantics slightly. You may
>>> want to run in both optimized and non-optimized modes to ensure full
>>> coverage - some code paths may not get exercised in one or the other case.
>>
>> Right; we actually DO want to test a full 2PC cycle.  So we should disable any such optimisations.
>
> why should we disable any TM optimization, assuming we're not testing
> the TM and it's able to figure out if going into "commitOnePhase" mode
> is a possible option?
> We could of course run in both modes to make sure, but I dind't
> understand why you want to disable it; especially as I'd expect end
> users to want to use it enabled.

Because we don't have multiple resources in some of the unit tests, but still expect 2PC behaviour (as this is what we are testing).  Such a 2PC test becomes invalid if the TM optimises to run the tx in a single phase because it doesn't find more than one resource.  :-)

HTH
Manik

--
Manik Surtani
[hidden email]
twitter.com/maniksurtani

Lead, Infinispan
http://www.infinispan.org




_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev