The root of Your problem is SWAP is not the solution, it's such a crutch.
As soon as the system starts to climb, so start hard brakes...
From myself I can recommend the following:
1)Gulp and everything connected with it in a Docker container. The container limit on RAM.
2)In playOnLimux can limit RAM hocks? Yes, put.
3)In Chrome, see is there any extra extension.
4)Turn off swap
About extensions in Chrome.
Is extension Extension Automation
. For example, Your development environment only works when You open a domain host.my-dev. Also You have 2 extensions that You want only when you work with him. Extension Automation set up so that if I open the website host.my-dev, then to activate these extensions. By default, they are, of course, disabled in the settings of chrome.
Similarly, if there are any extensions that You never use when working with Gulp and all that it involves.
Also Chrome loves to eat memory if it stores too much history.
Method of solution fast: the "More tools => Clear browser data => Older than 1 week"
Automatic method: download the extension Limit Lifetime History
, which itself destroys all data older than N days.