Remix.run Logo
▲ glenngillen 2 hours ago

I'd been running into a lot of disk pressure on my system from agents running. I discovered two main causes:

- my approach to using git worktrees for all work. Not entirely surprising, the duplicated build artifacts in each worktree being the main culprit here. There were some limited gains to be had by just being more efficient with how builds were managed but ultimately I just had to limit the number of concurrent features I was working on in a couple of particularly large repos.

- more insidious was the fact I was actually hitting memory limits more than I realised and causing my mac to have to swap heavily. The system was surprisingly still quite performant while this was happening... until it wasn't. Unfortunately as best I can tell the only "fix" when this happens is to restart the machine. There's no way to have the system reclaim any of the swap space once it's written to disk. Which if you have it thrash a couple of times a day (especially easy if you leave something running overnight) adds up very quickly.

▲singularity2001 2 hours ago | parent [-]

switching to copy on write worktrees is the biggest game changer it should become common knowledge pretty soon and it's already available on most operating systems