-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store netDB and peerProfiles in a key-value storage #1141
Comments
I see too different problems:
While 1. could be implemented with any approach using a single big file instead bunch of small, 2. is a subject for discussions and suggestion. |
As I can see, some sources of (write)I/O operations in NetDb are storing info on updated routers and storing profiles for unreachable ones. One of solutions is to store this information in some sort of buffer, from which records are flushed on a timeout or on repletion. I don't know, how often routers become reachable in a short time after being unreachable, maybe this buffer could be a queryable part of a new storage. |
Another way to reduce disk I/O might be making netDb and peerPorfiles disk synchronisation interval configurable. It will allow users to make disk writes/RAM consumption tradeoffs themselves, interval value 0 might stand for no sync at all (don't know what would be better to do with peerProfiles in this case: maybe, don't keep them at all, maybe keep them in size-restricted LRU cache) . If it's possible to add external dependency, I suggest TDB: it's small (43k) and widely used (because part of samba). If not, I will be glad to write custom storage (probably, based on HAMT, since all keys are equal in size), though this effort will likely end up in reimplementation of most of already existing solutions' features. |
Go ahead and implement these config params |
Synchronization interval option: #1285 |
if you wish try to implement a flat file (tar like) for entire storage. Meaning you store all files sequentially in one shot. |
To address the issue of high disk usage by NetDb and PeerProfiles, which is especially bad for devices with low flash and/or RAM (when using tmpfs), like cheap routers, Raspberry Pi and Anrdoid SDCard.
The text was updated successfully, but these errors were encountered: