Browse Source

Merge branch 'master' of https://github.com/TechEmpower/FrameworkBenchmarks

jamming 10 years ago
parent
commit
c31c20cbc2
35 changed files with 335 additions and 149 deletions
  1. 1 1
      config/benchmark_profile
  2. 172 0
      config/cassandra/cassandra.init
  3. 6 0
      config/cassandra/cassandra.init.env
  4. 35 12
      config/cassandra/cassandra.yaml
  5. 1 1
      frameworks/C/haywire/benchmark_config
  6. 1 1
      frameworks/Go/beego/benchmark_config
  7. 1 1
      frameworks/Groovy/grails/README.md
  8. 0 4
      frameworks/Groovy/grails/bash_profile.sh
  9. 1 1
      frameworks/Groovy/grails/hello/application.properties
  10. 4 4
      frameworks/Groovy/grails/hello/grails-app/conf/BuildConfig.groovy
  11. 3 0
      frameworks/Groovy/grails/hello/grails-app/conf/mysql-connection.properties
  12. 3 6
      frameworks/Groovy/grails/hello/grails-app/controllers/hello/HelloController.groovy
  13. 3 0
      frameworks/Groovy/grails/hello/grails-app/domain/hello/Fortune.groovy
  14. 3 0
      frameworks/Groovy/grails/hello/grails-app/domain/hello/World.groovy
  15. 0 85
      frameworks/Groovy/grails/hello/src/groovy/org/codehaus/groovy/grails/plugins/codecs/JSONEncoder.java
  16. 5 1
      frameworks/Groovy/grails/install.sh
  17. 6 1
      frameworks/Groovy/grails/setup.sh
  18. 5 5
      frameworks/Java/gemini/Docroot/WEB-INF/GeminiHello.conf
  19. BIN
      frameworks/Java/gemini/Docroot/WEB-INF/lib/postgresql-9.4-1200.jdbc41.jar
  20. 1 1
      frameworks/Java/gemini/Docroot/WEB-INF/resin.xml
  21. 40 2
      frameworks/Java/gemini/benchmark_config
  22. 1 0
      frameworks/Java/gemini/source_code
  23. 4 2
      frameworks/Java/gemini/start.sh
  24. 9 0
      frameworks/Java/gemini/start_postgres.sh
  25. 1 1
      frameworks/Java/ninja-standalone/pom.xml
  26. 1 1
      frameworks/Lua/lapis/bash_profile.sh
  27. 1 1
      frameworks/Lua/openresty/bash_profile.sh
  28. 1 1
      frameworks/Perl/kelp/benchmark_config
  29. 1 1
      frameworks/Python/bottle/setup_nginxuwsgi.sh
  30. 1 1
      frameworks/Python/flask/setup_nginxuwsgi.sh
  31. 1 1
      frameworks/Python/uwsgi/setup_nginx.sh
  32. 1 1
      frameworks/Python/wsgi/setup_nginxuwsgi.sh
  33. 1 0
      toolset/benchmark/benchmarker.py
  34. 17 9
      toolset/setup/linux/database.sh
  35. 4 4
      toolset/setup/linux/frameworks/grails.sh

+ 1 - 1
config/benchmark_profile

@@ -20,7 +20,7 @@ export TFB_DISTRIB_DESCRIPTION=$DISTRIB_DESCRIPTION
 
 export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64
 export RESIN_HOME=${IROOT}/resin-4.0.41
-export GRAILS_HOME=${IROOT}/grails-2.4.2
+export GRAILS_HOME=${IROOT}/grails-2.4.4
 export VERTX_HOME=${IROOT}/vert.x-2.1.1
 export TOMCAT_HOME=${IROOT}/apache-tomcat-7.0.35
 export NODE_HOME=${IROOT}/node-v0.10.8-linux-x64

+ 172 - 0
config/cassandra/cassandra.init

