Skip to content

Commit

Permalink
Added automatic heap settings for IX dyno
Browse files Browse the repository at this point in the history
  • Loading branch information
jkutner committed Oct 28, 2015
1 parent 606c1aa commit 38fa92b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/language_pack/ruby.rb
Expand Up @@ -207,6 +207,9 @@ def set_jvm_max_heap
512) # 2X Dyno
JVM_MAX_HEAP=768
;;
16384) # IX Dyno
JVM_MAX_HEAP=2048
;;
32768) # PX Dyno
JVM_MAX_HEAP=5120
;;
Expand Down Expand Up @@ -244,7 +247,7 @@ def default_jruby_opts
# default JAVA_TOOL_OPTIONS
# return [String] string of JAVA_TOOL_OPTIONS
def default_java_tool_options
"-Xmx${JVM_MAX_HEAP:-\"384\"}m -Djava.rmi.server.useCodebaseOnly=true"
"-Xmx${JVM_MAX_HEAP:-\"384\"}m"
end

# sets up the environment variables for the build process
Expand Down
1 change: 1 addition & 0 deletions spec/rubies_spec.rb
Expand Up @@ -50,6 +50,7 @@

app.deploy do |app|
expect(app.output).to match("Installing JVM: openjdk-8")
expect(app.output).to match("Picked up JAVA_TOOL_OPTIONS: -Xmx2048m")
expect(app.output).to match("JRUBY_OPTS is: -Xcompile.invokedynamic=false")
expect(app.output).not_to include("OpenJDK 64-Bit Server VM warning")

Expand Down

0 comments on commit 38fa92b

Please sign in to comment.