how to set vfs.zfs.arc.max in 15-current ?

70 views
Skip to first unread message

void

unread,
Oct 12, 2023, 1:33:20 PM10/12/23
to freebsd...@freebsd.org
Is there a new way to set arc.max in 15-current?

It's no longer settable (except to "0") in main-n265801 (Oct 7th)
while multiuser.

# sysctl vfs.zfs.arc.max=8589934592
vfs.zfs.arc.max: 0
sysctl: vfs.zfs.arc.max=8589934592: Invalid argument

--

Cy Schubert

unread,
Oct 12, 2023, 2:28:21 PM10/12/23
to freebsd...@freebsd.org
Try reducing your arc.max by an order of 10. This suggests that it's
probably failing in param_set_arc_max() in the val >= arc_all_memory()
comparison..


--
Cheers,
Cy Schubert <Cy.Sc...@cschubert.com>
FreeBSD UNIX: <c...@FreeBSD.org> Web: https://FreeBSD.org
NTP: <c...@nwtime.org> Web: https://nwtime.org

e^(i*pi)+1=0




void

unread,
Oct 12, 2023, 7:00:12 PM10/12/23
to freebsd...@freebsd.org
On Thu, Oct 12, 2023 at 11:27:49AM -0700, Cy Schubert wrote:
>In message <ZSgtvuWSpRKxIE9N@int21h>, void writes:
>> Is there a new way to set arc.max in 15-current?
>>
>> It's no longer settable (except to "0") in main-n265801 (Oct 7th)
>> while multiuser.
>>
>> # sysctl vfs.zfs.arc.max=8589934592
>> vfs.zfs.arc.max: 0
>> sysctl: vfs.zfs.arc.max=8589934592: Invalid argument
>
>Try reducing your arc.max by an order of 10. This suggests that it's
>probably failing in param_set_arc_max() in the val >= arc_all_memory()
>comparison..

Hi, thanks for replying. Sadly, your suggestion doesn't work in this case:

root@beer:/usr/src# sysctl vfs.zfs.arc.max=8589934592
vfs.zfs.arc.max: 0
sysctl: vfs.zfs.arc.max=8589934592: Invalid argument
root@beer:/usr/src# sysctl vfs.zfs.arc.max=858993459
vfs.zfs.arc.max: 0
sysctl: vfs.zfs.arc.max=858993459: Invalid argument
root@beer:/usr/src# sysctl vfs.zfs.arc.max=85899345
vfs.zfs.arc.max: 0
sysctl: vfs.zfs.arc.max=85899345: Invalid argument
root@beer:/usr/src# sysctl vfs.zfs.arc.max=8589934
vfs.zfs.arc.max: 0
sysctl: vfs.zfs.arc.max=8589934: Invalid argument
root@beer:/usr/src# sysctl vfs.zfs.arc.max=858993
vfs.zfs.arc.max: 0
sysctl: vfs.zfs.arc.max=858993: Invalid argument
root@beer:/usr/src# sysctl vfs.zfs.arc.max=85899
vfs.zfs.arc.max: 0
sysctl: vfs.zfs.arc.max=85899: Invalid argument
root@beer:/usr/src# sysctl vfs.zfs.arc.max=8589
vfs.zfs.arc.max: 0
sysctl: vfs.zfs.arc.max=8589: Invalid argument

--

Juraj Lutter

unread,
Oct 13, 2023, 2:13:12 AM10/13/23
to void, freebsd...@freebsd.org


> On 13 Oct 2023, at 00:59, void <vo...@f-m.fm> wrote:
>
>> Try reducing your arc.max by an order of 10. This suggests that it's
>> probably failing in param_set_arc_max() in the val >= arc_all_memory()
>> comparison..
>
> Hi, thanks for replying. Sadly, your suggestion doesn't work in this case:
>
> root@beer:/usr/src# sysctl vfs.zfs.arc.max=8589934592
> vfs.zfs.arc.max: 0
> sysctl: vfs.zfs.arc.max=8589934592: Invalid argument

Set also vfs.zfs.arc.min to some value higher than zero.


Juraj Lutter
ot...@FreeBSD.org


void

unread,
Oct 13, 2023, 2:35:42 AM10/13/23
to freebsd...@freebsd.org
On Fri, Oct 13, 2023 at 08:12:47AM +0200, Juraj Lutter wrote:

>Set also vfs.zfs.arc.min to some value higher than zero.

aha! that worked!!! :D

root@beer:/root# sysctl vfs.zfs.arc.min=1073741824
vfs.zfs.arc.min: 0 -> 1073741824
root@beer:/root# sysctl vfs.zfs.arc.max=8589934592
vfs.zfs.arc.max: 0 -> 8589934592
root@beer:/root#

thank you!
--

Toomas Soome

unread,
Oct 13, 2023, 2:46:52 AM10/13/23
to Current FreeBSD
That is a bit odd, arc min used to be 64MB as lowest value - that is, it should never be 0.

rgds,
toomas

void

unread,
Oct 13, 2023, 5:00:34 AM10/13/23
to freebsd...@freebsd.org
On Fri, Oct 13, 2023 at 09:46:08AM +0300, Toomas Soome wrote:

>That is a bit odd, arc min used to be 64MB as lowest value - that is, it should never be 0.

It was the default here (i.e. the value wasn't set in either loader.conf or
sysctl.conf)

world+kernel was built/installed today the 13th main-n265915-be91b4797e2c (amd64)
--

Graham Perrin

unread,
Oct 13, 2023, 4:20:57 PM10/13/23
to freebsd...@freebsd.org
Reply all
Reply to author
Forward
0 new messages