Speeding up a Chromebook by allocating zram
Oddly enough, in the few days since I've bookmarked this URL, it's disappeared. Thank goodness for the Internet Archive!
I'll post the main details below, which are instructions for making Chromebooks run faster by allocating compressed cache. Note that on my Google Pixelbook (2017) I used '4000' instead of the '2000' recommended and it's really made a difference
Also see: Cog - System Info Viewer
You use zram (otherwise known as compressed cache - compcache). With a single command you can create enough zram to compensate for your device's lack of physical RAM. You can create as much compcache as you need; but remember, most Chromebooks contain smaller internal drives, so create a swap space that doesn't gobble up too much of your physical drive (as swap is created using your Chromebook internal, physical drive).
To create compcache, you must work within Crosh (Chromebook shell), aka the command line. Believe it or not, the command use for this is incredibly simple; but the results are significant (especially in cases where you're frequently running out of memory).
[...]
The first thing you must do is open a Crosh tab. This is simple and doesn't require anything more than hitting the key combination [Ctrl]+[Alt]+[t]. When you find yourself at crosh> you know you're ready to go.
The command to create swap space is very simple and comes in the form of:
swap enable SIZE
Where SIZE is the size of the swap space you wish to create. The ChromeOS developers suggest adding a swap of 2GB, which means the command would be:
swap enable 2000
Once you've run the command, you must then reboot your Chromebook for the effect to take place. The swap will remain persistent until you run the disable command (again, from Crosh), like so:
swap disable
No matter how many times you reboot, the swap will remain until you issue the disable command.
How to prevent a Chromebook from running out of memory | TechRepublic (archive.org link)