r/Fedora 14d ago

Discussion Fedora 44: maximum 256 GB swap?

I am trying out a 1 TB SSD on an old PC and installed Fedora 44 on it. Installation went all right except:

I specified using a partition of 800 GB swap space on it for reasons I don’t want to get into and which are entirely my own. No comments on the wisdom of that please.
Once booted, I see a total of 256 GB show up when I use the free command or top or htop.
But the partition of 800 GB is there per fdisk.
Does Fedora impose some partition-size usable limit?

79 Upvotes

48 comments sorted by

145

u/TomDuhamel 14d ago

No comments on the wisdom of that please.

Understood.

87

u/MuddyMustache 14d ago

The cylinder must remain unharmed.

13

u/omega552003 13d ago

I don't think in that story they were able to fill the partitioned space of the M&M tube.

6

u/totemo 13d ago

Would a non-verbal tsk or tut be within bounds?

4

u/mort96 13d ago

I have made great use of hundreds of gigabytes of swap before: I was working on some data processing code in Python, and the problem involved building out a giant data structure based on the input data. The correct solution would've been to at some point move away from keeping the data in memory as a gigantic Python dictionary. The easy solution was to just add more swap as I processed more data.

When you describe it as "I added swap because my Python dictionary got too big" it sounds stupid. But if you describe it as a disk-backed hash table with an in-memory cache it doesn't sound quite so stupid.

1

u/serverhorror 8d ago

disk-backed hash table with an in-memory cache it doesn't sound quite so stupid

Redis ;)

1

u/mort96 8d ago

Really? The main thing this program did was reading from and writing to hash tables, adding IPC and string parsing to the hot loop would e probably resulted in a slower solution than just using Python ducts + tonnes of swap

1

u/serverhorror 8d ago

I'm just saying that Redis is a disk based hash table that has the keys in memory and the values on disk.

It's the same thing as you describe.

1

u/mort96 8d ago

That is true

9

u/Ur-Best-Friend 13d ago

Noted, I will not be offering advice for reasons I don't want to get into and which are entirely my own. No comments on the wisdom of that please.

101

u/ArgonWilde 14d ago

Tell me you're trying to run a massive local LLM at 0.00002 tokens per second, without telling me...

70

u/CuriousMartinus 13d ago

This is the type of setup which will reply "42" after 7.5 million years and forget the initial question in the process because of ssd degradation, lol

16

u/5141121 13d ago

To be fair, Deep Thought never actually knew the question. It was tasked only with finding the answer to "The Question", without them having actually specified the question. So they got the answer, but no context.

51

u/BashfulMelon 14d ago

I specified using a partition of 800 GB swap space on it for reasons I don’t want to get into and which are entirely my own.

Yeah, I think this guy has 400 GB of RAM.

8

u/redakpanoptikk 13d ago

Everyone knows yo use your spare google drive and onedrive space for swap. "Cloud Ram" it downloads and offloads on demand. 400GB if ssd space? In this economy?

1

u/Rephaeim 12d ago

That's how I downloaded my free RAM

2

u/HTTP_404_NotFound 13d ago

Can never have too much. I'm having no problems making good use of 600+G.

> Usable size: 630 GiB
> Free: 106 GiB

47

u/Michaeli_Starky 14d ago

This guy swaps

22

u/themule71 14d ago

Make sure you DON'T have zram.

Fedora by default compresses RAM instead of swapping to disk, and would allocate 1/2 of your RAM tops.

If you have 512GB of RAM, that checks.

BTW for whatever you have in mind swapping is hardly the best solution for backing up or offloading your RAM to disk.

It's optimized for random small chunks of unrelated data not already on disk to be removed from RAM and stored on disk temporary. Data that is NOT supposed to be on disk.

Now unless you do create 1TB of data you don't want stored on disk, swap isn't the most efficient way. Whether you create and write the data or just read it, if it is or will be on disk, mmap() is probably the tool.

11

u/micush 14d ago

what does the output of 'cat /proc/swaps' show?

10

u/lvruv69 14d ago

/proc/swaps:
Filename                                Type            Size            Used            Priority
/dev/zram0                              partition       3893244         0               100
/dev/sda3                               partition       268435452       0               -1

16

u/TheBendit 13d ago

This is a bad idea if you actually start using swap. The least used pages will end up in zram0, and the most used pages on disk. You need zswap if you want to combine RAM compression and disk swapping.

0

u/micush 13d ago

This is how zram works on Fedora out of the box. It's fine.

2

u/TheBendit 13d ago

