Skip to content
STPeters edited this page Sep 13, 2010 · 5 revisions

LuaFCGId Wiki Page

Summary

luafcgid is a multithreaded FastCGI server that runs under BSD/Linux/MacOSX and Windows (using MinGW and pthreads32). It manages a number of independent, persistent Lua states, that are then loaded with Lua scripts from the file system. These scripts are loaded/initialized on demand, and held in memory for as long as possible. The Lua scripts are also allowed to interface with the FastCGI libraries: thus providing an extremely fast, streamlined and lightweight platform from which to develop web-centric apps in Lua.

Discussion

Lua Mailing List

Performance

All benchmarks are done on the following platform using the included “tests/bench1.lua” script:

  • Pentium 4, 3+ Ghz
  • Intel ICH5 Motherboard
  • Intel Pro+ 1GB Ethernet
  • 2GB RAM
  • FreeBSD 7.2-RELEASE-p2

As you can see, once 5 concurrent connections are reached the CPU is running full tilt. Most of the CPU time is being spent in the Lua VM. This is one of the main goals for such a program; to just stay out of the way and let the web app gobble up whatever it needs to keep the customers happy. The max execution times stay nice and low, without much head-butting between threads. Keep in mind that this is on a much older single core processor. A modern multicore CPU should be able to leverage the luafcgid design to a much better effect.

Clone this wiki locally