assigning priorities to swap partitions?

From: Julian Elischer <julian_at_freebsd.org>
Date: Tue, 22 Aug 2017 01:48:10 +0800
On an AZURE system there is a "local" device that is useful as swap.

It is, I believe, faster than regular network based storage, but it is 
ephemeral, and may go away during a shutdown.
It is in some machines a bit small so we'd like to add a bit more for 
safety.
But we would like the ephemeral local storage to be used first. Can 
this be done at all? I can't see anything

The last time I checked all swap was used in some balanced way. (the 
manual says so)
One solution is to have a small cron job that only creates the added 
swap partition when the first one is (say) 70% full,
but it'd be nice if there were some less hackish way. Another would be 
to occasionally wake up, and if the swap in use would all fit into the 
device we would like to be used, we do a swapoff on the other and 
force everything to be put on the fast drive..  but that sort of 
defeats the purpose as it's doing extra work..

Has anyone done any work on adding priority to swap?

Julian
Received on Mon Aug 21 2017 - 15:48:16 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:12 UTC