-
Notifications
You must be signed in to change notification settings - Fork 2
Memory Use
By default, Raven stores messages in Flash, images in RAM. Images are considered ephemeral and are removed to make space and - of course - don't survive reboots. Messages in flash will survive reboots and firmware upgrades.
As flash has a limited lifetimes - NOR is typically good for 100,000+ updates and keeps its data for 20+ years, there is concern that Raven will quickly exhaust flash memory. However, as Raven updates Flash infrequently (and not at all when no messages are received), messages are very small compared to available Flash, and Flash is written using a leveling algorithm (essentially, a written flash block is not reused until all the other flash has been used first), we estimate flash wear to be - conservatively - about 50 years. This far exceeds the expected lifetime of both the flash memory and the node itself.
Despite the above, there is an option to store messages in RAM. To do this you will need to edit the Raven configuration by hand (see Advanced Configuration for details on how to do this) and add the following:
"messages": {
"ram": true
}
A couple of things to note:
- Message will not survived reboots or upgrades. However, if your Mesh is running Text Store nodes (see Text Stores) these messages will be restored when Raven restarts.
- Only channel messages are restored. Personal, Direct Messages are never stored on another node so cannot be restored.