Date: Mon, 29 Jan 2024 22:12:34 +0900 From: Tomoaki AOKI <junchoon@dec.sakura.ne.jp> To: void <void@f-m.fm> Cc: freebsd-hackers@freebsd.org Subject: Re: arm64 swap-related question Message-ID: <20240129221234.657f47be4718f7c894801cac@dec.sakura.ne.jp> In-Reply-To: <d018a33a-d1bd-4ac7-8318-55b1cea54e01@app.fastmail.com> References: <d018a33a-d1bd-4ac7-8318-55b1cea54e01@app.fastmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 29 Jan 2024 12:48:21 +0000 void <void@f-m.fm> wrote: > Hello, > > What's the default granularity with swapping on recent -current > on arm64? > > ie. whats the smallest size of data that is swapped out. 1k? 4k? Where > can I find this info? Can it be set/tuned? How to see what it currently is? > I'd like to set it to 32k if possible. Read performance on this disk > for swap tops out at 60MB/s with a 32k block size. > > For bs=512 it's 1349 kB/s > For bs=4k it's 11MB/s > > context: the thing I'm trying to work around is poor swap performance > on this arch/hardware. > -- You should read /usr/src/sys/vm/swap_pager.c. Keyword would PAGE_SIZE. Then, look for its definition for arm64. IIUC, swap is based on "paging" and once severe memory shortage happens, swap out whole idle but not pinned processes with per-process basis, and when it's not sufficient to keep OS running, OOM killer whould look for which process to kill. So PAGE_SIZE shold be the keyword for it. HTH. -- Tomoaki AOKI <junchoon@dec.sakura.ne.jp>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20240129221234.657f47be4718f7c894801cac>