Whole PC lags when opening a GUI

Whenever I open any GUI in game, a chest, settings, etc, my whole pc lags up. The game is otherwise running at a steady 100fps with no drops in performance. I've allocated 18G of ram but it's only using half of that. I'm also running ~150 mods but it doesn't seem to have an affect on it, as the lag occurs when just running Sodium and Iris.

It only occurs inside a game, not on the menu screen.
Was this page helpful?