Score:0

SWAP - Ramdisk file make system update crash

gp flag

Kubuntu 22.04 LTE I have 16 GB primary memory on this i7 laptop and 1 TB SSD, I want to add temporary files such as swap, cache etc. as much as possible on the primary memory to save on the number of write cycles on my SSD memory and speed up my old computer a bit. I tried this, it worked fine until a system update came and I had to remove it. Is there better coding? See below the coding I did with help from AI:

  1. sudo mkdir /mnt/ramdisk
  2. sudo mount -t tmpfs -o size=4G tmpfs /mnt/ramdisk
  3. Create the ramdisk file:
    sudo nano /etc/fstab
  4. tmpfs /mnt/ramdisk
    tmpfs defaults,noatime,mode=1777 0 0 /mnt/ramdisk/swapfile none swap sw 0 0
    tmpfs /var/cache tmpfs defaults,noatime,mode=1777 0 0
  5. Rebooted, and it works until system update came and then I got the error report that the system could not be updated. Probably the swap area was too small.
  6. Is there a better solution?
  7. Can it be included in UBUNTU update
muru avatar
us flag
So... swap is used when you're running out of RAM. And you decided to use RAM for swap ... This is like that "yo dawg" meme: yo dawg, I heard you liked RAM, so I put swap in RAM! Why even bother with swap then? Just don't add swap at all, and you'll use your RAM directly!
nor parn avatar
gp flag
TNX, that's logical! I didn't know and AI didn't know.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.