Open cdupont opened 7 years ago
Possible sources of memory consumption:
If I remove the call to hint interpret (in https://github.com/cdupont/Nomyx/blob/master/Nomyx-Core/src/Nomyx/Core/Engine/Interpret.hs): VmSize = 450 Mo on startup Submitting new rules does not augment the VmSize.
To see some graphs:
$ stack build --library-profiling --executable-profiling --ghc-options="-fprof-auto -rtsopts"
$ stack exec -- nomyx-server +RTS -hm -p
$ hp2ps -e8in -c nomyx-server.hp
$ evince nomyx-server.ps
However profiling does not work with the GHC interpreter embedded, so the result is not extremely useful.
It won't run with less then 1300K of heap:
$ stack exec -- Nomyx +RTS -K1300K
On program startup:
832M is a lot of RAM. Each time I submit a rule, it increases memory consumption by 100Mo. So the game RAM size quickly grows to several gigas.