Discussion:
arm64 swap-related question
(too old to reply)
void
2024-01-29 12:48:21 UTC
Permalink
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.
--
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Tomoaki AOKI
2024-01-29 13:12:34 UTC
Permalink
On Mon, 29 Jan 2024 12:48:21 +0000
Post by void
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 <***@dec.sakura.ne.jp>


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...