Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Feb 2023 09:04:02 -0700
From:      Alan Somers <asomers@freebsd.org>
To:        jbo@insane.engineer
Cc:        "hackers@freebsd.org" <hackers@freebsd.org>
Subject:   Re: Swap, ZFS & ARC
Message-ID:  <CAOtMX2iDupBJkPuNzpACivdxVKKKW_rHFFkaNexsSfbeCc-YBw@mail.gmail.com>
In-Reply-To: <c70BKF1xrExMKWQeTJtDhOqJVqISFp9RjHFwT0XWDh3sTXyi0NMRkVhOyp_YkTXXAV7Dtm4tK4_XsOwSXuZRT39ObYtFpPoe6biv22jMNnM=@insane.engineer>
References:  <ysSGWaXF7vCDubzgFdov_9k6SMLNdZ3-zHV-2LOraYOxV_8yoAkDVPqDSicYsgBw1KdL6BjP4FkK1KFs7NKZ4RRXcSDxVe_Qy_i7b_5AbSI=@insane.engineer> <1689ba8c-a317-ce1f-2854-99566468a9ed@grosbein.net> <c70BKF1xrExMKWQeTJtDhOqJVqISFp9RjHFwT0XWDh3sTXyi0NMRkVhOyp_YkTXXAV7Dtm4tK4_XsOwSXuZRT39ObYtFpPoe6biv22jMNnM=@insane.engineer>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Feb 2, 2023 at 8:45 AM <jbo@insane.engineer> wrote:
>
>
>
>
>
>
> ------- Original Message -------
> On Thursday, February 2nd, 2023 at 14:41, Eugene Grosbein <eugen@grosbein=
.net> wrote:
>
>
> >
> >
> > 02.02.2023 21:28, jbo@insane.engineer wrote:
> >
> > > 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 cou=
ld find very little to no information on this which leads me to believe tha=
t there is some "core concept" I might be oblivious to.
> > >
> > > The main question is basically this: Your system starts to swap out d=
ata from RAM to your swap partition.
> > > This swap data on disk ultimately resides somewhere in a ZFS pool.
> >
> >
> > I prefer not doing this. That is, all my systems have swap partition ou=
tside of ZFS pool.
>
> This isn't really achievable on your average "single disk" desktop system=
s, right?
> Assuming I'm not missing something (which is why I came here to ask), a "=
regular" or "default" installation through the FreeBSD installer would setu=
p a swap partition within the zpool, right?

Actually, the installer by default sets up a swap partition beside the
zroot pool.  It doesn't use swap-on-zvol.  Here's what it looks like:

> gpart show
=3D>        40  1953525088  nvd0  GPT  (932G)
          40      532480     1  efi  (260M)
      532520        1024     2  freebsd-boot  (512K)
      533544         984        - free -  (492K)
      534528    16777216     3  freebsd-swap  (8.0G)
    17311744  1936211968     4  freebsd-zfs  (923G)
  1953523712        1416        - free -  (708K)

=3D>        40  1953525088  nvd1  GPT  (932G)
          40      532480     1  efi  (260M)
      532520        1024     2  freebsd-boot  (512K)
      533544         984        - free -  (492K)
      534528    16777216     3  freebsd-swap  (8.0G)
    17311744  1936211968     4  freebsd-zfs  (923G)
  1953523712        1416        - free -  (708K)

> zpool status zroot
  pool: zroot
 state: ONLINE
  scan: resilvered 314G in 00:10:19 with 0 errors on Sat Dec 24 22:31:04 20=
22
config:

    NAME        STATE     READ WRITE CKSUM
    zroot       ONLINE       0     0     0
      mirror-0  ONLINE       0     0     0
        nvd0p4  ONLINE       0     0     0
        nvd1p4  ONLINE       0     0     0

> swapinfo
Device          1K-blocks     Used    Avail Capacity
/dev/gpt/swap0    8388608        0  8388608     0%



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2iDupBJkPuNzpACivdxVKKKW_rHFFkaNexsSfbeCc-YBw>