On Tue, Feb 28, 2023 at 2:48 PM Ranjan Maitra <mlmaitra@gmx.com> wrote:
On Tue Feb28'23 01:56:08PM, Richard Shaw wrote:
> From: Richard Shaw <hobbes1069@gmail.com>
> Date: Tue, 28 Feb 2023 13:56:08 -0600
> To: Community support for Fedora users <users@lists.fedoraproject.org>
> Reply-To: Community support for Fedora users <users@lists.fedoraproject.org>
> Subject: Re: recommended partition for swap with 0.5 TB memory
>
> On Tue, Feb 28, 2023 at 1:43 PM Ranjan Maitra <mlmaitra@gmx.com> wrote:
>
> > Hi,
> >
> > I am trying to install Fedora on to a new machine that has 0.5 TB RAM.
> > Hard drives are 256 GB for / and friends, and 2 TB for /home partition. In
> > the past, it used to be suggested that swap be twice that of RAM: this
> > later changed to the same amount, and now it is very unclear (to me)
> > because I have not tracked the latest recommendations. Anyway, what would
> > you suggest? The machine is a Dell Precision 7920 with 28 cores/56 threads.
> >
>
> By 0.5TB you mean 512GB of ram? Assuming you're installing Fedora 36 or 37,
> I would just leave the defaults alone, which utilizes swap on zram. So
> basically it won't use any swap unless needed. You can adjust the amount of
> memory allowed to be used for swap.
>

I decided to let the automatic installer pick up the partition. It correctly sets aside 4 TiB (sorry, it was 4TiB, not 2TiB as mentioned earlier) for /home, and then 1 GiB for /boot, 600 MiB for /boot/efi, 70 GiB for / and leaves aside the rest (as free space). I can adjust the 70 GiB, but do I need to keep aside space for the zram? I am unsure about what to do with so much free space?

With zram you set a maximum amount of memory which can be used as swap (I think the default is 50% but it may have a maximum set). How it works is that it compresses the memory, generally giving around 2X compression. The CPU cost to compress/decompress is much faster than swapping to disk, perhaps not as much with modern NVMe drives, but it does help relieve memory pressure without causing unnecessary writes to your expensive SSDs :) 

I was hoping to find something more Fedora centric, but here's the upstream documentation:
https://github.com/systemd/zram-generator/blob/main/man/zram-generator.conf.md

Thanks,
Richard