我正在学习Lift框架。我使用了git://github.com/lift/lift_25_sbt.git中的项目模板,并使用 container:start sbt命令启动了服务器。
此模板应用程序仅显示简单菜单。如果我使用apache中的 ab 来衡量性能,那就非常糟糕。我遗漏了一些提高绩效的基本要素?
C:\Program Files\Apache Software Foundation\httpd-2.0.64\Apache2\bin>ab -n 30 -c
10 http://127.0.0.1:8080/
Benchmarking 127.0.0.1 (be patient).....done
Server Software: Jetty(8.1.7.v20120910)
Server Hostname: 127.0.0.1
Server Port: 8080
Document Path: /
Document Length: 2877 bytes
Concurrency Level: 10
Time taken for tests: 8.15625 seconds
Complete requests: 30
Failed requests: 0
Write errors: 0
Total transferred: 96275 bytes
HTML transferred: 86310 bytes
Requests per second: 3.74 [#/sec] (mean)
Time per request: 2671.875 [ms] (mean)
Time per request: 267.188 [ms] (mean, across all concurrent requests)
Transfer rate: 11.73 [Kbytes/sec] received
答案 0 :(得分:2)
您是否在生产模式下运行它?我发现我在开发中有30圈,但在生产模式下超过250圈。 ( https://www.assembla.com/spaces/liftweb/wiki/Run_Modes )
答案 1 :(得分:1)