CSGO lagging and freezes

  1. Buy a USB stick. As stated earlier, 8 GB should be enough, 16 GB should be more than enough, 32 GB should be far more than enough.

  2. Plug the USB stick in.

  3. In the Disks (gnome-disks) application, format the drive as a swap drive.

  4. Click the 'Gears' icon and select 'Edit Mount Options'.

  5. Select "Mount At System Startup".

  6. Select "Identify As UUID=xxxxxxx" (whatever the UUID of the drive is).

  7. Under 'Symbolic Icon Name', put "sw" (sans the quotes).

  8. Under 'Filesystem Type', put "swap" (sans the quotes).

Or you can do steps 1 through 3, then manually set up the drive in fstab (all you're doing above is setting up fstab via a GUI):

Then reboot. Test if the new swap drive is auto-mounted at boot by issuing in Terminal:
sudo swapon --show

It should look something like this:

sudo swapon --show                                                                                   # Show Swap File Status
NAME      TYPE      SIZE USED PRIO
/dev/sdb2 partition  24G   0B   -3
/dev/sda2 partition  24G   0B   -2

If it didn't auto-mount at boot, let us know, and we'll troubleshoot.