The `zfs_arc_max` setting *is* respected when I set it to a value of
`1073741824` = 1GiB

```
cat /etc/modprobe.d/zfs.conf; cat /sys/module/zfs/parameters/zfs_arc_max; cat 
/proc/spl/kstat/zfs/arcstats |grep ^size -B3
options zfs zfs_arc_max=1073741824

1073741824

c                               4    1073741824
c_min                           4    519804800
c_max                           4    1073741824
size                            4    1086124448
```

The manpage `man zfs-module-parameters` says

```
zfs_arc_max (ulong)
Max  arc  size of ARC in bytes. If set to 0 then it will consume 1/2 of system 
RAM. This value must be at least 67108864 (64 megabytes).

This value can be changed dynamically with some caveats. It cannot be
set back to 0 while running and reducing  it  below the current ARC size
will not cause the ARC to shrink without memory pressure to induce
shrinking.

Default value: 0.
```

Before I had set it to `134217728`, more than 64MiB, but it was not
respected.

I also tried setting `zfs_arc_max` to `519804800` (495.7MiB, where ever
this number comes from), the value reported as `c_min` and it *not*
respected.

So, the minimum arc size seems to be around 1GB and *not* 64MB, as the
manpage claims. (documentation lies, the code does not)

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to zfs-linux in Ubuntu.
https://bugs.launchpad.net/bugs/1854480

Title:
  zfs_arc_max not working anymore in zfs 0.8.1

Status in zfs-linux package in Ubuntu:
  Fix Released

Bug description:
  In the past I could limit the size of L1ARC by specifying "options zfs
  zfs_arc_max=3221225472" in /etc/modprobe.d/zfs.conf. I tried even to
  fill /sys/module/zfs/parameters/zfs_arc_max directly, but none of
  those methods limits the size of L1ARC. It worked nicely in zfs 0.7.x.

  Nowadays I use a nvme drive with 3400 MB/s read throughput and I see
  not much difference between e.g booting the system from nvme and
  rebooting the system from L1ARC. Having a 96-99% hit rate for the
  L1ARC, I like to free up some memory, thus avoiding some delay of
  freeing memory from L1ARC while loading a VM.

  -------------------------------------------------------------------------
  UPDATE:

  The system only limits the L1ARC, if we directly after the login write
  the zfs_arc_max value to the file
  /sys/module/zfs/parameters/zfs_arc_max.

  ------------------------------------------------------------------------

  ProblemType: Bug
  DistroRelease: Ubuntu 19.10
  Package: zfsutils-linux 0.8.1-1ubuntu14.1
  ProcVersionSignature: Ubuntu 5.3.0-23.25-generic 5.3.7
  Uname: Linux 5.3.0-23-generic x86_64
  NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
  ApportVersion: 2.20.11-0ubuntu8.2
  Architecture: amd64
  CurrentDesktop: ubuntu:GNOME
  Date: Fri Nov 29 06:19:15 2019
  InstallationDate: Installed on 2019-11-25 (3 days ago)
  InstallationMedia: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
  SourcePackage: zfs-linux
  UpgradeStatus: No upgrade log present (probably fresh install)
  modified.conffile..etc.sudoers.d.zfs: [inaccessible: [Errno 13] Permission 
denied: '/etc/sudoers.d/zfs']

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1854480/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to