Is there any ways for me to load files into RAM for faster calculation
I'm studying with Bioinformatics now. I'm working with alignment programs like BWA. I'm wonder is there any commands or directories that allow me to copy the fastq file from hard drives into RAM and perform all alignments and calculation on it, only print the output to hard drive. Or at least it can work with RAM
Solution 1:
you could use RAMFS to create/mount a directory into RAM then copy your files into it. There is also another way to achieve what you want with vmtouch
sudo mkdir -p /mnt/ram
sudo mount -t ramfs /mnt/ram
sudo chmod 755 /mnt/ram
cp /path/to/myFile /mnt/ram/myFile
Of course, the content of /mnt/ram
will be lost when unmounting or/and rebooting
Free the temporary mounted ram files :
sudo umount /mnt/ram
sudo rmdir /mnt/ram
Solution 2:
Mkusb Frugal Persistent Live Install with toram
mkusb: https://help.ubuntu.com/community/mkusb, creates Persistent Live Frugal installs that will boot toram.
The Frugal install can be loaded to USB or to internal disk.
I think this makes a very fast system, if you have enough RAM.
Between sessions data is saved on a persistent ext4 overlay partition. You can also add FAT32 and NTFS Data partitions.