Re: measuring swap partition speed
- Reply: void : "Re: measuring swap partition speed"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 21 Dec 2023 17:32:37 UTC
[For this message I'm replying to just the one point because I expect that it is rather important to your context.] void <void_at_f-m.fm> wrwote on Date: Thu, 21 Dec 2023 15:50:52 UTC : > On Wed, Dec 20, 2023 at 07:48:14PM -0800, Mark Millard wrote: > > . . . > Possible workarounds, bearing in mind > I'm not versant in C so it's not like I can fix this myself in code: > > 1. swap as swapfile and not partition [a] > I never recommend such because of the "trivial and unavoidable deadlocks" issue. I just quote Konstantin Belousov on this (copied from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206048#c7 ): On 2017-Feb-13, at 7:20 PM, Konstantin Belousov <kostikbel at gmail.com> wrote on the freebsd-arm list: . . . swapfile write requires the write request to come through the filesystem write path, which might require the filesystem to allocate more memory and read some data. E.g. it is known that any ZFS write request allocates memory, and that write request on large UFS file might require allocating and reading an indirect block buffer to find the block number of the written block, if the indirect block was not yet read. As result, swapfile swapping is more prone to the trivial and unavoidable deadlocks where the pagedaemon thread, which produces free memory, needs more free memory to make a progress. Swap write on the raw partition over simple partitioning scheme directly over HBA are usually safe, while e.g. zfs over geli over umass is the worst construction. === Mark Millard marklmi at yahoo.com