Am using my rickety old laptop as my daily driver these days, because … reasons.
And now, that I run PyCharm alongside Emacs, alongside Chrome in its various incarnations, the poor old thing crashes, freezes and stutters a lot.
A cursory inspection told me that while I had plenty of CPU firepower, I was constantly running out of ram (8gb) and swap (1 gb partition).

Too broke to add more ram to the system right now (don’t even know if this thing will support 8 gb modules to push it up to 16).
So the only way to go, was to somehow increase the swap on my system.
This is the checklist for curious / researching Jason in the future.

  1. Make sure system is backed up
  • Check if there is a swap file or partition
  • If there’s a file then we’re in luck. If it’s a partition then,
  • Just make sure we have a live usb disk. I used my Mint installer
  • Then we need to turn swap off (swapoff command)
  • If there’s a partition / file entry in fstab remove it
  • Now, if it’s a file skip down to step 13
  • If it’s a partition boot off the live usb disk
  • Install some gui partition tool off the net, depending on the kind of partition we have. (for e.g. GParted for raw ext4 partitions and blivet-gui for lvm stuff)
  • Best way forward (to my mind) is to get rid of the partition and then create a swapfile
  • So delete the swap partition, and resize the main one to take in the free space left behind (this could take a while)
  • Once done boot back into the system
  • Create a bigger swapfile and activate it. (mkswap,swapon) (I made mine 3gb. (while having 8gb of ram))
  • Create entry in fstab
  • Reboot

Linuxize, has a pretty good guide on the commands and permissions involved.

P.S. Subscribe to my mailing list!
Forward these posts and letters to your friends and get them to subscribe!
P.P.S. Feed my insatiable reading habit.