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:
>> 5.2.1 still uses somewhat more memory than 5.1.5, but much less than
>> 5.2.0, and doesn't exhibit the "very weird" behavior of 5.2.0.
>> 
>> [5.2.1 is also about 10% faster than 5.1.5; I dunno whether this is due
>> to the remaining difference in GC behavior, or just general speed
>> improvements.]
>
> Did you try to change the GC parameters with 5.2.1? (For instance,
> setting the pause to 100 or the stepmul to 300~500.)

I did now, and the results are very interesting:

By varying pause/stepmul, I can get even lower memory usage with 5.2.1
_without_ any effect on speed (and 5.2.1 is already faster than 5.1.5)!
[Whereas with 5.1.5, I could get lower memory usage by fiddling with
pause/stepmul, but doing so incurred big speed penalty.]

So by using pause=100+stepmul=500 with 5.2.1, I can get the same
memory usage as 5.1.5 (with default settings) -- and 5.2.1 is _still_
about 10% faster.

I wonder how strongly this result is related to the particular memory
allocation pattern of my app...

-miles


Lua variant             Scene def CPU           Total CPU     Elapsed   MaxRSS
------------------------------------------------------------------------------
** pause=100 stepmul=200
lua5.1.5           153.2~0.8s (+2.5s)  157.4~0.9s (+2.7s)  162.5~2.5s  1,312MB
lua5.2.1-rc1       124.9~0.6s (+3.1s)  129.3~0.5s (+3.2s)  137.2~3.0s  1,885MB
** pause=100 stepmul=300
lua5.1.5           157.7~1.1s (+2.6s)  161.9~1.1s (+2.8s)  165.9~2.0s  1,312MB
lua5.2.1-rc1       125.7~1.2s (+2.7s)  130.1~1.1s (+2.8s)  135.1~1.2s  1,709MB
** pause=100 stepmul=500
lua5.1.5           170.6~0.7s (+2.3s)  174.9~0.7s (+2.6s)  177.9~1.0s  1,312MB
lua5.2.1-rc1       124.9~0.3s (+2.5s)  129.3~0.3s (+2.7s)  132.4~0.7s  1,656MB

** pause=200 stepmul=200 (default)
lua5.1.5           136.9~0.9s (+2.6s)  141.3~1.0s (+2.8s)  146.4~2.0s  1,653MB
lua5.2.1-rc1       125.4~1.3s (+3.2s)  129.6~1.3s (+3.4s)  139.6~1.7s  2,056MB
** pause=200 stepmul=300
lua5.1.5           134.8~0.5s (+2.8s)  139.0~0.5s (+2.9s)  145.4~2.3s  1,756MB
lua5.2.1-rc1       124.9~1.0s (+2.7s)  129.2~1.0s (+2.8s)  137.6~1.2s  2,088MB
** pause=200 stepmul=500
lua5.1.5           135.3~1.1s (+2.5s)  139.5~1.1s (+2.7s)  143.9~2.1s  1,749MB
lua5.2.1-rc1       123.5~0.9s (+2.9s)  127.7~0.9s (+3.0s)  135.6~2.3s  2,060MB

* 5 samples
* CPU times are in the form "user (+sys)"; standard deviation follows "~"


-- 
`To alcohol!  The cause of, and solution to,
 all of life's problems' --Homer J. Simpson