lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sat, May 17, 2008 at 3:05 AM, Pete Kay <petedao@gmail.com> wrote:
> Hi
> The application has two characteristics:
>
> 1. DB access intensive - almost everypage has data fetching and a lot of
> tables
> 2. Real-time monitor - many pages have real-time interaction with a back-end
> server using AJAX.
>
> Budget is small so I can't afford a large cluster of Apache server, but high
> availability is still required.
>
> I have done a lot of work with PHP before, but I feel Lua is lighter and can
> be more scalable for what my application.
>
> Regards,
> Pete
>

For what it's worth, here are the specs and benchmarks for my application:

LuaSQL database backend
WSAPI server abstraction
Lighttpd + FastCGI

Running on a $15.00 a month VPS with 384Mib of guaranteed memory, and
768MiB of burst

I obtain the following benchmarks:

=====================================================
Concurrency Level:      40
Time taken for tests:   18.300119 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      7997128 bytes
HTML transferred:       7781572 bytes
Requests per second:    54.64 [#/sec] (mean)
Time per request:       732.005 [ms] (mean)
Time per request:       18.300 [ms] (mean, across all concurrent requests)
Transfer rate:          426.72 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:      133  209  51.0    210    1074
Processing:   333  508  78.5    491     823
Waiting:      165  286  62.9    272     578
Total:        520  717  77.2    706    1743

Percentage of the requests served within a certain time (ms)
  50%    706
  66%    726
  75%    740
  80%    755
  90%    796
  95%    844
  98%    895
  99%    932
 100%   1743 (longest request)
=====================================================

In short under normal loads with high levels of concurrency (40 as
shown above) I can server 54 pages a second.  Each of these pages hits
the database a number of times (although I work to minimize it).  I
think with the right tuning and an application that's written properly
you can definitely hit your targets.

- Jim