@@ -0,0 +1,172 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:          cassandra
+# Required-Start:    $remote_fs $network $named $time
+# Required-Stop:     $remote_fs $network $named $time
+# Should-Start:      ntp mdadm
+# Should-Stop:       ntp mdadm
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: distributed storage system for structured data
+# Description:       Cassandra is a distributed (peer-to-peer) system for
+#                    the management and storage of structured data.
+### END INIT INFO
+
+# Author: Eric Evans <[email protected]>
+
+DESC="Cassandra"
+NAME=cassandra
+PIDFILE=/var/run/$NAME/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+CASSANDRA_CONF=/etc/cassandra
+WAIT_FOR_START=10
+CASSANDRA_HOME=/usr/share/cassandra
+CASSANDRA_LIB=$CASSANDRA_HOME
+CASSANDRA_PROG=/usr/sbin/cassandra
+FD_LIMIT=100000
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+valid_chome=`find $CASSANDRA_LIB/apache-cassandra*.jar 2> /dev/null`
+[ -n "$valid_chome" ] || exit 0
+[ -e $CASSANDRA_CONF/cassandra.yaml ] || exit 0
+[ -e $CASSANDRA_CONF/cassandra-env.sh ] || exit 0
+
+# Read Cassandra environment file.
+. $CASSANDRA_CONF/cassandra-env.sh
+
+if [ -z "$JVM_OPTS" ]; then
+    echo "Initialization failed; \$JVM_OPTS not set!" >&2
+    exit 3
+fi
+
+export JVM_OPTS
+
+# Export JAVA_HOME, if set.
+[ -n "$JAVA_HOME" ] && export JAVA_HOME
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
+. /lib/lsb/init-functions
+
+#
+# Function that returns 0 if process is running, or nonzero if not.
+#
+# The nonzero value is 3 if the process is simply not running, and 1 if the
+# process is not running but the pidfile exists (to match the exit codes for
+# the "status" command; see LSB core spec 3.1, section 20.2)
+#
+CMD_PATT="cassandra.+CassandraDaemon"
+is_running()
+{
+    if [ -f $PIDFILE ]; then
+        pid=`cat $PIDFILE`
+        grep -Eq "$CMD_PATT" "/proc/$pid/cmdline" 2>/dev/null && return 0
+        return 1
+    fi
+    return 3
+}
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+    # Return
+    #   0 if daemon has been started
+    #   1 if daemon was already running
+    #   2 if daemon could not be started
+
+    ulimit -l unlimited
+    ulimit -n "$FD_LIMIT"
+
+    cassandra_home=`getent passwd cassandra | awk -F ':' '{ print $6; }'`
+    heap_dump_f="$cassandra_home/java_`date +%s`.hprof"
+    error_log_f="$cassandra_home/hs_err_`date +%s`.log"
+
+    [ -e `dirname "$PIDFILE"` ] || \
+        install -d -ocassandra -gcassandra -m755 `dirname $PIDFILE`
+
+
+
+    start-stop-daemon -S -c cassandra -a $CASSANDRA_PROG -q -p "$PIDFILE" -t >/dev/null || return 1
+
+    start-stop-daemon -S -c cassandra -a $CASSANDRA_PROG -b -p "$PIDFILE" -- \
+        -p "$PIDFILE" -H "$heap_dump_f" -E "$error_log_f" >/dev/null || return 2
+
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+    # Return
+    #   0 if daemon has been stopped
+    #   1 if daemon was already stopped
+    #   2 if daemon could not be stopped
+    #   other if a failure occurred
+    start-stop-daemon -K -p "$PIDFILE" -R TERM/30/KILL/5 >/dev/null
+    RET=$?
+    rm -f "$PIDFILE"
+    return $RET
+}
+
+case "$1" in
+  start)
+	[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+	do_start
+	case "$?" in
+		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+	esac
+	;;
+  stop)
+	[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+	do_stop
+	case "$?" in
+		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+	esac
+	;;
+  restart|force-reload)
+	log_daemon_msg "Restarting $DESC" "$NAME"
+	do_stop
+	case "$?" in
+	  0|1)
+		do_start
+		case "$?" in
+			0) log_end_msg 0 ;;
+			1) log_end_msg 1 ;; # Old process is still running
+			*) log_end_msg 1 ;; # Failed to start
+		esac
+		;;
+	  *)
+	  	# Failed to stop
+		log_end_msg 1
+		;;
+	esac
+	;;
+  status)
+    is_running
+    stat=$?
+    case "$stat" in
+      0) log_success_msg "$DESC is running" ;;
+      1) log_failure_msg "could not access pidfile for $DESC" ;;
+      *) log_success_msg "$DESC is not running" ;;
+    esac
+    exit "$stat"
+    ;;
+  *)
+	echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|status}" >&2
+	exit 3
+	;;
+esac
+
+:
+
+# vi:ai sw=4 ts=4 tw=0 et

+ 6 - 0
config/cassandra/cassandra.init.env

@@ -0,0 +1,6 @@
+
+CASSANDRA_HOME=/opt/cassandra
+CASSANDRA_LIB=$CASSANDRA_HOME/lib
+CASSANDRA_CONF=$CASSANDRA_HOME/conf
+CASSANDRA_PROG=$CASSANDRA_HOME/bin/cassandra
+

+ 35 - 12
config/cassandra/cassandra.yaml

@@ -7,7 +7,7 @@
 
 # The name of the cluster. This is mainly used to prevent machines in
 # one logical cluster from joining another.
-cluster_name: 'Benchmark Cluster'
+cluster_name: 'TFB Cluster'
 
 # This defines the number of tokens randomly assigned to this node on the ring
 # The more tokens, relative to other nodes, the larger the proportion of data
