JDK 9 RFR of JDK-8174171: Move spliterator testing of BitSet into big memory tests BitSetStreamTest

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

JDK 9 RFR of JDK-8174171: Move spliterator testing of BitSet into big memory tests BitSetStreamTest

Amy Lu-2
Please review this test-only change.

Integer.MAX_VALUE bit set testdata in bitStreamTestcases of
SpliteratorTraversingAndSplittingTest was removed in JDK-8169838 due to
out of memory errors. It also cause issue in BitSetStreamTest
(JDK-8079538). And yes, testing for this do consume lots of memory.

This patch moved the spliterator testing of BitSet into big memory tests
BitSetStreamTest:

1) bitStreamTestcases removed from SpliteratorTraversingAndSplittingTest
2) Above test cases, with adding back Integer.MAX_VALUE testdata, now is
in the newly introduced @DataProvider and being tested in BitSetStreamTest.
3) It's better BitSetStreamTest not to be run concurrently with other
test so to avoid memory usage conflict. With this purpose,
BitSetStreamTest moved to java/util/BitSet/stream subdir, and this
subdir added to exclusiveAccess.dirs

bug: https://bugs.openjdk.java.net/browse/JDK-8174171
webrev: http://cr.openjdk.java.net/~amlu/8174171/webrev.00/

Thanks,
Amy
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: JDK 9 RFR of JDK-8174171: Move spliterator testing of BitSet into big memory tests BitSetStreamTest

Hamlin Li
Hi Amy,

Thank you for taking this. Have some minor comments about
BitSetStreamTest.java

1. is below line necessary? or 2g big enough?

51 * @requires os.maxMemory >= 2g

2. I'm not sure if Xmx1024m should be a bigger value.

55 * @run testng/othervm -Xms512m -Xmx1024m

3. spliteratorOfIntDataProvider is created only once and shared between
multiple tests. I'm not sure if parallel is enabled, but if it is
already enabled or enable some day in future, it might face issue
although possibility is very low, so adding volatile might make it safe.

Thank you
-Hamlin

On 2017/4/20 17:10, Amy Lu wrote:

> Please review this test-only change.
>
> Integer.MAX_VALUE bit set testdata in bitStreamTestcases of
> SpliteratorTraversingAndSplittingTest was removed in JDK-8169838 due
> to out of memory errors. It also cause issue in BitSetStreamTest
> (JDK-8079538). And yes, testing for this do consume lots of memory.
>
> This patch moved the spliterator testing of BitSet into big memory
> tests BitSetStreamTest:
>
> 1) bitStreamTestcases removed from SpliteratorTraversingAndSplittingTest
> 2) Above test cases, with adding back Integer.MAX_VALUE testdata, now
> is in the newly introduced @DataProvider and being tested in
> BitSetStreamTest.
> 3) It's better BitSetStreamTest not to be run concurrently with other
> test so to avoid memory usage conflict. With this purpose,
> BitSetStreamTest moved to java/util/BitSet/stream subdir, and this
> subdir added to exclusiveAccess.dirs
>
> bug: https://bugs.openjdk.java.net/browse/JDK-8174171
> webrev: http://cr.openjdk.java.net/~amlu/8174171/webrev.00/
>
> Thanks,
> Amy

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: JDK 9 RFR of JDK-8174171: Move spliterator testing of BitSet into big memory tests BitSetStreamTest

Amy Lu-2
Thank you Hamlin for your comments.

On 4/20/17 6:23 PM, Hamlin Li wrote:

> Hi Amy,
>
> Thank you for taking this. Have some minor comments about
> BitSetStreamTest.java
>
> 1. is below line necessary? or 2g big enough?
>
> 51 * @requires os.maxMemory >= 2g
>
> 2. I'm not sure if Xmx1024m should be a bigger value.
>
> 55 * @run testng/othervm -Xms512m -Xmx1024m

With profiler, the max heap size is ~700m, sometime higher but less than 1g.

I tested on different configs:
JPRT on all platforms, 10 runs of whole jdk_util, all pass;
Also tried:
At 2 cores, 4G mem, Win32 machine, jdk_util, 10 times of run, all pass
At 4 cores, 16G mem, Win64 machine, whole jdk/test:tier1, 10 runs, all pass
At 4 cores, 8G mem, Linux32 machine, whole jdk/test:tier1, 10 runs, all pass

I would like this test to be skipped on very poor config system, <2g mem.
>
> 3. spliteratorOfIntDataProvider is created only once and shared
> between multiple tests. I'm not sure if parallel is enabled, but if it
> is already enabled or enable some day in future, it might face issue
> although possibility is very low, so adding volatile might make it safe.

No parallel.

Thanks,
Amy

