From nobody Thu Dec 30 11:48:49 2021 X-Original-To: freebsd-stable@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B82751917798 for ; Thu, 30 Dec 2021 11:48:54 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JPmkt3Cnhz4vhb; Thu, 30 Dec 2021 11:48:54 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.not-for.work (onlyone.not-for.work [IPv6:2a01:4f8:201:6350::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: lev/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 33CB12E4A3; Thu, 30 Dec 2021 11:48:54 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from [192.168.134.16] (unknown [94.19.243.255]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.not-for.work (Postfix) with ESMTPSA id 4D4265E22; Thu, 30 Dec 2021 14:48:50 +0300 (MSK) Message-ID: Date: Thu, 30 Dec 2021 14:48:49 +0300 List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Reply-To: lev@FreeBSD.org Subject: Re: What is FreeBSD 12 equivalent to Linux' "sysctl -w vm.nr_hugepages=1280"? Content-Language: en-US To: Eugene Grosbein , Freebsd stable References: <431b35b0-7745-d2d7-ab04-bbf76e58608a@FreeBSD.org> <987e541a-aafd-9ae1-e243-9e58bea56ba0@grosbein.net> From: Lev Serebryakov Organization: FreeBSD In-Reply-To: <987e541a-aafd-9ae1-e243-9e58bea56ba0@grosbein.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640864934; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FEw9EjJemniyRKcztYFfRBNxkWfE5x/Naoq+MB/qxvw=; b=tiuZl4amjLMPPt6GEMrhT56mQZNG4XgndZ8W9zIR6ROvP/PjbzxISrKGMEHQM5b2YTT01K JbT63HXtOBjBSh+qGVrbz+NxaOTgM6hfon43Vp9SQ32+ShWxHB4RlPtWVuSWu9ALm6dFj5 0i4e5BH39GaPxzeMPHGLwWsppv8XPKfWSU1pj2TDvRzaz+ObWFwJZcEPMv7MSq1fzKAFkM aD46p8qVLN6Xm6S3BRIfK3N02u23YLK84fkE4+lJtFBZNnQnb8dF2luigiK3yC0OkTc0Y3 uqQxgZ+v4kA6bgtH3pNSRIEhT6l/oUoQyy6nnmxZOPqp2S9BigzcTA6xkuEdjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640864934; a=rsa-sha256; cv=none; b=qLm8t3bxQOFhb3spaMa0vytDhELeVaYLQQhYWiG/yNkYarEGVpoUYc/CNvSwA5d3W2DJ2x X/VZ9pjRDPM87/1wmY6n87JOYQQPz2sESnkmYJ1YjCEF7eMIp9cslkiDri37MVQmxBopbV Y9RggAQIBnQqgtP0D2BTN97g/EueBVL/R8G+9Jutrw4zYJiGpYdD1eYP2DHEN4Fh7beHLc 0SpRQx1Wgm992HMpeSMqGQQpjMatgSAAZ+sTAzX3QzYtzh8zkvsOwdlvWYk0C1nMg7c7mD FeAJCuilidw1K8jdL7QRPfv0LtLty2LPzindfBpd3pKR4GM2ZmR7c51hXIaXfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 30.12.2021 3:21, Eugene Grosbein wrote: >> net-p2p/monero-cli shows a lot of exceptions on FreeBSD. Monero's github [1] says, that it needs "sysctl -w vm.nr_hugepages=1280" on Linux. >> What is FreeBSD equivalent for this Linux' setting? > > Perhaps, you need to increase sysctl vm.max_wired that limits amount of mlock'ed memory for userland processes, > and don't forget about "memorylocked" limit for a process. I have "vm.max_wired" absurdly high (because I thought it is in bytes): # sysctl vm.max_wired vm.max_wired: 67108864 # And mlock is enabled: # sysctl security.bsd.unprivileged_mlock security.bsd.unprivileged_mlock: 1 # Limit is set to 16MB: # sudo -u monero limits cputime infinity secs filesize infinity kB datasize 33554432 kB stacksize 524288 kB coredumpsize infinity kB memoryuse infinity kB memorylocked 16384 kB maxprocesses 34290 openfiles 1883826 sbsize infinity bytes vmemoryuse infinity kB pseudo-terminals infinity swapuse infinity kB kqueues infinity umtxp infinity # I wonder, what does it mean "1280" in Linux. If it is 1280 1MB pages, I need to increase limit. Looks like setting both max_wired and limit to 1.5GB helps, thank you! -- // Lev Serebryakov