Date: Thu, 30 Dec 2021 14:48:49 +0300 From: Lev Serebryakov <lev@FreeBSD.org> To: Eugene Grosbein <eugen@grosbein.net>, Freebsd stable <freebsd-stable@freebsd.org> Subject: Re: What is FreeBSD 12 equivalent to Linux' "sysctl -w vm.nr_hugepages=1280"? Message-ID: <c1c29cb3-caad-92ac-feb7-cb43edd8eddd@FreeBSD.org> In-Reply-To: <987e541a-aafd-9ae1-e243-9e58bea56ba0@grosbein.net> References: <431b35b0-7745-d2d7-ab04-bbf76e58608a@FreeBSD.org> <987e541a-aafd-9ae1-e243-9e58bea56ba0@grosbein.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c1c29cb3-caad-92ac-feb7-cb43edd8eddd>