>
> Thank you
> -Hamlin
>
> On 2017/4/20 17:10, Amy Lu wrote:
>> Please review this test-only change.
>>
>> Integer.MAX_VALUE bit set testdata in bitStreamTestcases of
>> SpliteratorTraversingAndSplittingTest was removed in JDK-8169838 due
>> to out of memory errors. It also cause issue in BitSetStreamTest
>> (JDK-8079538). And yes, testing for this do consume lots of memory.
>>
>> This patch moved the spliterator testing of BitSet into big memory
>> tests BitSetStreamTest:
>>
>> 1) bitStreamTestcases removed from SpliteratorTraversingAndSplittingTest
>> 2) Above test cases, with adding back Integer.MAX_VALUE testdata, now
>> is in the newly introduced @DataProvider and being tested in
>> BitSetStreamTest.
>> 3) It's better BitSetStreamTest not to be run concurrently with other
>> test so to avoid memory usage conflict. With this purpose,
>> BitSetStreamTest moved to java/util/BitSet/stream subdir, and this
>> subdir added to exclusiveAccess.dirs
>>
>> bug: https://bugs.openjdk.java.net/browse/JDK-8174171
>> webrev: http://cr.openjdk.java.net/~amlu/8174171/webrev.00/
>>
>> Thanks,
>> Amy
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: JDK 9 RFR of JDK-8174171: Move spliterator testing of BitSet into big memory tests BitSetStreamTest

Hamlin Li
Thank you for explanation Amy. you still need a reviewer.

Thank you

-Hamlin


On 2017/4/21 12:47, Amy Lu wrote:

> Thank you Hamlin for your comments.
>
> On 4/20/17 6:23 PM, Hamlin Li wrote:
>> Hi Amy,
>>
>> Thank you for taking this. Have some minor comments about
>> BitSetStreamTest.java
>>
>> 1. is below line necessary? or 2g big enough?
>>
>> 51 * @requires os.maxMemory >= 2g
>>
>> 2. I'm not sure if Xmx1024m should be a bigger value.
>>
>> 55 * @run testng/othervm -Xms512m -Xmx1024m
>
> With profiler, the max heap size is ~700m, sometime higher but less
> than 1g.
>
> I tested on different configs:
> JPRT on all platforms, 10 runs of whole jdk_util, all pass;
> Also tried:
> At 2 cores, 4G mem, Win32 machine, jdk_util, 10 times of run, all pass
> At 4 cores, 16G mem, Win64 machine, whole jdk/test:tier1, 10 runs, all
> pass
> At 4 cores, 8G mem, Linux32 machine, whole jdk/test:tier1, 10 runs,
> all pass
>
> I would like this test to be skipped on very poor config system, <2g mem.
>>
>> 3. spliteratorOfIntDataProvider is created only once and shared
>> between multiple tests. I'm not sure if parallel is enabled, but if
>> it is already enabled or enable some day in future, it might face
>> issue although possibility is very low, so adding volatile might make
>> it safe.
>
> No parallel.
>
> Thanks,
> Amy
>
>>
>> Thank you
>> -Hamlin
>>
>> On 2017/4/20 17:10, Amy Lu wrote:
>>> Please review this test-only change.
>>>
>>> Integer.MAX_VALUE bit set testdata in bitStreamTestcases of
>>> SpliteratorTraversingAndSplittingTest was removed in JDK-8169838 due
>>> to out of memory errors. It also cause issue in BitSetStreamTest
>>> (JDK-8079538). And yes, testing for this do consume lots of memory.
>>>
>>> This patch moved the spliterator testing of BitSet into big memory
>>> tests BitSetStreamTest:
>>>
>>> 1) bitStreamTestcases removed from
>>> SpliteratorTraversingAndSplittingTest
>>> 2) Above test cases, with adding back Integer.MAX_VALUE testdata,
>>> now is in the newly introduced @DataProvider and being tested in
>>> BitSetStreamTest.
>>> 3) It's better BitSetStreamTest not to be run concurrently with
>>> other test so to avoid memory usage conflict. With this purpose,
>>> BitSetStreamTest moved to java/util/BitSet/stream subdir, and this
>>> subdir added to exclusiveAccess.dirs
>>>
>>> bug: https://bugs.openjdk.java.net/browse/JDK-8174171
>>> webrev: http://cr.openjdk.java.net/~amlu/8174171/webrev.00/
>>>
>>> Thanks,
>>> Amy
>>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: JDK 9 RFR of JDK-8174171: Move spliterator testing of BitSet into big memory tests BitSetStreamTest

Paul Sandoz

> On 20 Apr 2017, at 23:14, Hamlin Li <[hidden email]> wrote:
>
> Thank you for explanation Amy. you still need a reviewer.
>

+1

It would be nice as a follow on for the test to be smart and only run certain tests when there is enough memory, or split the test further.

Paul.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: JDK 9 RFR of JDK-8174171: Move spliterator testing of BitSet into big memory tests BitSetStreamTest

Amy Lu-2
On 4/22/17 1:18 AM, Paul Sandoz wrote:
>> On 20 Apr 2017, at 23:14, Hamlin Li <[hidden email]> wrote:
>>
>> Thank you for explanation Amy. you still need a reviewer.
>>
> +1
>
> It would be nice as a follow on for the test to be smart and only run certain tests when there is enough memory, or split the test further.
>
> Paul.

Thank you for reviewing!

Pushed and created JDK-8179213 as the follow-on.

Thanks,
Amy

Loading...