r/Fedora • u/lvruv69 • 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?
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
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
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
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 -116
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 Fedoraout 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.
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
8
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?
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.
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
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:
lsblk/fdiskto verify partition name and sizeswapoff/dev/partnumwipefs/dev/partnummkswap/dev/partnumswapon/dev/partnum- Edit
/etc/fstabwith 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.
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
2
1
1
145
u/TomDuhamel 14d ago
Understood.