Skip to content

Commit

Permalink
Removed Immutant 1 and updated Immutant 2 version
Browse files Browse the repository at this point in the history
Also setting dispatch to true for non-keepalive profiles to improve
results of ring-undertow and immutant.
  • Loading branch information
jcrossley3 committed Apr 10, 2015
1 parent 3d2af16 commit 374e45c
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 89 deletions.
4 changes: 1 addition & 3 deletions README.md
Expand Up @@ -30,7 +30,6 @@ Clone this repo locally, then run `start-here.sh` in the repo root.

* [Aleph][]
* [http-kit][]
* [Immutant v1][]
* [Immutant v2 "thedeuce"][]
* [Jetty Ring adapter][]
* Jetty 7/8/9, Tomcat 7/8 servlets via [lein-servlet][]
Expand Down Expand Up @@ -65,10 +64,9 @@ If you have any questions, you can reach me at [taoensso.com](https://www.taoens

[Aleph]: https://github.com/ztellman/aleph
[http-kit]: https://github.com/shenfeng/http-kit
[Immutant v1]: http://immutant.org/
[Immutant v2 "thedeuce"]: https://github.com/immutant/immutant
[Jetty Ring adapter]: https://github.com/ring-clojure/ring
[lein-servlet]: https://github.com/kumarshantanu/lein-servlet
[nginx-clojure]: https://github.com/xfeep/nginx-clojure
[nginx]: http://nginx.org
[Undertow Ring adapter]: https://github.com/piranha/ring-undertow-adapter
[Undertow Ring adapter]: https://github.com/piranha/ring-undertow-adapter
16 changes: 2 additions & 14 deletions scripts/run-servers.sh
Expand Up @@ -25,18 +25,6 @@ start_nginx_clojure() {
cd ../..
}

start_immutant() {
cd servers/immutant
export LEIN_IMMUTANT_BASE_DIR=.install
echo "Starting Immutant in $(pwd)..."
if [[ "$IMMUTANT" == "servlet" ]]; then
(nohup lein with-profiles benchmark,servlet do compile, immutant server 8095 1>>../../logs/$1/run-servers 2>&1 &)
else
(nohup lein with-profile benchmark immutant server 8095 1>>../../logs/$1/run-servers 2>&1 &)
fi
cd ../..
}

case $1 in
## 1k-keepalive|1k-non-keepalive|60k-keepalive|60k-non-keepalive)
## echo "Starting servers with profile: $1..."
Expand All @@ -49,6 +37,7 @@ case $1 in
1k-non-keepalive)
echo "Starting servers with profile: $1..."
NGINX_MB_CONNS=65000
export UNDERTOW_DISPATCH=true
## TODO Any optimizations for other servers?
;;
60k-keepalive)
Expand All @@ -59,6 +48,7 @@ case $1 in
60k-non-keepalive)
echo "Starting servers with profile: $1..."
NGINX_MB_CONNS=65000
export UNDERTOW_DISPATCH=true
## TODO Any optimizations for other servers?
;;
*)
Expand All @@ -81,8 +71,6 @@ start_servlet "jetty9" $1
start_nginx_clojure $NGINX_MB_CONNS $1
echo "If you cannot start nginx-clojure, please check jvm configuration in the file ../servers/nginx-clojure/conf/nginx.conf"

start_immutant $1

tail -fn 0 logs/$1/run-servers

# killall java
Expand Down
7 changes: 3 additions & 4 deletions scripts/utils/bench.sh
Expand Up @@ -48,16 +48,15 @@ case $1 in
CONN_SET="10000 20000 30000 40000 60000"
REQS=400000
ADD_HEADER="Connection: keep-alive"
## Skip Immutant v1:
IGNORED_PORTS="8095"
IGNORED_PORTS="NONE"
;;
60k-non-keepalive)
CONN_SET="10000 20000 30000 40000 60000"
## Use fewer connections for non-keepalive benchmark:
REQS=30000
ADD_HEADER="Connection: close"
## Skip http-kit, Immutant v1
IGNORED_PORTS="8087|8095"
## Skip http-kit
IGNORED_PORTS="8087"
;;
*)
echo "Usage: $0 <benching-profile> [single-port]"
Expand Down
2 changes: 1 addition & 1 deletion servers/embedded/project.clj
Expand Up @@ -18,7 +18,7 @@
[com.taoensso/timbre "3.3.1"]
[aleph "0.4.0-alpha9"]
[http-kit "2.1.19"]
[org.immutant/web "2.x.incremental.413"]
[org.immutant/web "2.x.incremental.557"]
[ring-undertow-adapter "0.2.1" :exclusions [io.undertow/undertow-core]]
[io.vertx/clojure-api "1.0.4"]]
:exclusions [org.clojure/clojure]
Expand Down
7 changes: 3 additions & 4 deletions servers/embedded/src/servers.clj
Expand Up @@ -76,14 +76,13 @@
;; :jetty-8-servlet 8092
;; :jetty-9-servlet 8093
;; :nginx-clojure 8094
;; :immutant 8095

(start-server! :ring-undertow 8096
(fn [port]
;; TODO Any special config necessary for manycore systems?
(undertow/run-undertow handler
{:port port
:dispatch? false})))
:dispatch? (read-string (get (System/getenv) "UNDERTOW_DISPATCH" "false"))})))

(start-server! :vertx 8097
(fn [port]
Expand All @@ -95,11 +94,11 @@

;; :tomcat8-servlet 8098

(start-server! :immutant2 8099
(start-server! :immutant 8099
(fn [port]
(let [num-threads (.availableProcessors (Runtime/getRuntime))]
(immutant/run handler
:dispatch? false
:port port
:dispatch? (read-string (get (System/getenv) "UNDERTOW_DISPATCH" "false"))
:io-threads num-threads
:worker-threads num-threads)))))
10 changes: 0 additions & 10 deletions servers/immutant/.gitignore

This file was deleted.

7 changes: 0 additions & 7 deletions servers/immutant/project.clj

This file was deleted.

5 changes: 0 additions & 5 deletions servers/immutant/src/immutant/core.clj

This file was deleted.

10 changes: 0 additions & 10 deletions servers/immutant/src/immutant/init.clj

This file was deleted.

29 changes: 0 additions & 29 deletions servers/immutant/src/immutant/servlet.clj

This file was deleted.

3 changes: 1 addition & 2 deletions utils/results-parser/src/wrk2_result_parser.clj
Expand Up @@ -25,7 +25,6 @@
"8092" "jetty 8 servlet"
"8093" "jetty 9 servlet"
"8094" "nginx-clojure"
"8095" "immutant 1"
"8096" "ring-undertow"
"8097" "vertx"
"8098" "tomcat 8"
Expand Down Expand Up @@ -165,7 +164,7 @@
(if (< (count args) 2)
(println "wrong args\n" args-example-str)
(let [[f title] args
stripped? (.endsWith f ".stripped")
stripped? (.endsWith f "stripped")
pf (subs f 0 (- (.length f) (.length ".stripped")))
keep-alive? (> 0 (.indexOf f "-non-keepalive"))]
(if stripped?
Expand Down

0 comments on commit 374e45c

Please sign in to comment.