I now want to implement moving directories to memory.
I followed this page, which was quite helpful.
https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/Configuration/SSD-Tuning-for-Linux_1966304/
This person set up his system as follows.
LABEL=SSDsuse121 / ext4 acl,noatime,nodiratime,discard 1 1
LABEL=SSDsuse121m /suse121m ext4 acl,noatime,nodiratime,discard 0 2
LABEL=SSDcommon /common ext4 acl,noatime,nodiratime,discard 0 2
LABEL=SSDsuse122m /suse122m ext4 acl,noatime,nodiratime,discard 0 2
LABEL=SSDgrub /grub ext4 noacl,noatime,nodiratime,discard 0 2
LABEL=SSDswap swap swap defaults 0 0 proc
/proc proc defaults 0 0 sysfs
/sys sysfs noauto 0 0 debugfs
/sys/kernel/debug debugfs noauto 0 0 usbfs
/proc/bus/usb usbfs noauto 0 0 devpts
/dev/pts devpts mode=0620,gid=5 0 0 tmpfs
/ramdisk tmpfs nodev,nosuid,noatime,mode=1777,size=100M 0 0 tmpfs
/tmp tmpfs defaults,noatime,mode=1777 0 0 tmpfs
/var/spool tmpfs defaults,noatime,mode=1777 0 0 tmpfs
/var/tmp tmpfs defaults,noatime,mode=1777 0 0paste code here
Note that he also used “1 1” for /.
As already mentioned , that created intramfs dump for me and “0 1” solved it.
What I dont agree with is with swapspace being on the SSD. That WILL kill it.
What I do is just to not have any swap at all and then deal with applications that physically need a swap partition by creating it in memory.
I generally prefer just to buy and install way-way more memory than I need, and just get rid of the swap partition. Memory ends up much cheaper in the long run than failing SSD’s. Difficult to sell a well used SSD and memory generally can increase in value in some cases. To me it is a no-brainer.
What he also did was to add nodiratime and acl. I did that and it works with those options.
My immediate question to both of you.
Do you agree with the directories he mounted in physical memory, that is all the entries below the LABEL entries.
Are there any more you want me to add, or for some reason keep on the SSD. ?
What I want to arrive at is that the system boots from the SSD, but then basically run in memory, and applications are loaded from the SSD, and nothing else.
Should last way longer and give me max benefits.
After all this is done, and I find any application that uses a root access cache in its directory or such, and it becomes obvious it is a busy process, then I can always move it to memory.
So I will have to monitor all SSD activity continuously and set traps.