1/25/2024 0 Comments Miray RAM Drive instaling![]() ![]() Once the package is installed, APT package manager automatically deletes the. If you use a Debian-based Linux distribution, the temporary download directory for software packages is /var/cache/apt/archives/. The Linux operating system has two activities that make up the most write and delete operations. To increase the lifespan of your SSD, you should avoid write and delete operations on the SSD as much as possible. sudo mount -a Using RAM Disk to Reduce SSD Wear Out To mount it immediately without reboot, run the following command. Your Linux system will automatically mount the RAM disk when your computer boots up. X-gvfs-show will let you see your RAM disk in file manager. sudo nano /etc/fstabĪdd an entry like this: myramdisk /tmp/ramdisk tmpfs defaults,size=1G,x-gvfs-show 0 0 Auto-mount on System BootĮdit /etc/fstab file. The write speed is 534MB/s and read speed 1.6GB/s. To test read speed, run: sudo dd if=/tmp/ramdisk/zero of=/dev/null bs=4k count=100000 sudo dd if=/dev/zero of=/tmp/ramdisk/zero bs=4k count=100000 To test write speed of RAM disk, you can use dd utility. This is how you can test if your RAM disk is working. If I unmount RAM disk, sudo umount /tmp/ramdisk/Įverything in that directory will be lost and RAM usage goes down to original. Now if I copy my VirtualBox machines file (5.8G) into the RAM disk, my RAM usage suddenly goes up to 9.22G. If we issue the following command mount | tail -n 1 sudo mount -t tmpfs -o size=10G myramdisk /tmp/ramdisk To allocate 10G for the RAM disk, run this instead. sudo mount -t tmpfs -o size=1024m myramdisk /tmp/ramdisk myramdisk is the device name I gave to it. It will be using tmpfs file system and its size is set to 1024MB. This can be done with the following one-liner. You can see from the screenshot above that I have plenty of free RAM, so I can easily allocate 1GB for my RAM disk. Then all left to do is to specify the file system type, RAM disk size, device name and mount it to the above directory. Next, check how much free RAM are left on your system with htop command line utility because we don’t want to use too much RAM. If you want to let every user on your Linux system use the RAM disk, then change its permission to 777. How to Create a RAM Disk in Any Linux Distroįirst make a directory which can be anywhere in the file system such as sudo mkdir /tmp/ramdisk ![]() This of course requires your computer to have a large capacity RAM. After shutting down the VM, I move the VM files back to HDD, which takes less than 1 minute. I can move the VM from HDD to RAM disk before starting the VM, so the VM can run much faster. I can’t run many VMs directly on the SSD and I’m not happy about the speed of my 2TB mechanical hard drive (HDD).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |