-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding the Idle Micro Benchmark into the openj9-systemtest repo. #13
base: master
Are you sure you want to change the base?
Conversation
@lumpfish
|
25d59cc
to
5814967
Compare
The Idle Micro Benchmark has been written to test the Idle Tuning feature and its proper working. This test needs to be committed into the openj9-systemtest repo as a stress test. Signed-off-by: Tanvi Kini <[email protected]>
5814967
to
b12b01f
Compare
Regarding the test metadata - modes and platforms etc. - these should be specified in the playlist.xml file for the openj9-systemtests at https://github.com/AdoptOpenJDK/openjdk-tests. As I write this, the playlist.xml file is being created for the first time to enable the tests in this repository to be executed alongside tests from other repositories at https://adoptopenjdk.net/. Once it is there, the "make test-target" command lines for these tests, along with any mode and platform metadata will need to be added to that file. |
@tanvikini - thanks for giving me access to your fork. |
The Idle Micro Benchmark has been written to test the Idle Tuning feature and its proper working. This test needs to be committed into the openj9-systemtest repo as a stress test. Signed-off-by: Tanvi Kini <[email protected]>
b12b01f
to
ec36c12
Compare
Regarding hard coding the modes - one approach is to use the STF -test-args=xxxx option to say which subtest to run, and then set the -X args accordingly - e.g. -test-args="subtest=test1" and then in the test automarion See https://github.com/eclipse/openj9-systemtest/blob/master/openj9.test.sharedClasses/src/test.sharedClasses/net/openj9/stf/SharedClasses.java for an example. |
443d854
to
a9ec747
Compare
@lumpfish I have made changes to the makefile as well as to IdleLoadTest.java which is the automation file. Sorry for the delay in getting back. I took some time as I needed to make some more changes to the test logic. Please have a look at my changes and let me know if you are happy with them. Thank you! |
a9ec747
to
63b5bd2
Compare
import net.adoptopenjdk.stf.runner.modes.HelpTextGenerator; | ||
|
||
/** | ||
* This is a test plugin for Java.util related tests, it runs a workload of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment doesn't seem right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed this to "This is a test plugin to run the Idle Microbenchmark as a load test which runs workloads from the test.idle project."
@tanvikini - I have run the tests from your branch locally and the JVM goes out of memory after what appears to be the third invocation of the tests: |
@lumpfish The test runs fine and passes for me when I run a GcOnIdle subtest but I too am seeing an OOM being thrown when I run the CompactOnIdle subtest. The test is running out of heap space. I will look into this. Thanks. |
@sabkrish Observations from CompactOnIdle runs :
Not sure if increasing the Xmx value is the appropriate work around for this. |
What happens if the test is run without any of the -XX:Idle arguments - i.e. is it just the nature of the workload which requires the heap or is it an effect off the -XX:Idle implementation? |
@lumpfish - the test is designed to consume heap so that the effect of the idle tuning feature can be clearly observed. It is the nature of the test. We still should not be seeing an OOM. I just tried running the test again with -XX:CompactOnIdle and Xmx=1024, I am unable to recreate the OOM at the moment even in two separate runs. I'm unsure if this is because the box I use to run these tests has been recently rebooted. I am going to try cloning my branch and running it on a different machine to see if the same behaviour is observed. |
I can't see a gc.verbose file in the test output, just the regular OOM dumps and jitlog.timestamp file. |
Ran the same test on a test machine jsvt153.hursley.ibm.com and could not reproduce the OOM there either. The gc.verbose file should be under /tmp/stf/<date_time_IdleLoadTest>/results. |
There is no gc.verbose file produced on my test runs. This is my test command line: When the test runs there is no option to ask for a gc log. These are the Java -X options passed to the java process: Are you running the same code which is checked into your branch? |
I was running the compactOnIdle subtest all this time to check for OOM. After seeing your comment, I ran the MinIdleWaitTime and am able to reproduce the OOMs. It's surprising though that I didn't see it in my earlier runs. I validated that the testcase is creating more objects causing the OOM when the MinIdleWaitTime test is run. I can reduce the number of iterations for this test or increase the heap size for this alone. Do you see any issues with increased heap size as the MinIdleWaitTime can run on all platforms including z? |
Regarding "Do you see any issues with increased heap size.. ?" The issue would be whether changing the heap size affects the test outcome. I had assumed that the test would demonstrate that if these JVM options are in use then heap is returned to the system when it is not in use and that there is an overall improvement in performance. As I have not yet been able to run a test to completion I don't know if the test output demonstrates that. What effect does increasing the heap size have on the test results? |
There are two parts to Idle detection and Memory management.
You will see the memory usage improvement when -XX:IdleTuningGcOnIdle option is enabled. All the three options are translated into 3 subtests :
The test itself creates a large number of big objects to consume heap. The first subtest will not be affected by an increase in the heap size and will still run as intended as there is no reduction in the heap size when the -XX:IdleTuningGcOnIdle option isn't passed. |
So to accommodate running on zOS 31 bit (max heap 1Gb) what are the options? |
Only the "MinIdleWaitTime" is supported on all platforms. Currently, LoadTest specification is started with 3 threads and number of tests as 36. (i.e) We run for 12 iterations. The number of iterations can be reduced. |
Tried running the MinIdleWaitTime subtest with 6 iterations in stead of 12, the rest runs fine and passes without throwing an OOM. |
63b5bd2
to
a8340a4
Compare
The new tests should be added to the TEST_TARGETS macro in openj9/makefile so that they will appear in the 'make help' output. |
@lumpfish replying to your previous comment, I have made changes to the makefile under openj9.build and this is the output I see
Is this what is expected? |
Also, about the OOM observed in the MinIdleWaitTime test, I have not been able to reproduce it yet. I am trying to work with Sabari and Param to figure out what is wrong. Meanwhile, would it be reasonable to ask that the test be added to the repo while opening a separate issue to continue investigating the OOM for this test? There are 2 other tests - GcOnIdle and CompactOnIdle. Perhaps you could try running one of them to see if they run to completion for you and if you are happy with them? This way we can at least get the working tests committed and deal with the failing test through an issue. |
I have done the following:
Am I running the correct code from your fork? |
a8340a4
to
26aa219
Compare
@lumpfish While going through the logs of the failing tests that you provided we see that the test is failing right at the start after initializing the 3 different workload types - transactional, image and spike. We are suspecting that the reason might be the spike workload. I have commented it out from the inventory file and reduced the number of parallel threads to be run to 2. Would you try to run the test with the latest changes and let me know if you still see the failure? Meanwhile, I will be running the tests on a virtual box on my laptop with the same configuration as yours (4 cpus and 3 GB RAM) to see if I can replicate the error. I will keep this space updated with my findings. |
c01681b
to
c87b315
Compare
…t into add_idle_test Signed-off-by: Tanvi Kini <[email protected]>
c87b315
to
68d9719
Compare
I was able to recreate the OOM by setting up a Virtual Machine on my personal laptop with 3GB ram and 2 CPUs. I was able to fix the issue for myself by halving the number of threads for each of the workloads. This works for me for all 3 tests on my VM setup and I am not seeing the issue anymore. The conflict with the playlist.xml file also seems to be resolved now. |
With the reduction in the values of the test parameters, are the tests still meeting their goals? |
We were initially using this test to uncover synchronization issues which it did. These parameters are fine for that purpose. Also, since we are running all 3 workloads in parallel, I believe the goal of stressing the JVM is still being met. |
openj9.build/makefile
Outdated
TEST_TARGETS:=test.list \ | ||
test.help \ | ||
$(DAA_TESTS) \ | ||
$(GC_TESTS) \ | ||
$(SHARED_CLASSES_TESTS) \ | ||
$(IDLE_TESTS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a backslash on this line
The tests have now run successfully on my local machine. |
@tanvikini needs a rebase |
The Idle Micro Benchmark has been written to test the Idle Tuning feature and its proper working.
This test needs to be committed into the openj9-systemtest repo as a stress test.
Signed-off-by: Tanvi Kini [email protected]