DFO-Ocean-Navigator / netcdf-timestamp-mapper

Maps timestamps (and variables) to a corresponding nc file using sqlite3.
https://dfo-ocean-navigator.github.io/netcdf-timestamp-mapper/
GNU General Public License v3.0
1 stars 1 forks source link

Enable databases to be created in-memory. #27

Open htmlboss opened 4 years ago

htmlboss commented 4 years ago

Right now we only support .sqlite3 files on disk as the storage form for the databases. Allowing in-memory paths would give users another way to host volatile data, and enable better unit testing.

https://www.sqlite.org/inmemorydb.html

dwayne-hart commented 2 years ago

Most distributions provide either a limited tmpfs file system accessible by using /dev/shm or zram which is a different memory backed file system which is (de)compressed using the lzo-rle algorithm for example as well may be limited to a small number of core processors or by default allowed to use all available processors.

To setup an alternate tmpfs file system use the command sudo mount -t tmpfs -o size=20g tmpfs /mnt/ramdisk If your system has the ability to use zram (check to see if zramctl is installed. To hot add a zram disk use the following commands

replace the integer at the end of the string zram to the value of the most recently added compressed memory disk. Once done you can tear the compressed memory disk down using the following steps;