-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Increase the maximum heap size on Jenkins #1030
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
Conversation
I think this means that we're trying to allocate more memory than available on the Jenkins VM. @SethTisue, @adriaanm : How much memory do the VMs have? Is this something that could be increased? In the meantime, I'll try reducing |
958b1bb
to
28179f2
Compare
@DarkDimius : can we reduce the parallelism so that we use less memory? |
977681d
to
29ea17c
Compare
We're getting a lot of OutOfMemoryException when the maximum size is 1 GB, but we cannot increase it too much without using up all the memory available on the Jenkins instances, let's see if 1.1 GB is enough. Also stop using a custom -Xss, the default of 1 MB should be good enough.
1e0965f
to
6e8fcde
Compare
OK, I've done four runs with the maximum heap size increased from 1 GB to 1.1 GB for Jenkins and they all succeeded, so I propose we merge this now and worry about a longer-term solution later. I didn't change the memory settings used when running the tests locally because decreasing the heap size there would probably slow down the tests. |
Can we give it 1.5G? That would give us some margin for more complicated
On Sat, Jan 16, 2016 at 9:15 PM, Guillaume Martres <[email protected]
Martin Odersky |
Unfortunately not, I tried that at first but got the failure described in #1030 (comment) because apparently we're using up all the RAM available on the VM instance, 1.1G is the max I could get away with, even 1.25G is too much. So this is really a short-term fix. |
Note that if the VM instances had a swap partition then at least we wouldn't get a crash when using too much RAM, it would just be very slow, but an even better fix would be to figure out how we're using the 15GB of RAM of the VM instances and fix this (I have no idea how many JVMs we run in parallel and what controls this) |
We run 1 JVM per core. |
You mean, |
If N=Number of cores, could we try running partest with N-1 JVMs instead of N JVMs? |
c4.2xlarge: Even if we run 9 JVMs, that's 1.66GB per VM. |
You also have to take into account that some ram is used by the OS itself, and the total memory usage of a JVM is bigger than its heap size (but I don't know how much), so we might be close to the limit. |
(One thing that might be worth investigating: in the error I showed above the amount of memory that the JVM tried to "commit" was 2463629312 bytes = 2.35 GB, this is much bigger than the maximum heap size of 1.5G I specified, so something weird may be going on here, we might have more details once scala/scala-jenkins-infra#157 is merged and we can take a look at the log file). |
Wait: Partest runs N threads in one VM. Otherwise we would not have seen On Sun, Jan 17, 2016 at 12:11 AM, Guillaume Martres <
Martin Odersky |
It's the number of cores on the machine, here's an attempt at reducing this: #1032 |
All of our recent memory-related tests failures since scala#1030 was merged seem to be caused by t7880.scala. It tries to intentionally trigger an OutOfMemoryError, however since we don't pass -Xmx to our run tests it's possible that this we fill up the memory of our host before we reach the maximum heap size of the JVM. Ideally, we would specify a -Xmx for run tests (scalac uses 1 GB), unfortunately in the version of partest we use this is tricky because we need to set the system property "partest.java_opts". If we upgrade our partest to the latest release, we can instead specify it by setting the argument `javaOpts` of the constructor of `SuiteRunner`, see scala/scala-partest@7c4659e
All of our recent memory-related tests failures since scala#1030 was merged seem to be caused by t7880.scala. It tries to intentionally trigger an OutOfMemoryError, however since we don't pass -Xmx to our run tests it's possible that this we fill up the memory of our host before we reach the maximum heap size of the JVM. Ideally, we would specify a -Xmx for run tests (scalac uses 1 GB), unfortunately in the version of partest we use this is tricky because we need to set the system property "partest.java_opts". If we upgrade our partest to the latest release, we can instead specify it by setting the argument `javaOpts` of the constructor of `SuiteRunner`, see scala/scala-partest@7c4659e
Adriaan has some numbers at https://github.com/scala/scala-jenkins-infra/blob/master/doc/design.md, not entirely sure they're current. If you want to poke around yourself, we should probably get you access to the Jenkins nodes so you can ssh in and investigate on your own, try experiments from the command line, etc. see https://github.com/scala/scala-jenkins-infra/blob/master/doc/client-setup.md#hosts-and-ssh-config |
@SethTisue : That could be useful in the future yes, I guess you'll need me to give you an ssh key, if so you can use: http://guillaume.martres.me/id_rsa.pub |
@adriaanm could you help Guillaume with this? I realized this is part of this process I don't know about, the docs just say "Send Adriaan your public key... He will use it to encrypt your credentials" |
Here's the section where you documented how to do this: https://github.com/scala/scala-jenkins-infra/blob/master/doc/client-setup.md#get-your-public-key-added :-) |
You can lead a horse to documentation, but you can't make him drink. Even if you are the horse. |
Hmm, I merged scala/scala-jenkins-infra#159, ran |
|
hmm. do I need to run chef-client on the workers? |
yes, but they should run that on a schedule |
ok. @smarter, if this isn't already working for you, let us know. |
Review by @odersky or @DarkDimius