Linux is a two-edged sword. On the one hand, there’s so much you can configure. On the other hand, there’s so much you can configure. It is sometimes hard to know just what you should do to get the best performance, especially on a small platform like the Raspberry Pi. [Hayden James] has a suggestion: enable ZRAM and tweak the kernel to match.
Source: ZRAM Boosts Raspberry Pi Performance | Hackaday
Also see: Raspberry Pi Performance: Add ZRAM and these Kernel Parameters (hayden-james@linux:~$ _)