Open pikhovkin opened 6 months ago
in server.toml you have cache
section:
you can set the size
to for example 1 GB, server will use a little more than that, (maybe 2 GB tops)
server will use a little more than that, (maybe 2 GB tops)
@hubcio this is a really helpful comment!
you can set the
size
to for example 1 GB
I set 512 MB for cache, but it doesn't work for Iggy 0.1.8, the RAM continues to increase. I stopped checking at 3GB RAM.
@pikhovkin could you please share the logs? local_data/logs
@pikhovkin does it happen immediately when starting the server or maybe after some time? There's also the setting called messages_required_to_save
which is essentially responsible for keeping the unsaved messages in memory buffer, after they reach the provided threshold to be eventually saved onto the disk (or they can be saved in the background task, as specified in message_saver
configuration). It's possible to have multiple partitions holding lots of messages in the buffer, which might increase the RAM usage. Also, another thing to consider are the indices (you can find the settings called cache_indexes
and cache_time_indexes
) - by default, a single index value is just 4 bytes, but once you have billions of messages, these could result in higher memory usage as well (unless you simply disable their cache).
@pikhovkin can you also do this?
@pikhovkin
for me, when I disable caching indexes and time indexes and use cache 512MB
i get constant 1.3 GB memory usage.
@pikhovkin FYI I created #724 to address this issue.
@pikhovkin upon commiting of #658 problem will be partially resolved.
@pikhovkin could you please check now (server 0.2.5), crates.io (0.2.7)
@pikhovkin could you please check now (server 0.2.5), crates.io (0.2.7)
Thanks @hubcio! I can check it after resolving this issue
@pikhovkin could you please check now (server 0.2.5), crates.io (0.2.7)
Thanks @hubcio! I can check it after resolving this issue
Alright, I will check it too.
@pikhovkin it is now solved, can you try?
@hubcio I can’t test it properly yet because of this error .
I still can't start properly https://github.com/iggy-rs/iggy-python-client/issues/20
How can I limit RAM usage in settings? For example, limit the use of RAM to no more than 1GB, but keep logs on the local storage system (SSD) for six months.