@@ -17,7 +17,8 @@ cluster_name: 'Benchmark Cluster'
 # If you leave this unspecified, Cassandra will use the default of 1 token for legacy compatibility,
 # and will use the initial_token as described below.
 #
-# Specifying initial_token will override this setting.
+# Specifying initial_token will override this setting on the node's initial start,
+# on subsequent starts, this setting will apply even if initial token is set.
 #
 # If you already have a cluster with 1 token per node, and wish to migrate to 
 # multiple tokens per node, see http://wiki.apache.org/cassandra/Operations
@@ -78,6 +79,14 @@ authorizer: AllowAllAuthorizer
 # Will be disabled automatically for AllowAllAuthorizer.
 permissions_validity_in_ms: 2000
 
+# Refresh interval for permissions cache (if enabled).
+# After this interval, cache entries become eligible for refresh. Upon next
+# access, an async reload is scheduled and the old value returned until it
+# completes. If permissions_validity_in_ms is non-zero, then this must be
+# also.
+# Defaults to the same value as permissions_validity_in_ms.
+# permissions_update_interval_in_ms: 1000
+
 # The partitioner is responsible for distributing groups of rows (by
 # partition key) across nodes in the cluster.  You should leave this
 # alone for new clusters.  The partitioner can NOT be changed without
@@ -332,11 +341,11 @@ start_rpc: true
 # Note that unlike ListenAddress above, it is allowed to specify 0.0.0.0
 # here if you want to listen on all interfaces, but that will break clients 
 # that rely on node auto-discovery.
-rpc_address: 0.0.0.0
+rpc_address: 127.0.0.1
 # port for Thrift to listen for clients on
 rpc_port: 9160
 
-# enable or disable keepalive on rpc connections
+# enable or disable keepalive on rpc/native connections
 rpc_keepalive: true
 
 # Cassandra provides two out-of-the-box options for the RPC Server:
@@ -349,7 +358,8 @@ rpc_keepalive: true
 # hsha  -> Stands for "half synchronous, half asynchronous." All thrift clients are handled
 #          asynchronously using a small number of threads that does not vary with the amount
 #          of thrift clients (and thus scales well to many clients). The rpc requests are still
-#          synchronous (one thread per active request).
+#          synchronous (one thread per active request). If hsha is selected then it is essential
+#          that rpc_max_threads is changed from the default value of unlimited.
 #
 # The default is sync because on Windows hsha is about 30% slower.  On Linux,
 # sync/hsha performance is about the same, with hsha of course using less memory.
@@ -420,15 +430,22 @@ auto_snapshot: true
 tombstone_warn_threshold: 1000
 tombstone_failure_threshold: 100000
 
-# Add column indexes to a row after its contents reach this size.
-# Increase if your column values are large, or if you have a very large
-# number of columns.  The competing causes are, Cassandra has to
-# deserialize this much of the row to read a single column, so you want
-# it to be small - at least if you do many partial-row reads - but all
-# the index data is read for each access, so you don't want to generate
-# that wastefully either.
+# Granularity of the collation index of rows within a partition.
+# Increase if your rows are large, or if you have a very large
+# number of rows per partition.  The competing goals are these:
+#   1) a smaller granularity means more index entries are generated
+#      and looking up rows withing the partition by collation column
+#      is faster
+#   2) but, Cassandra will keep the collation index in memory for hot
+#      rows (as part of the key cache), so a larger granularity means
+#      you can cache more hot rows
 column_index_size_in_kb: 64
 
+
+# Log WARN on any batch size exceeding this value. 5kb per batch by default.
+# Caution should be taken on increasing the size of this threshold as it can lead to node instability.
+batch_size_warn_threshold_in_kb: 5
+
 # Size limit for rows being compacted in memory.  Larger rows will spill
 # over to disk and use a slower two-pass compaction process.  A message
 # will be logged specifying the row key.
@@ -474,6 +491,12 @@ compaction_preheat_key_cache: true
 # When unset, the default is 200 Mbps or 25 MB/s.
 # stream_throughput_outbound_megabits_per_sec: 200
 
+# Throttles all streaming file transfer between the datacenters,
+# this setting allows users to throttle inter dc stream throughput in addition
+# to throttling all network stream traffic as configured with
+# stream_throughput_outbound_megabits_per_sec
+# inter_dc_stream_throughput_outbound_megabits_per_sec:
+
 # How long the coordinator should wait for read operations to complete
 read_request_timeout_in_ms: 5000
 # How long the coordinator should wait for seq or index scans to complete

+ 1 - 1
frameworks/C/haywire/benchmark_config

@@ -10,7 +10,7 @@
       "database": "None",
       "framework": "haywire",
       "language": "C",
