From owner-freebsd-current@freebsd.org Wed Jul 6 23:28:17 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68194B75BF4 for ; Wed, 6 Jul 2016 23:28:17 +0000 (UTC) (envelope-from nathan.bosley@gmail.com) Received: from mail-yw0-x231.google.com (mail-yw0-x231.google.com [IPv6:2607:f8b0:4002:c05::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A0541A65 for ; Wed, 6 Jul 2016 23:28:17 +0000 (UTC) (envelope-from nathan.bosley@gmail.com) Received: by mail-yw0-x231.google.com with SMTP id i12so1334574ywa.1 for ; Wed, 06 Jul 2016 16:28:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=5fMiLbCzom0uUMg5aoSMyFGlCzNhH4Yig6J304TJHRU=; b=mVIMJ1XRmy7dkv6dS2CM/RXmq/2lyOlmCtu21hU5JHy1qLhLRNVdWl23OdRzZTqwtF bvankz1bypqp3t+Kg8+bFLjyO7+wqldslAERlgtzuG9DVLtJRlwpWurHLkMDzm2F7tXX 2fv6rQy9ph5NcI5vmocUqISUc0nOOTiLqLACzOXK51P4q2LoQD5Bnq4Pg31MNB7ibtQJ Ny0RxB3mY4HlCbRB2jYwsFFnz0An6tLcuX3cpKb+hho2eTaW67fo/PRmgSnlaqkDxmoJ p0tJg+dD25wrlP3IqXHCzwpW4VacnKM6XplJAW6cxaKgrO7t9xIsPWgUrjZnbXpuUlNp Pv9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=5fMiLbCzom0uUMg5aoSMyFGlCzNhH4Yig6J304TJHRU=; b=b34WXbYJAuCS0jto6NvVSzkuW8bFAIpc1hWsusMOjPVUVCS8za90ia066p2FNBsg8W ePoKMkgW4ztfLLwCtapXk8qqwr+S5L5m0Cf+YEX/MHpD3UFqU3s+/otHLlpLyb77qfOu H8CXq8dyr4A7ehdErdtMvv6yrbdGBb9U0l8TLbkusFkqKKwYo4W8y2Nn8Dq8yI4D8Pxv cpjB9WRg01wi2ykodap2Lan0xN4g2oqRobFyGw7bBw/bdv8JDeGEOQBTMrlc7aOTN+NE 9lCUmvy4MYF+oJJgcSJikN+Rr3F05buRbCmIv6z12Zu2YCZK8hMXhuT8w46C5lItf6KR 1edg== X-Gm-Message-State: ALyK8tK0cPe7Vdtn/aw3yhvHbtSWqD3TT8HuTRm1I42DIX6crhNjuEATQVJgwFF5/fHz7zJ7MZVMcfvAycgG1A== X-Received: by 10.129.24.142 with SMTP id 136mr13180940ywy.240.1467847696227; Wed, 06 Jul 2016 16:28:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.97.8 with HTTP; Wed, 6 Jul 2016 16:28:15 -0700 (PDT) In-Reply-To: <4d83c12e-e9d9-b5a8-e6cb-733924d6fd7d@multiplay.co.uk> References: <975e5ae2-2090-94cd-49c0-eee9866ff02b@freebsd.org> <145180d1-43c9-d894-9221-b210d641955d@freebsd.org> <7255f240-8cf0-0a62-89be-2a0970b67063@freebsd.org> <4d83c12e-e9d9-b5a8-e6cb-733924d6fd7d@multiplay.co.uk> From: Nathan Bosley Date: Wed, 6 Jul 2016 19:28:15 -0400 Message-ID: Subject: Re: Setting sysctl vfs.zfs.arc_max failed: 22 To: Steven Hartland Cc: freebsd-current@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jul 2016 23:28:17 -0000 Awesome. I'll probably try this tonight or tomorrow. Thanks very much! On Wed, Jul 6, 2016 at 4:35 PM, Steven Hartland wrote: > The ARC settings and kmem aren't initialised when tunables are loaded so > the tests fail. > > I've fixed this locally by blindly setting if ARC is not configured. > Request to commit the fix is with re@ > > In the mean time the patch is attached. > > Thanks for the report and sorry about the breakage. > > > On 06/07/2016 07:20, Nathan Bosley wrote: > >> Maybe I misunderstood after all. >> I took this: >> "You can work around it temporarily by setting a lower arc_min first." >> >> To mean that I could do something like: >> vfs.zfs.arc_min="1073741824" >> vfs.zfs.arc_max="8589934592" >> >> in loader.conf, which would circumvent the problem. >> But with the above, in that order, I still get: >> >> Setting sysctl vfs.zfs.arc_max failed: 22 >> Setting sysctl vfs.zfs.arc_min failed: 22 >> >> As an FYI, WITHOUT any tunables set, my defaults are: >> vfs.zfs.arc_meta_limit: 3903459328 >> vfs.zfs.arc_min: 1951729664 >> vfs.zfs.arc_max: 15613837312 >> >> So even if I only specified: >> vfs.zfs.arc_max="8589934592" >> >> in loader.conf, that's still not below my default min. >> >> However, if I make the changes with 'sysctl' after boot, it works fine: >> >> root@athlonbsd:~ # sysctl vfs.zfs.arc_min="1073741824" >> vfs.zfs.arc_min: 1951729664 -> 1073741824 >> >> root@athlonbsd:~ # sysctl vfs.zfs.arc_max="8589934592" >> >> vfs.zfs.arc_max: 15613837312 -> 8589934592 >> >> They also work fine sysctl.conf. >> >> Sorry if this is a silly question: >> I should still be able to set these max/min values in loader.conf, >> right--not just in sysctl.conf? >> >> Thanks. >> >> >> On Tue, Jul 5, 2016 at 10:16 PM, Nathan Bosley >> wrote: >> >> OK, I follow you now. >>> Thanks for the explanation. >>> I will try that later tonight or tomorrow. >>> >>> On Tue, Jul 5, 2016 at 9:45 PM, Allan Jude >>> wrote: >>> >>> On 2016-07-05 21:32, Nathan Bosley wrote: >>>> >>>>> I think in about 4 - 5 hours I can show what values I'm using in >>>>> loader.conf under, say, r302264 and r302265 for comparison. I'm not >>>>> 100% >>>>> sure that the problem arose for me in r302265; I merely suspect it. >>>>> >>>>> On Tue, Jul 5, 2016 at 9:25 PM, Allan Jude >>>> > wrote: >>>>> >>>>> On 2016-07-05 20:27, Steven Hartland wrote: >>>>> > Ahh right, let me check that. >>>>> > >>>>> > On 06/07/2016 00:51, Nathan Bosley wrote: >>>>> >> I actually have this same problem. >>>>> >> I'll send more details when I get home later. >>>>> >> >>>>> >> I think the problem started for me after r302265. >>>>> >> Before that, I can set vfs.zfs.arc_max and vfs.zfs.arc_min in >>>>> >> loader.conf. >>>>> >> After r302265, setting either vfs.zfs.arc_max or >>>>> vfs.zfs.arc_min >>>>> >>>> in >>>> >>>>> >> loader.conf results in the EINVAL errors in 'dmesg': >>>>> >> >>>>> >> Setting sysctl vfs.zfs.arc_max failed: 22 >>>>> >> Setting sysctl vfs.zfs.arc_min failed: 22 >>>>> >> >>>>> >> But setting vfs.zfs.arc_meta_limit in loader.conf works fine. >>>>> >> >>>>> >> But I did notice that using 'sysct' or sysctl.conf for >>>>> >>>> vfs.zfs.arc_max >>>> >>>>> >> and vfs.zfs.arc_min works. >>>>> >> I only have problems with setting them now in loader.conf. >>>>> >> >>>>> >> Like I said, I'll try to send output from my setup later. >>>>> >> >>>>> >> Thanks. >>>>> >> >>>>> >> On Tue, Jul 5, 2016 at 6:10 PM, Steven Hartland >>>>> >> >>>>> >> >>>>> >>>> wrote: >>>> >>>>> >> >>>>> >> What is it currently? >>>>> >> >>>>> >> Just had a quick play here: >>>>> >> sysctl vfs.zfs.arc_max >>>>> >> vfs.zfs.arc_max: 32283127808 >>>>> >> sysctl vfs.zfs.arc_max=32283127807 >>>>> >> vfs.zfs.arc_max: 32283127808 -> 32283127807 >>>>> >> sysctl vfs.zfs.arc_max=32283127808 >>>>> >> vfs.zfs.arc_max: 32283127807 -> 32283127808 >>>>> >> >>>>> >> Error 22 = EINVAL so I suspect you're requesting a value >>>>> which one >>>>> >> of the following: >>>>> >> * < arc_abs_min >>>>> >> * > kmem_size >>>>> >> * < arc_c_min >>>>> >> * < zfs_arc_meta_limit >>>>> >> >>>>> >> Regards >>>>> >> Steve >>>>> >> >>>>> >> On 05/07/2016 22:56, Eric van Gyzen wrote: >>>>> >> >>>>> >> Steven and -current: >>>>> >> >>>>> >> I just updated to r302350 with a GENERIC kernel config. >>>>> I see >>>>> >> this in >>>>> >> dmesg: >>>>> >> >>>>> >> VT(efifb): resolution 1024x768 >>>>> >> Setting sysctl vfs.zfs.arc_max failed: 22 >>>>> >> CPU: Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz >>>>> >> (3491.98-MHz K8-class >>>>> >> CPU) >>>>> >> >>>>> >> The relevant parts of /boot/loader.conf are: >>>>> >> >>>>> >> zfs_load="YES" >>>>> >> vfs.zfs.arc_max="6442450944" >>>>> >> >>>>> >> Let me know what other information you need. >>>>> >> >>>>> >> Cheers, >>>>> >> >>>>> >> Eric >>>>> >> >>>>> >> >>>>> >> _______________________________________________ >>>>> >> freebsd-current@freebsd.org >>>>> >>>>> >>>> > >>>>> >> mailing list >>>>> >> https://lists.freebsd.org/mailman/listinfo/freebsd-current >>>>> >> To unsubscribe, send any mail to >>>>> >> "freebsd-current-unsubscribe@freebsd.org >>>>> >>>>> >> >>>> >" >>>>> >> >>>>> >> >>>>> > >>>>> > _______________________________________________ >>>>> > freebsd-current@freebsd.org >>>> > >>>>> mailing list >>>>> > https://lists.freebsd.org/mailman/listinfo/freebsd-current >>>>> > To unsubscribe, send any mail to " >>>>> >>>> freebsd-current-unsubscribe@freebsd.org >>>> >>>>> " >>>>> >>>>> >>>>> I think the issue might be that the default value of arc_min is >>>>> >>>> higher >>>> >>>>> than when the user is trying to set arc_max to. In that case we >>>>> >>>> might >>>> >>>>> want sysctl to lower arc_min instead of giving an error? >>>>> >>>>> It would definitely be a POLA violation to have to set arc_min >>>>> >>>> lower to >>>> >>>>> be able to have existing lines that set arc_max in loader.conf >>>>> work >>>>> correctly. >>>>> >>>>> -- >>>>> Allan Jude >>>>> >>>>> >>>>> The problem is related to Steven's commit, which makes it so you can >>>> adjust arc_max and arc_min at runtime. Part of this change put in a >>>> requirement that the new arc_max you are trying to set, must be less >>>> than the current arc_min. When you first boot, i think the default is >>>> arc_max = all ram save 1GB, and arc_min = 1/8 of that. >>>> >>>> So if you try to set your arc_max to 1/8th or less, it will fail with >>>> that error 22 (this should be fixed). >>>> >>>> You can work around it temporarily by setting a lower arc_min first. >>>> >>>> >>>> -- >>>> Allan Jude >>>> >>>> >>>> _______________________________________________ >> freebsd-current@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-current >> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org >> " >> > > > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >