lua-users home
lua-l archive

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


Just another comparison. The application I'm migrating weights 6MB in PHP, but 1.5-3MB in Lua, I'm wondering why Lua does such variation on every run, but PHP keeps the mem usage exactly the same on every run.

Blessings!

On Wed, Oct 28, 2009 at 11:36 AM, Jacques Chester <jacques@chester.id.au> wrote:

On 28/10/2009, at 10:45 PM, Fernando P. García wrote:

+1, I'm using mod_fcgid for both Lua and PHP, performance is great!

It's funny how doing this throws Lua's benefits into
sharp relief. Each copy of PHP on my servers chews ~
between 15Mb and 33Mb. Each copy of Lua is less than
300kb, from memory. That's a memory usage ratio of
between ~50:1 and ~100:1.

I published some microbenchmarks on the Kepler mailing
list a while back; and as I recall one of the interesting
facts was that you could run so many instances of Lua in
the same memory space that the key bottleneck ceased to
be waiting on FCGI children. It became waiting on disk.

Sometimes I wonder if part of Lua's excellent performance
is simply because the entire VM and code can usually fit
into a modern CPU's caches.

Cheers,

JC.




--
Fernando P. García, http://www.develcuy.com
Developer - Analista de Sistemas
+51 1 9 8991 7871, Calle Santa Catalina Ancha #377, Cusco -Perú

** Antes de imprimir este mensaje piensa en tu compromiso con el medio ambiente, protegerlo depende de tí.