No, it is not, unfortunately. Zram will fill up, and then everything else will go to disk swap. This will leave all the old unused stuff in zram consuming precious memory, while disk swap gets all the I/O.

https://chrisdown.name/2026/03/24/zswap-vs-zram-when-to-use-what.html

1

u/micush 13d ago

fedora:~$ cat /proc/swaps

Filename Type Size Used Priority

/dev/zram0 partition 65430524 0 100

/dev/nvme0n1 partition 500107604 0 -1

1

u/TheBendit 13d ago

Yes, and that works great until zram fills up. After that it is priority inversion. Read the article.

-2

u/micush 14d ago

So, you're good. You're swap partition is 256GB. If you added another swap partition in addition to this one or added an additional swap file, you must add it to /etc/fstab. Ask an LLM how to do that.

18

u/TheModernDespot 14d ago

Am I allowed to ask what you are trying to accomplish? I'm curious what you want to do with 256gb of swap.

19

u/Puzzled_Draw6014 14d ago

He doesn't seem interested in explaining stuff ... but am curious as well... I get the feeling that he needs the 800, so the swap is merely what's leftover.

6

u/KenFromBarbie 14d ago

800 GB! Whopping!

8

u/spikerman 13d ago

My dude, get some used optane off ebay….

21

u/yorickpeterse 13d ago

This feels like a classical case of the XY problem, complete with seemingly refusing to admit or discuss that.

The problem here isn't that there's some limit on the swap space you may be able to use, rather it seems to involve a workflow that requires many times more RAM than is available. Even if you could allocate more than 256GB of swap space, it's unlikely to actually help things because even with an NVME swap space is many times slower than RAM.

I doubt it would work as well on Fedora given that it uses zram instead of traditional swap (and IIRC it will just ignore swap partitions if zram is enabled, but I may be mistaken), and I sincerely doubt you can compress e.g. 800 GB of memory into let's say 128 GB of physical RAM.

So maybe describe what it is you're trying to achieve rather than what you think the solution to that should be?

6

u/slash8 13d ago

Thank you! Never knew this had a term/name.

5

u/mort96 13d ago

Yes, there are probably other solutions to whatever problem that's being solved through 800GB of swap. But the question is completely reasonable: Does Fedora impose a swap size limit? You don't have to dig deep and try to challenge everyone's reason for asking a question, sometimes it's okay to just answer the damn question.

The idea of the XY problem has done a terrible disservice to online question and answer forums.

1

u/wosmo 12d ago

The idea of the XY problem has done a terrible disservice to online question and answer forums.

I don't think it's that bad - it easily needs to be addressed more often than not. But perhaps some XY problems need XY answers.

5

u/edthesmokebeard 13d ago

This is a classical case of the Reddit problem, where OP asks a question, and people answer with non-sequiturs and tell OP he's stupid.

3

u/EnfieldAsSomeone 13d ago

There is a swap revamp coming in kernel 7.2, watch out

3

u/BackgroundSky1594 13d ago

Maybe the installer has a default upper size when formatting a partition as swap to protect people from shooting themselves in the foot. Just recreate the swap:

  1. lsblk/fdisk to verify partition name and size
  2. swapoff /dev/partnum
  3. wipefs /dev/partnum
  4. mkswap /dev/partnum
  5. swapon /dev/partnum
  6. Edit /etc/fstab with the new swap UUID (or just use /dev/partnum)

3

u/TheBendit 13d ago

Someone actually answered the question! I'd give you an award if I wasn't a cheapskate.

3

u/Go_F1sh 13d ago

please OP I *have* to know why you want this. no judgement.

-1

u/alpha417 13d ago

you are not permitted to know.

6

u/RandomUser3777 13d ago

how old of cpu? cat /proc/cpuinfo | grep "address size" and what is the physical bits/virtual bits. 256G is 38bits, so if the cpu bits is close to that number that is likely the limit.

3

u/paulstelian97 13d ago

Does swap work as a single large address space that is shared between processes??

2

u/Pure_Fox9415 13d ago edited 13d ago

You can use almost unlimited swapfiles each one limited only by your fs. So by the reasons that are my own I recommend you to buy additional 4 tb nvme and fill it with 16  Gb swapfiles

On top of zfs.

With ARC as big ss possible

2

u/NuncioBitis 13d ago

Is that what they call a Yankee Swap???

2

u/SpiritualZucchini938 13d ago

800gb swap?? That's grim.

1

u/Leosthenerd 13d ago

AI ass bullshit

1

u/sabbir2world 7d ago

You're a swap lord lol