lua-users home
lua-l archive

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


Roberto Ierusalimschy <roberto@inf.puc-rio.br> writes:
>> FWIW, the results of my lots-o-memory GC benchmark with 5.2.2-rc3.
>> 
>> 5.2.2-rc3 seems a bit better (faster, less memory usage) than 5.2.1
>> with every GC setting I tried _except_ the defaults... TT
>
> Would you suggest another choice for the defaults?

I don't know how representative my workload is, as it uses a lot of
userdata objects (many of which are GCed by Lua) and calls to external
code (e.g. LPEG :); I imagine you guys have your own set of GC
benchmarks that might do a better job of showing performance for pure
Lua programs.

However, based on my results, it looks like the 5.2 GC settings could
be made more aggressive without incurring any slowdown.

E.g., in (** = defaults):

Stepmul Pause        Scene def CPU           Total CPU     Elapsed   MaxRSS
---------------------------------------------------------------------------
200     100     126.6~0.4s (+2.5s)  130.7~0.5s (+2.6s)  133.8~1.1s  1,623MB
300     100     127.2~0.9s (+2.5s)  131.2~0.8s (+2.7s)  134.4~1.0s  1,512MB
500     100     126.1~0.8s (+2.5s)  130.2~0.8s (+2.7s)  133.1~0.8s  1,372MB

200     200 **  127.8~0.4s (+2.8s)  132.2~0.4s (+3.1s)  139.8~1.0s  2,157MB
300     200     126.4~1.1s (+2.3s)  130.4~1.1s (+2.5s)  133.6~2.1s  1,771MB
500     200     126.9~0.7s (+2.4s)  130.9~0.8s (+2.5s)  133.8~1.3s  1,704MB


The best results are at "pause = 100, stepmul = 500", which gives both
better performance and lower memory usage than Lua 5.1.5.

However, just using "pause = 100" by itself yields a good improvement
in memory usage over the default settings (and memory usage on par
with 5.1.5 at its default settings).

-miles

-- 
Advice, n. The smallest current coin.