Some years ago (2020) I saw an external backup tool that was extracting all the files from a RouterOS backup archive.
I haven’t used that tool since then, and I think it no longer works with newer ROS versions, haven’t checked for any updates yet.
But I still have the sample output of it from then, which shows:
RouterOS uses countless small databases consisting of file.dat and file.idx pairs.
There are even 248 such databases (dat + idx files) in the directory tree of RouterOS.
Since my setup was simple, it is to assume that this number is even a low number.
I’m sure this can much be improved by using “set” and “multiset” containers of C++ (or the equivalent in C).
By this, the idx files would be eliminated.
The end result is: faster file access and less file access (by using an intelligent caching mechanism), but memory use would increase.
And also the MTBF of the devices then can be doubled or even tripled, IMO ![]()
Another advantage is more flexibility by using multiple (in-memory implicit) indexes for the same data.
Index key can of course also be a compound (ie. can consist of many fields).
And via mutex (locking, even on a data record level) one can access the data also simultaneously from multiple threads.
If MikroTik is interessted I can help & assist as a consultant / freelancer; I’m an experienced senior C++ professional.