Feature request: Moving operations to RAM memory

As far as I know, the MikroTik device / RouterOS performs its operations while writing them to the Flash / permanent storage.

I think it will be more efficient and reduce Flash wearout if many operations will be performed in memory.

For example:

  • Uploading a file to the device is most likely only temporary - so it is better to keep it in RAM.
    (Writing it to permanent storage is wasteful if it will be deleted soon.)
    This includes scripts or backup files etc.
  • Capturing traffic using the sniffer allows to save a file.
    It is more efficient to save it to RAM (assuming it isn’t too big) so that later the user downloads it to PC and can delete the file which is on the device.
  • Some commands would be more efficient if they are done in memory, due to their relatively high execution frequency.
    For example, we might want to have a mechanism that if some MAC address is detected in the network, then we use the firewall to block a certain type of traffic.
    Currently, that would require changing the firewall everytime that the address is detected - which would perform a write of the change to the permanent storage.

As you know, Flash technology isn’t able to modify a small amount of bytes - rather, it rewrites at least 4KB of data to the Flash - so any tiny change of data leads to a big change on the Flash storage.

/export file=exportfile
/file print
/system reboot

After system reboot file “exportfile.rsc” is gone which suggests RAM volume with flash volume mounted to the RAM volume.

Configuration changes do not persist in Safe Mode

Since ages ROS can use RAM as disk. But only on devices with less than 32MB flash and more than 64MB RAM. For example haP ac2 uses RAM disk as root of storage and mounts flash under /flash.
In such cases ROS stores exported files in RAM disk by default, upload goes to RAM disk by default as well.

What’s new with 7.7 is that it’s possible to create RAM disk at will. But ROS will only use it when it’s possible to set file name (and path) explicitly.