Swap, ZFS & ARC

From: <jbo_at_insane.engineer>
Date: Thu, 02 Feb 2023 14:28:48 UTC
Hello folks,

Based on a discussion on the forums not so long ago I tried to figure out how swap usage on a ZFS system plays together with ARC. However, I could find very little to no information on this which leads me to believe that there is some "core concept" I might be oblivious to.

The main question is basically this: Your system starts to swap out data from RAM to your swap partition. This swap data on disk ultimately resides somewhere in a ZFS pool. If this data then gets accessed, it might be cached by ARC essentially eating up memory again which seems counter productive.
Is there any magic which prevents swap partitions from being loaded into ARC? Or is this a non-issue for some other reason?

Best regards,
~ joel