Re: An idea for swap partition size vs. swap space size in use handling
- In reply to: Mark Millard : "Re: An idea for swap partition size vs. swap space size in use handling"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 22 Jan 2023 18:37:00 UTC
On Jan 22, 2023, at 09:46, Mark Millard <marklmi@yahoo.com> wrote: > >> On Jan 22, 2023, at 05:15, Mike Karels <mike@karels.net> wrote: >> >>> On 22 Jan 2023, at 2:42, Mark Millard wrote: >>> >>>> On Jan 22, 2023, at 00:21, Mark Millard <marklmi@yahoo.com> wrote: >>>> >>>>> On Jan 21, 2023, at 23:17, Poul-Henning Kamp <phk@phk.freebsd.dk> wrote: >>>>> >>>>>> -------- >>>>>> Mark Millard writes: >>>>>> >>>>>>> It would be nice if I could have just one swap partition >>>>>>> on a given boot media, one that is more than sufficient >>>>>>> in size for all but the biggest RAM system --but to then >>>>>>> be able to tell the system to just use up to the >>>>>>> recommended swap space size and to ignore any extra swap >>>>>>> space in the swap partition. >>> >>> Why not just reduce the size of the swap partition to the desired size >>> with “gpart resize”? Granted, that requires manual intervention. > > On Jan 22, 2023, at 05:15, Mike Karels <mike@karels.net> wrote: > >> On 22 Jan 2023, at 2:42, Mark Millard wrote: >> >>> On Jan 22, 2023, at 00:21, Mark Millard <marklmi@yahoo.com> wrote: >>> >>>> On Jan 21, 2023, at 23:17, Poul-Henning Kamp <phk@phk.freebsd.dk> wrote: >>>> >>>>> -------- >>>>> Mark Millard writes: >>>>> >>>>>> It would be nice if I could have just one swap partition >>>>>> on a given boot media, one that is more than sufficient >>>>>> in size for all but the biggest RAM system --but to then >>>>>> be able to tell the system to just use up to the >>>>>> recommended swap space size and to ignore any extra swap >>>>>> space in the swap partition. >> >> Why not just reduce the size of the swap partition to the desired size >> with “gpart resize”? Granted, that requires manual intervention. > > Why would I use the size for a 1 GiByte aarch64 system > (prior boot) when I'm using the media to boot the 64 > GiByte system? So increases too. Manual intervention > every time I move the media between systems, going in > both directions over time? > > That gets me into the business of independently > calculating a reasonable lower bound for the recommended > swap space every time I move the media between systems > with differing amounts of RAM. I've noticed that the > recommendation varies some across the OS updates. (My > guess is variations in the kernel space use is involved > in the recommendation.) I'm looking for something > avoiding such a redundant calculation, something that > just works given the variability across OS updates. (And across platforms: armv7 and aarch64 have very different recommendations for the same amount of RAM. And across differing amounts of RAM from system to system.) Took a while for me to think of it, but there is also that I use paths based on labels to identify the swap partition independent of the system it is plugged into and what other devices are present in that system. (Some of the media here are USB media.) Resizing (or subranging) partitions invalidates labeling because the labeling information goes at the end of the (logical) partition, if I understand right. So labeling would have to be re-established for the new size as well. === Mark Millard marklmi at yahoo.com