-      "orm": "None",
+      "orm": "Raw",
       "platform": "haywire",
       "webserver": "None",
       "os": "Linux",

+ 1 - 1
frameworks/Go/beego/benchmark_config

@@ -12,7 +12,7 @@
       "database": "MySQL",
       "framework": "beego",
       "language": "Go",
-      "orm": "beego ORM",
+      "orm": "Micro",
       "platform": "Go",
       "webserver": "None",
       "os": "Linux",

+ 1 - 1
frameworks/Groovy/grails/README.md

@@ -4,7 +4,7 @@ This is the Grails portion of a [benchmarking test suite](../) comparing a varie
 
 ## Infrastructure Software Versions
 The tests were run with:
-* [Grails 2.4.2](http://grails.org/)
+* [Grails 2.4.4](http://grails.org/)
 
 ## Test URLs
 

+ 0 - 4
frameworks/Groovy/grails/bash_profile.sh

@@ -1,4 +0,0 @@
-export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64
-export RESIN_HOME=${IROOT}/resin-4.0.41
-
-export GRAILS_PATH=${IROOT}/grails-2.4.2/bin/

+ 1 - 1
frameworks/Groovy/grails/hello/application.properties

@@ -1,6 +1,6 @@
 #Grails Metadata file
 #Tue Feb 25 10:29:09 EET 2014
-app.grails.version=2.4.2
+app.grails.version=2.4.4
 app.name=hello
 app.servlet.version=2.5
 app.version=0.1

+ 4 - 4
frameworks/Groovy/grails/hello/grails-app/conf/BuildConfig.groovy

@@ -45,7 +45,7 @@ grails.project.dependency.resolution = {
         inherits true // Whether to inherit repository definitions from plugins
         grailsPlugins()
         grailsHome()
-		mavenLocal()
+        mavenLocal()
         grailsCentral()
         mavenCentral()
 
@@ -60,11 +60,11 @@ grails.project.dependency.resolution = {
     dependencies {
         // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.
 
-        runtime 'mysql:mysql-connector-java:5.1.29'
+        runtime 'mysql:mysql-connector-java:5.1.34'
     }
 
     plugins {
-        runtime ":hibernate:3.6.10.16"
+        runtime ":hibernate:3.6.10.18"
         //runtime ":jquery:1.10.2"
         //runtime ":resources:1.2.1"
 
@@ -73,6 +73,6 @@ grails.project.dependency.resolution = {
         //runtime ":cached-resources:1.0"
         //runtime ":yui-minify-resources:0.1.4"
 
-        build ":tomcat:7.0.54"
+        build ":tomcat:7.0.55.2"
     }
 }

+ 3 - 0
frameworks/Groovy/grails/hello/grails-app/conf/mysql-connection.properties

@@ -58,3 +58,6 @@ maintainTimeStats=false
 # timeouts for TCP/IP
 connectTimeout=15000
 socketTimeout=120000
+
+# enable batch mode
+rewriteBatchedStatements=true

+ 3 - 6
frameworks/Groovy/grails/hello/grails-app/controllers/hello/HelloController.groovy

@@ -1,16 +1,13 @@
 package hello
 
+import grails.compiler.GrailsCompileStatic
 import grails.converters.JSON
-import grails.transaction.Transactional
-import groovy.transform.CompileStatic
-import groovy.transform.TypeCheckingMode;
 
 import java.util.concurrent.ThreadLocalRandom
 
-import org.springframework.transaction.annotation.Propagation;
-import org.hibernate.Session;
+import org.hibernate.Session
 
-@CompileStatic
+@GrailsCompileStatic
 class HelloController {
 
     def index() {

+ 3 - 0
frameworks/Groovy/grails/hello/grails-app/domain/hello/Fortune.groovy

@@ -1,5 +1,8 @@
 package hello
 
+import grails.compiler.GrailsCompileStatic
+
+@GrailsCompileStatic
 class Fortune {
     Integer id
     String message

+ 3 - 0
frameworks/Groovy/grails/hello/grails-app/domain/hello/World.groovy

@@ -1,5 +1,8 @@
 package hello
 
+import grails.compiler.GrailsCompileStatic
+
+@GrailsCompileStatic
 class World {
     Integer id
     Integer randomNumber

+ 0 - 85
frameworks/Groovy/grails/hello/src/groovy/org/codehaus/groovy/grails/plugins/codecs/JSONEncoder.java

@@ -1,85 +0,0 @@
-/*
- * Copyright 2013 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.codehaus.groovy.grails.plugins.codecs;
-
-import org.apache.commons.lang.StringUtils;
-import org.codehaus.groovy.grails.support.encoding.CodecIdentifier;
-import org.codehaus.groovy.grails.support.encoding.DefaultCodecIdentifier;
-
-/**
- * Escapes characters in JSON output
- *
- * @author Lari Hotari
- * @since 2.3.4
- */
-public class JSONEncoder extends AbstractCharReplacementEncoder {
-    public static final CodecIdentifier JSON_CODEC_IDENTIFIER = new DefaultCodecIdentifier(
-            "JSON", "Json") {
-        public boolean isEquivalent(CodecIdentifier other) {
-            return super.isEquivalent(other) || JavaScriptEncoder.JAVASCRIPT_CODEC_IDENTIFIER.getCodecName().equals(other.getCodecName());
-        };
-    };
-
-    public JSONEncoder() {
-        super(JSON_CODEC_IDENTIFIER);
-    }
-
-    /* (non-Javadoc)
-     * @see org.codehaus.groovy.grails.plugins.codecs.AbstractCharReplacementEncoder#escapeCharacter(char, char)
-     */
-    @Override
-    protected String escapeCharacter(char ch, char previousChar) {
-        switch (ch) {
-            case '"':
-                return "\\\"";
-            case '\\':
-                return "\\\\";
-            case '\t':
-                return "\\t";
-            case '\n':
-                return "\\n";
-            case '\r':
-                return "\\r";
-            case '\f':
-                return "\\f";
-            case '\b':
-                return "\\b";
-            case '\u000B': // vertical tab: http://bclary.com/2004/11/07/#a-7.8.4
-                return "\\v";
-            case '\u2028':
-                return "\\u2028"; // Line separator
-            case '\u2029':
-                return "\\u2029"; // Paragraph separator
-            case '/':
-                // preserve special handling that exists in JSONObject.quote to improve security if JSON is embedded in HTML document
-                // prevents outputting "</" gets outputted with unicode escaping for the slash
-                if (previousChar == '<') {
-                    return "\\u002f"; 
-                }
-                break;
-        }
-        if(ch < ' ') {
-            // escape all other control characters
-            return "\\u" + StringUtils.leftPad(Integer.toHexString(ch), 4, '0');
-        }
-        return null;
-    }
-
-    @Override
-    public boolean isApplyToSafelyEncoded() {
-        return true;
-    }
-}

+ 5 - 1
frameworks/Groovy/grails/install.sh

@@ -1,3 +1,7 @@
 #!/bin/bash
+export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64
+export RESIN_HOME=${IROOT}/resin-4.0.41
 
-fw_depends grails resin 
+export GRAILS_PATH=${IROOT}/grails-2.4.4/bin/
+
+fw_depends grails resin

+ 6 - 1
frameworks/Groovy/grails/setup.sh

@@ -1,4 +1,8 @@
 #!/bin/bash
+export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64
+export RESIN_HOME=${IROOT}/resin-4.0.41
+
+export GRAILS_PATH=${IROOT}/grails-2.4.4/bin/
 
 sed -i 's|jdbc:mysql://.*:3306|jdbc:mysql://'"${DBHOST}"':3306|g' hello/grails-app/conf/DataSource.groovy
 
@@ -6,8 +10,9 @@ export PATH=${GRAILS_PATH}:$PATH
 export GRAILS_AGENT_CACHE_DIR=${IROOT}/.grails/.slcache
 
 cd hello
+grails -Dgrails.work.dir=${IROOT}/.grails -non-interactive -plain-output refresh-dependencies
 grails -Dgrails.work.dir=${IROOT}/.grails -non-interactive -plain-output compile
 grails -Dgrails.work.dir=${IROOT}/.grails prod -non-interactive -plain-output war
 rm -rf $RESIN_HOME/webapps/*
 cp target/hello-0.1.war $RESIN_HOME/webapps/grails.war
-$RESIN_HOME/bin/resinctl start
+$RESIN_HOME/bin/resinctl start

+ 5 - 5
frameworks/Java/gemini/Docroot/WEB-INF/GeminiHello.conf

@@ -87,19 +87,19 @@ DeploymentDescription = Production
 # specific configuration files.
 
 # MySQL/ConnectorJ
-db.Driver.Class = com.mysql.jdbc.Driver
-db.Driver.UrlPrefix = jdbc:mysql://
+db.Driver.Class = org.postgresql.Driver
+db.Driver.UrlPrefix = jdbc:postgresql://
 db.Driver.SupportsAbsolute = yes
 db.Driver.SupportsGetRow = yes
 db.Driver.Jdbc1 = no
 
-db.ConnectString = localhost:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useServerPrepStmts&enableQueryTimeouts=false&useUnbufferedIO=false&useReadAheadInput=false&maintainTimeStats=false&cacheRSMetadata=true
+db.ConnectString = 127.0.0.1:5432/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useServerPrepStmts&enableQueryTimeouts=false&useUnbufferedIO=false&useReadAheadInput=false&maintainTimeStats=false&cacheRSMetadata=true
 db.LoginName = benchmarkdbuser
 db.LoginPass = benchmarkdbpass
 
 # JTDS (Open source JDBC driver for Microsoft SQL Server)
-#db.Driver.Class = net.sourceforge.jtds.jdbc.Driver
-#db.Driver.UrlPrefix = jdbc:jtds:sqlserver://
+#db.Driver.Class = org.postgresql.Driver
+#db.Driver.UrlPrefix = jdbc:postgresql://
 #db.Driver.SupportsAbsolute = yes
 #db.Driver.SupportsGetRow = yes
 #db.Driver.Jdbc1 = no

BIN
frameworks/Java/gemini/Docroot/WEB-INF/lib/postgresql-9.4-1200.jdbc41.jar


+ 1 - 1
frameworks/Java/gemini/Docroot/WEB-INF/resin.xml

@@ -14,7 +14,7 @@
     </server>
 
     <host>
-      <web-app id="/" root-directory="/home/tfb/FrameworkBenchmarks/frameworks/Java/gemini/Docroot" />
+      <web-app id="/" root-directory="/home/knewman/FrameworkBenchmarks/frameworks/Java/gemini/Docroot" />
     </host>
 
   </cluster>

+ 40 - 2
frameworks/Java/gemini/benchmark_config

@@ -4,11 +4,49 @@
     "default": {
       "setup_file": "start",
       "json_url": "/",
+      "plaintext_url": "/plaintext",
+      "port": 8080,
+      "approach": "Realistic",
+      "classification": "Fullstack",
+      "database": "None",
+      "framework": "gemini",
+      "language": "Java",
+      "orm": "Micro",
+      "platform": "Servlet",
+      "webserver": "None",
+      "os": "Linux",
+      "database_os": "Linux",
+      "display_name": "gemini",
+      "notes": "",
+      "versus": "servlet"
+    },
+    "mysql": {
+      "setup_file": "start",
+      "db_url": "/db",
+      "query_url": "/query?queries=",
+      "fortune_url": "/fortunes",
+      "update_url": "/update?queries=",
+      "port": 8080,
+      "approach": "Realistic",
+      "classification": "Fullstack",
+      "database": "MySQL",
+      "framework": "gemini",
+      "language": "Java",
+      "orm": "Micro",
+      "platform": "Servlet",
+      "webserver": "Resin",
+      "os": "Linux",
+      "database_os": "Linux",
+      "display_name": "gemini",
+      "notes": "",
+      "versus": "servlet"
+    },
+    "postgres": {
+      "setup_file": "start_postgres",
       "db_url": "/db",
       "query_url": "/query?queries=",
       "fortune_url": "/fortunes",
       "update_url": "/update?queries=",
-      "plaintext_url": "/plaintext",
       "port": 8080,
       "approach": "Realistic",
       "classification": "Fullstack",
@@ -23,6 +61,6 @@
       "display_name": "gemini",
       "notes": "",
       "versus": "servlet"
-    }
+    }   
   }]
 }

+ 1 - 0
frameworks/Java/gemini/source_code

@@ -24,6 +24,7 @@
 ./gemini/Docroot/WEB-INF/lib
 ./gemini/Docroot/WEB-INF/lib/kryonet-1.04-all.jar
 ./gemini/Docroot/WEB-INF/lib/mysql-connector-java-5.1.23-bin.jar
+./gemini-Docroot/WEB-INF/lib/postgresql-9.4-1200.jdbc41.jar
 ./gemini/Docroot/WEB-INF/lib/mustache-compiler-0.8.13.jar
 ./gemini/Docroot/WEB-INF/lib/mail.jar
 ./gemini/Docroot/WEB-INF/lib/activation.jar

+ 4 - 2
frameworks/Java/gemini/start.sh

@@ -1,7 +1,9 @@
 #!/bin/bash
 
-sed -i 's/db.ConnectString = .*:3306/db.ConnectString = '"$DBHOST"':3306/g' Docroot/WEB-INF/GeminiHello.conf
+sed -i 's|db.ConnectString = .*/|db.ConnectString = '"$DBHOST"':3306/|g' Docroot/WEB-INF/GeminiHello.conf
 sed -i 's|root-directory=".*/FrameworkBenchmarks/frameworks/Java/gemini|root-directory="'"$TROOT"'|g' Docroot/WEB-INF/resin.xml
+sed -i 's|db.Driver.Class = .*|db.Driver.Class = com.mysql.jdbc.Driver|g' Docroot/WEB-INF/GeminiHello.conf
+sed -i 's|db.Driver.UrlPrefix = .*|db.Driver.UrlPrefix = jdbc:mysql://|g' Docroot/WEB-INF/GeminiHello.conf
 mkdir -p Docroot/WEB-INF/classes
 ant compile
-$RESIN_HOME/bin/resinctl -conf $TROOT/Docroot/WEB-INF/resin.xml start
+$RESIN_HOME/bin/resinctl -conf $TROOT/Docroot/WEB-INF/resin.xml start

+ 9 - 0
frameworks/Java/gemini/start_postgres.sh

@@ -0,0 +1,9 @@
+#!/bin/bash
+
+sed -i 's|db.ConnectString = .*/|db.ConnectString = '"$DBHOST"':5432/|g' Docroot/WEB-INF/GeminiHello.conf
+sed -i 's|root-directory=".*/FrameworkBenchmarks/frameworks/Java/gemini|root-directory="'"$TROOT"'|g' Docroot/WEB-INF/resin.xml
+sed -i 's|db.Driver.Class = .*|db.Driver.Class = org.postgresql.Driver|g' Docroot/WEB-INF/GeminiHello.conf
+sed -i 's|db.Driver.UrlPrefix = .*|db.Driver.UrlPrefix = jdbc:postgresql://|g' Docroot/WEB-INF/GeminiHello.conf
+mkdir -p Docroot/WEB-INF/classes
+ant compile
+$RESIN_HOME/bin/resinctl -conf $TROOT/Docroot/WEB-INF/resin.xml start

+ 1 - 1
frameworks/Java/ninja-standalone/pom.xml

@@ -9,7 +9,7 @@
 
     <properties>
         <java-version>1.7</java-version>
-        <ninja.version>4.0.0</ninja.version>
+        <ninja.version>4.0.5</ninja.version>
         <mysql.version>5.1.26</mysql.version>
         <jetty.version>9.2.1.v20140609</jetty.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

+ 1 - 1
frameworks/Lua/lapis/bash_profile.sh

@@ -1,3 +1,3 @@
 #!/bin/bash
 
-export OPENRESTY_HOME=${IROOT}/openresty-1.7.4.1
+export OPENRESTY_HOME=${IROOT}/openresty-1.7.7.1

+ 1 - 1
frameworks/Lua/openresty/bash_profile.sh

@@ -1,3 +1,3 @@
 #!/bin/bash
 
-export OPENRESTY_HOME=${IROOT}/openresty-1.7.4.1
+export OPENRESTY_HOME=${IROOT}/openresty-1.7.7.1

+ 1 - 1
frameworks/Perl/kelp/benchmark_config

@@ -12,7 +12,7 @@
       "port": 8080,
       "approach": "Realistic",
       "classification": "Fullstack",
-      "database": "SQL",
+      "database": "MySQL",
       "framework": "kelp",
       "language": "Perl",
       "orm": "Raw",

+ 1 - 1
frameworks/Python/bottle/setup_nginxuwsgi.sh

@@ -3,4 +3,4 @@
 sed -i 's|include .*/conf/uwsgi_params;|include '"${NGINX_HOME}"'/conf/uwsgi_params;|g' nginx.conf
 
 ${NGINX_HOME}/sbin/nginx -c ${TROOT}/nginx.conf
-${PY2_ROOT}/bin/uwsgi -d --ini ${TROOT}/uwsgi.ini --processes ${MAX_THREADS} --wsgi app:app
+${PY2_ROOT}/bin/uwsgi -d ${ERR} --ini ${TROOT}/uwsgi.ini --processes ${MAX_THREADS} --wsgi app:app

+ 1 - 1
frameworks/Python/flask/setup_nginxuwsgi.sh

@@ -3,4 +3,4 @@
 sed -i 's|include .*/conf/uwsgi_params;|include '"${NGINX_HOME}"'/conf/uwsgi_params;|g' nginx.conf
 
 $NGINX_HOME/sbin/nginx -c $TROOT/nginx.conf
-${PY2_ROOT}/bin/uwsgi -d --ini ${TROOT}/uwsgi.ini --processes ${MAX_THREADS} --wsgi app:app
+${PY2_ROOT}/bin/uwsgi -d ${ERR} --ini ${TROOT}/uwsgi.ini --processes ${MAX_THREADS} --wsgi app:app

+ 1 - 1
frameworks/Python/uwsgi/setup_nginx.sh

@@ -3,4 +3,4 @@
 sed -i 's|include .*/conf/uwsgi_params;|include '"${NGINX_HOME}"'/conf/uwsgi_params;|g' nginx.conf
 
 $NGINX_HOME/sbin/nginx -c ${TROOT}/nginx.conf
-$PY2_ROOT/bin/uwsgi -d --ini uwsgi.ini --processes ${MAX_THREADS} --gevent 1000 --wsgi hello
+$PY2_ROOT/bin/uwsgi -d ${ERR} --ini uwsgi.ini --processes ${MAX_THREADS} --gevent 1000 --wsgi hello

+ 1 - 1
frameworks/Python/wsgi/setup_nginxuwsgi.sh

@@ -3,4 +3,4 @@
 sed -i 's|include .*/conf/uwsgi_params;|include '"${NGINX_HOME}"'/conf/uwsgi_params;|g' nginx.conf
 
 $NGINX_HOME/sbin/nginx -c $TROOT/nginx.conf
-$PY2_ROOT/bin/uwsgi -d --ini uwsgi.ini --processes ${MAX_THREADS} --wsgi hello:app
+$PY2_ROOT/bin/uwsgi -d ${ERR} --ini uwsgi.ini --processes ${MAX_THREADS} --wsgi hello:app

+ 1 - 0
toolset/benchmark/benchmarker.py

@@ -535,6 +535,7 @@ class Benchmarker:
             sudo restart mongod
             sudo service redis-server restart
             sudo service postgresql restart
+            sudo service cassandra restart
           """)
           time.sleep(10)
 

+ 17 - 9
toolset/setup/linux/database.sh

@@ -159,15 +159,24 @@ fi
 ##############################
 echo "Setting up Apache Cassandra database"
 sudo apt-get install -qqy openjdk-7-jdk
-export CASS_V=2.0.7
+
+sudo addgroup --system cassandra
+sudo adduser --system --home /ssd/cassandra --no-create-home --ingroup cassandra cassandra
+
+export CASS_V=2.0.12
 wget -nv http://archive.apache.org/dist/cassandra/$CASS_V/apache-cassandra-$CASS_V-bin.tar.gz
-tar xzf apache-cassandra-$CASS_V-bin.tar.gz
+sudo tar xzf apache-cassandra-$CASS_V-bin.tar.gz -C /opt
+sudo ln -s /opt/apache-cassandra-$CASS_V /opt/cassandra
 
 rm -rf /ssd/cassandra /ssd/log/cassandra
 mkdir -p /ssd/cassandra /ssd/log/cassandra
-mv cassandra/cassandra.yaml apache-cassandra-$CASS_V/conf
-mv cassandra/log4j-server.properties apache-cassandra-$CASS_V/conf
-nohup apache-cassandra-$CASS_V/bin/cassandra -p c.pid > cassandra.log
+sudo chown -R cassandra:cassandra /ssd/cassandra
+sudo cp -f cassandra/cassandra.init /etc/init.d/cassandra
+sudo cp -f cassandra/cassandra.init.env /etc/default/cassandra
+sudo cp -f cassandra/cassandra.yaml /opt/apache-cassandra-$CASS_V/conf
+sudo cp -f cassandra/log4j-server.properties /opt/apache-cassandra-$CASS_V/conf
+sudo update-rc.d cassandra defaults
+sudo service cassandra start
 
 for i in {1..45}; do
   nc -z localhost 9160 && break || sleep 1;
@@ -175,11 +184,10 @@ for i in {1..45}; do
 done
 nc -z localhost 9160
 if [ $? -eq 0 ]; then
-  cat cassandra/cleanup-keyspace.cql | apache-cassandra-$CASS_V/bin/cqlsh 127.0.0.1
+  cat cassandra/cleanup-keyspace.cql | /opt/apache-cassandra-$CASS_V/bin/cqlsh 127.0.0.1
   python cassandra/db-data-gen.py > cassandra/tfb-data.cql
-  apache-cassandra-$CASS_V/bin/cqlsh -f cassandra/create-keyspace.cql 127.0.0.1
-  apache-cassandra-$CASS_V/bin/cqlsh -f cassandra/tfb-data.cql 127.0.0.1
-  rm -rf apache-cassandra-*-bin.tar.gz cassandra
+  /opt/apache-cassandra-$CASS_V/bin/cqlsh -f cassandra/create-keyspace.cql 127.0.0.1
+  /opt/apache-cassandra-$CASS_V/bin/cqlsh -f cassandra/tfb-data.cql 127.0.0.1
 else
   >&2 echo "Cassandra did not start, skipping"
 fi

+ 4 - 4
toolset/setup/linux/frameworks/grails.sh

@@ -1,9 +1,9 @@
 #!/bin/bash
 
-RETCODE=$(fw_exists ${IROOT}/grails-2.4.2.installed)
+RETCODE=$(fw_exists ${IROOT}/grails-2.4.4.installed)
 [ ! "$RETCODE" == 0 ] || { return 0; }
 
-fw_get http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/grails-2.4.2.zip -O grails-2.4.2.zip
-fw_unzip grails-2.4.2.zip
+fw_get http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/grails-2.4.4.zip -O grails-2.4.4.zip
+fw_unzip grails-2.4.4.zip
 
-touch ${IROOT}/grails-2.4.2.installed
+touch ${IROOT}/grails-2.4.4.installed