Community discussions

MikroTik App
 
moveik
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Tue Nov 24, 2020 1:16 am

Feature request: Moving operations to RAM memory

Sat Feb 04, 2023 1:23 pm

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.
 
ConradPino
Member
Member
Posts: 337
Joined: Sat Jan 21, 2023 12:44 pm
Contact:

Re: Feature request: Moving operations to RAM memory

Sat Feb 04, 2023 1:42 pm

/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
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11381
Joined: Thu Mar 03, 2016 10:23 pm

Re: Feature request: Moving operations to RAM memory

Sat Feb 04, 2023 8:12 pm

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.

Who is online

Users browsing this forum: Bing [Bot], miks and 64 guests