Requirements:
- JDK 8/9/11 (oracle or openjdk)
Steps to setup the scripts:
mkdir benches
cd benches
curl https://artifacts.elastic.co/downloads/logstash/logstash-7.6.0.tar.gz | tar -zxf -
cd logstash-7.6.0
| # Base settings and GC logging | |
| -server -XX:+AlwaysPreTouch # First should be default, but we make it explicit, second pre-zeroes memory mapped pages on JVM startup -- improves runtime performance | |
| # -Xloggc:gc-%t.log # CUSTOMIZE LOCATION HERE - $path/gc-%t.log -- the %t in the gc log file path is so we get a new file with each JVM restart | |
| -XX:NumberOfGCLogFiles=5 -XX:+UseGCLogFileRotation -XX:GCLogFileSize=20m # Limits the number of files, logs to folder | |
| -XX:+PrintGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintHeapAtGC -XX:+PrintGCCause | |
| -XX:+PrintTenuringDistribution -XX:+PrintReferenceGC -XX:+PrintAdaptiveSizePolicy # gather info on object age & reference GC time for further tuning if needed. | |
| # G1 specific settings -- probably should be default for multi-core systems with >2 GB of heap (below that, default is probably fine) | |
| -XX:+UseG1GC | |
| -XX:+UseStringDeduplication |
Requirements:
Steps to setup the scripts:
mkdir benches
cd benches
curl https://artifacts.elastic.co/downloads/logstash/logstash-7.6.0.tar.gz | tar -zxf -
cd logstash-7.6.0
| diff --git a/core/src/main/java/org/jruby/RubyArray.java b/core/src/main/java/org/jruby/RubyArray.java | |
| index 04fbeef..1c32bb39 100644 | |
| --- a/core/src/main/java/org/jruby/RubyArray.java | |
| +++ b/core/src/main/java/org/jruby/RubyArray.java | |
| @@ -71,6 +71,7 @@ import org.jruby.util.io.EncodingUtils; | |
| import java.io.IOException; | |
| import java.lang.reflect.Array; | |
| +import java.lang.reflect.Field; | |
| import java.util.Arrays; |
| private static void setupJurisdictionPolicies() throws Exception { | |
| String javaHomeDir = System.getProperty("java.home"); | |
| String sep = File.separator; | |
| String pathToPolicyJar = javaHomeDir + sep + "lib" + sep + | |
| "security" + sep; | |
| File exportJar = new File(pathToPolicyJar, "US_export_policy.jar"); | |
| File importJar = new File(pathToPolicyJar, "local_policy.jar"); | |
| URL jceCipherURL = ClassLoader.getSystemResource | |
| ("javax/crypto/Cipher.class"); |
| # Create strong LUKS key | |
| openssl genrsa -out /root/luks.key 4096 | |
| chmod 400 /root/luks.key | |
| # Fill random data to the device | |
| shred -v --iterations=1 /dev/xvdb | |
| # Format device | |
| echo "YES" | cryptsetup luksFormat /dev/xvdb --key-file /root/luks.key |
| source 'https://rubygems.org' | |
| gem 'multi_json' |
| ############################################## | |
| ## Example 1 - play a note | |
| play 60 | |
| ############################################## | |
| ## Example 2 - play 4 random notes | |
| 4.times do | |
| play rrand_i(60, 90) | |
| sleep 0.5 |
| * { | |
| font-size: 12pt; | |
| font-family: monospace; | |
| font-weight: normal; | |
| font-style: normal; | |
| text-decoration: none; | |
| color: black; | |
| cursor: default; | |
| } |
| ###################### | |
| # | |
| # Monkey patch to ActiveRecord to prevent 'implicit' checkouts. Currently tested with Rails 4.0.8, prob | |
| # should work fine in Rails 4.1 too. | |
| # | |
| # If you create a thread yourself, if it uses ActiveRecord objects without | |
| # explicitly checking out a connection, one will still be checked out implicitly. | |
| # If it is never checked back in with `ActiveRecord::Base.clear_active_connections!`, | |
| # then it will be leaked. | |
| # |
| // JVM sizing options | |
| -server -Xms40g -Xmx40g -XX:MaxDirectMemorySize=4096m -XX:PermSize=256m -XX:MaxPermSize=256m | |
| // Young generation options | |
| -XX:NewSize=6g -XX:MaxNewSize=6g -XX:+UseParNewGC -XX:MaxTenuringThreshold=2 -XX:SurvivorRatio=8 -XX:+UnlockDiagnosticVMOptions -XX:ParGCCardsPerStrideChunk=32768 | |
| // Old generation options | |
| -XX:+UseConcMarkSweepGC -XX:CMSParallelRemarkEnabled -XX:+ParallelRefProcEnabled -XX:+CMSClassUnloadingEnabled -XX:CMSInitiatingOccupancyFraction=80 -XX:+UseCMSInitiatingOccupancyOnly | |
| // Other options | |
| -XX:+AlwaysPreTouch -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime -XX:-OmitStackTraceInFastThrow |