High Play Framework Time Lag
I have created a web application using struts2, hibernate with mysql. I went into the game, so now I have two instances of the application written in the game by another with struts2. I see a dramatic performance boost when playing, however when I use JMeter to simulate loading, the struts2 version scales much better with lower latency than the game. Why does this and does it mean that it is better to stick with struts2? Webapp (I am testing from localhost, both applications have identical code, apart from the templating language, struts2 runs on tomcat7 during play when building on a standalone server)
Struts 2 Version
Start time Tread Name Label time(ms) Status Bytes Latency
1 10:24:49.854 videovixx struts2 1-6 HTTP Request 981 Success 9116 6
2 10:24:49.830 videovixx struts2 1-5 HTTP Request 1101 Success 9116 16
3 10:24:49.780 videovixx struts2 1-3 HTTP Request 1264 Success 9116 2
4 10:24:49.774 videovixx struts2 1-2 HTTP Request 1309 Success 9116 15
5 10:24:49.741 videovixx struts2 1-1 HTTP Request 1509 Success 9116 10
6 10:24:49.868 videovixx struts2 1-7 HTTP Request 1513 Success 9116 43
7 10:24:49.933 videovixx struts2 1-10 HTTP Request 1471 Success 9116 5
8 10:24:50.294 videovixx struts2 1-27 HTTP Request 1156 Success 9116 134
9 10:24:50.037 videovixx struts2 1-15 HTTP Request 1503 Success 9116 68
10 10:24:49.950 videovixx struts2 1-11 HTTP Request 1608 Success 9116 18
Play Version
Start time Tread Name Label time(ms) Status Bytes Latency
1 10:24:49.809 videovixx play 2-1 HTTP Request 881 Success 13016 881
2 10:24:49.803 videovixx play 2-2 HTTP Request 1562 Success 13016 1562
3 10:24:49.839 videovixx play 2-3 HTTP Request 2146 Success 13016 2146
4 10:24:49.920 videovixx play 2-7 HTTP Request 2065 Success 13016 2065
5 10:24:50.080 videovixx play 2-15 HTTP Request 1905 Success 13016 1905
6 10:24:50.242 videovixx play 2-23 HTTP Request 1743 Success 13016 1743
7 10:24:50.493 videovixx play 2-36 HTTP Request 1492 Success 13016 1492
8 10:24:50.570 videovixx play 2-39 HTTP Request 1619 Success 13016 1619
9 10:24:50.646 videovixx play 2-43 HTTP Request 1571 Success 13016 1571
13016 2105
source to share
You need to configure your streaming model according to your application profile. More specifically, your application appears to be very synchronous. The documentation suggests the following configuration:
play {
akka {
event-handlers = ["akka.event.slf4j.Slf4jEventHandler"]
loglevel = WARNING
actor {
default-dispatcher = {
fork-join-executor {
parallelism-min = 300
parallelism-max = 300
}
}
}
}
}
source to share