Skip to content

RAM operation (like redis)

Adriano edited this page Apr 21, 2015 · 1 revision

For Linux only: one can use the virtual filesystem in RAM memory to avoid writing to disk. Very nice feature, for example, if you are using yserial as a rapid-fire queue.

So within y_serial, just set the file to "/dev/shm/example.sqlite" which acts as if it were a regular file. The file size should be appropriate relative to your RAM.

The example file will stay in memory until shutdown, so at some point one could copy it to disk or rm it altogether (to reclaim the space it occupied in RAM).

Of course, one could first copy a file from disk to /dev/shm and startup y_serial as above. Write back to disk later to update and save the work from RAM.

-Adriano, 2011-02-17

Clone this wiki locally