Ecdar / Reveaal

A model checking engine for ECDAR (Environment for Compositional Design and Analysis of Real Time Systems) written in rust.
5 stars 7 forks source link

Memory usage #152

Closed t-lohse closed 1 year ago

t-lohse commented 1 year ago

When running Reveaal as a server, it takes up a lot of memory.

For example, when I ran the test-framework with the following configuration.json

[
    {
        "name": "Reveaal",
        "version": "Main",
        "executablePath": "../Reveaal/target/debug/Reveaal",
        "parameterExpression" : "-p={ip}:{port}",
        "ip": "127.0.0.1",
        "port" : 7000,
        "processes" : 4,
        "enabled" : true,
        "verbose": true,
        "testTimeout": 80,
        "queryComplexity": [0, 10]
    }
]

My Reveaal instances took up ~2.5Gb of memory after about 300 queries: image

I think it is a result of the caching of Components sent over gRPC, where there (probably) is no upper-limit of the cache. This is based on the memory usage of some of my Reveaal instances remained stable after about 200 tests, so it should not be a leak. This is a result of using TransitionSystem::get_all_locations.

This will be a problem if a lot of different components are used, and may cause the server to crash.