| Post Reply | RetroFed Forum Forum Index
» linuxmemes
Page 3 of 3 Goto page « First Previous 1, 2, 3 |
| Author | Message | ||
|---|---|---|---|
|
Frenchgeek
lemmy.ml
Frenchgeek@lemmy.ml Joined: 2025-08-31 |
People still use swap partitions instead of swap files?
I do, yeah. Since I'm already partitioning by hand to put /home on a different drive, better use the saved space on the NVME for a small amount of guaranteed swap while I'm at it. |
||
| 2 | |||
|
Brkdncr
lemmy.world
Brkdncr@lemmy.world Joined: 2023-11-21 |
Can anyone tell me why I see swap usage with 10+GB of free RAM available?
Saving ram to swap can be done with minimal impact. Helpful when you run out of memory and that 2gb app idling can be dumped right away instead of waiting for it to be copied to swap. |
||
| 13 | |||
|
TheRagingGeek
lemmy.world
TheRagingGeek@lemmy.world Joined: 2023-06-15 |
lmao, 16 years is a lot! That drive can drive
Yeah it was to the point that Samsung doesn’t even admit to have made this drive on their website anywhere, I pulled the drive and was like wtf Samsung rust? I almost exclusively bought western digital in recent memory so was a surprise, had to do some digging to decode the manufacturing codes to identify the manufacturing date |
||
| 2 | |||
|
thenextguy
sh.itjust.works
thenextguy@sh.itjust.works Joined: 2026-07-01 |
Can anyone tell me why I see swap usage with 10+GB of free RAM available?
Swappiness set to over 9000! |
||
| 7 | |||
|
sumsinj
lemmy.world
sumsinj@lemmy.world Joined: 2026-08-04 |
I dislike swap solely because it gets used and when I accidentally open the same file twice then I regularly encounter problems with swap files when opening the file again later. |
||
| 2 | |||
|
DevDave
piefed.social
DevDave@piefed.social Joined: 2026-04-06 |
It depends on what you set your swappiness to, too. I think Linux distros still have pretty aggressive defaults that swap more than they probably need to.
I have taken a couple classes in Linux centric forensics and one of the things I often wandered about is if there is an easy way to add jitter or shift individual file blocks by a word (64 bits) or even half the size of a data block. Say every two hours shift up or down so attempts to read a mechanical hard drive would be chaotic. |
||
| 1 | |||
|
WhyJiffie
sh.itjust.works
WhyJiffie@sh.itjust.works Joined: 2023-07-11 |
SWAP RAM is useful for hibernation mode and fall back ram incase you have low memory.
also in case you have too many electron shits open |
||
| 1 | |||
|
WhyJiffie
sh.itjust.works
WhyJiffie@sh.itjust.works Joined: 2023-07-11 |
Saving ram to swap can be done with minimal impact. Helpful when you run out of memory and that 2gb app idling can be dumped right away instead of waiting for it to be copied to swap.
but that's not what's happening. processes do actually get removed from RAM, and when they are needed they are very slow until they are loaded back. the system thinks it's more valuable to have that memory be filesystem cache |
||
| 1 | |||
|
Brkdncr
lemmy.world
Brkdncr@lemmy.world Joined: 2023-11-21 |
but that's not what's happening. processes do actually get removed from RAM, and when they are needed they are very slow until they are loaded back. the system thinks it's more valuable to have that memory be filesystem cache
If true then Linux is a decade behind windows and macOS. |
||
| -1 | |||
bdonvr
thelemmy.club
bdonvr@thelemmy.clubJoined: 2023-06-14 |
I basically never used swap until I used some script that was supposed to de-duplicate text messages from SMS backups. Turns out feeding it a 100,000 message archive spanning back 15 years will somehow eat up ~80GB of RAM. I doubt it should, I guess it probably just wasn't optimized for such a large amount. So I made a 64GB swap file and it completed fine. |
||
| 10 | |||
|
SirLeToet
lemmy.world
SirLeToet@lemmy.world Joined: 2026-09-01 |
SWAP RAM is useful for hibernation mode and fall back ram incase you have low memory.
Also for when you, for whatever reason, run out of physical memory. Who here worries torturing their SSDs? Those things will last lifetimes compared to HDD's of the past (or present). |
||
| 4 | |||
|
0x0
lemmy.zip
0x0@lemmy.zip Joined: 2025-04-04 |
My 64GiB are enough for my tasks, i don't use swap. |
||
| 2 | |||
|
motruck
lemmy.zip
motruck@lemmy.zip Joined: 2025-08-23 |
Swap is there an emergency relief for when a runaway process starts to eat all the resources. The system gets slow the user says hey what's that? They look and see oh wow this one process is really eating a lot of resources that's bad, can I kill it or do I need to gracefully try to shut it down. Swap buys you time when it could matter. When you don't have swap OOM killer takes out whatever it wants and for a desktop user that may not be that big of a deal but for a server the database is likely the first target that is taken out. |
||
| 5 | |||
|
motruck
lemmy.zip
motruck@lemmy.zip Joined: 2025-08-23 |
I dislike swap solely because it gets used and when I accidentally open the same file twice then I regularly encounter problems with swap files when opening the file again later.
Your problem is not caused by system swap. |
||
| 3 | |||
|
nullptr
lemmy.world
kSPvhmTOlwvMd7Y7E@lemmy.world Joined: 2023-06-15 |
Swap is there an emergency relief for when a runaway process starts to eat all the resources. The system gets slow the user says hey what's that? They look and see oh wow this one process is really eating a lot of resources that's bad, can I kill it or do I need to gracefully try to shut it down. Swap buys you time when it could matter. When you don't have swap OOM killer takes out whatever it ...
you misunderstand the meme (of course it doesn't help either); because the alternative isn't "no swap", but rather "use a swap file instead of swap partition" |
||
| 5 | |||
|
h4lf8yte
lemmy.ml
h4lf8yte@lemmy.ml Joined: 2023-06-14 |
ACPI S4 Hibernation would like to have a word with you |
||
| 7 | |||
|
Taleya
aussie.zone
Taleya@aussie.zone Joined: 2023-06-21 |
ZFS chuckles darkly in the corner |
||
| 3 | |||
|
sumsinj
lemmy.world
sumsinj@lemmy.world Joined: 2026-08-04 |
Your problem is not caused by system swap.
I know but I encounter the word swap only there and its annoying |
||
| 1 | |||
|
MissingGhost
lemmy.ml
MissingGhost@lemmy.ml Joined: 2025-05-02 |
I basically never used swap until I used some script that was supposed to de-duplicate text messages from SMS backups. Turns out feeding it a 100,000 message archive spanning back 15 years will somehow eat up ~80GB of RAM. I doubt it should, I guess it probably just wasn't optimized for such a large amount. So I made a 64GB swap file and it completed fine.
Not everything should work from ram. This is why we stream files for processing. |
||
| 6 | |||
bdonvr
thelemmy.club
bdonvr@thelemmy.clubJoined: 2023-06-14 |
Not everything should work from ram. This is why we stream files for processing.
The backup itself was only ~8gb. |
||
| 4 | |||
|
WhyJiffie
sh.itjust.works
WhyJiffie@sh.itjust.works Joined: 2023-07-11 |
Nah, you can use resume_offset instead. Here's an example: https://forum.endeavouros.com/t/how-to-hibernate-with-btrfs-swapfile-luks2-systemd-boot-dracut/55620/2
I don't think it's needed anymore, afaik filesystem drivers are supposed to tell the kernel automagically |
||
| 1 | |||
|
WhyJiffie
sh.itjust.works
WhyJiffie@sh.itjust.works Joined: 2023-07-11 |
Dunno how well zswap handles at that size, but the point is that is compresses swap into RAM, so it would use a max of 819.2M for a total of 2457.6M of swap space. If you need more, then by all means, use a swap file or partition lol. Actually linux easily supports multiple and tiered swap mounts, so you could even go zswap + ssd swap + hdd swap, or a cheapo "burn at your own risk" usb flash swap lol.
calling it total is a bit of a stretch. that's the best case scenario, when the contents compress well. also, zswap might not be a good idea on that system. if it only has 4 GB RAM, it likely has a CPU tht is slower and has only a couple cores, and the modern web is cpu heavy enough as it is |
||
| 2 | |||
|
Buddahriffic
lemmy.world
Buddahriffic@lemmy.world Joined: 2023-06-30 |
The trick is to first create a RAM disk. Then put the swap file on there and it's about as fast as RAM. Then, with the new memory you have created, make another RAM disk. Yep, then make more swap space on there. I have solved both the memory and SSD availability issues with this infinite RAM and disk space trick. |
||
| 6 | |||
|
WhyJiffie
sh.itjust.works
WhyJiffie@sh.itjust.works Joined: 2023-07-11 |
If true then Linux is a decade behind windows and macOS.
tbh windows was doing this very aggressively on my system, it was swapping like a mad man right when memory usage reached 50% |
||
| 1 | |||
perfectly_boiled_pizza
lemmy.world
perfectly_boiled_pizza@lemmy.worldJoined: 2024-07-10 |
I am equally disgusted and intrigued |
||
| 1 | |||
|
mexicancartel
lemmy.dbzer0.com
mexicancartel@lemmy.dbzer0.com Joined: 2023-06-19 |
Can anyone tell me why I see swap usage with 10+GB of free RAM available?
If you(or your distro) use zram then the zram usage may also count as swap in resource monitors. For me this was the case when i saw swap usage where it is clearly not needed to swap. You can check it with Other reason is that more frequently accesed files may be cached to ram and less important stuff gets swapped. But if you notice swap being used while total ram usage including cached is much lower than total, then its probably zram(and it does (Edit:)not write to disk so dont worry about that) |
||
| 3 | |||
|
Brkdncr
lemmy.world
Brkdncr@lemmy.world Joined: 2023-11-21 |
tbh windows was doing this very aggressively on my system, it was swapping like a mad man right when memory usage reached 50%
Doubt. It might be copying to swap, but not reading from it. |
||
| 1 | |||
|
WhyJiffie
sh.itjust.works
WhyJiffie@sh.itjust.works Joined: 2023-07-11 |
Doubt. It might be copying to swap, but not reading from it.
programs were slow, and I had my system on an SSD. I was seeing 100% utilization in task manager on the drive of the swap file when I was experiencing the slowdown. |
||
| 1 | |||
|
motruck
lemmy.zip
motruck@lemmy.zip Joined: 2025-08-23 |
you misunderstand the meme (of course it doesn't help either); because the alternative isn't "no swap", but rather "use a swap file instead of swap partition"
Hrmm. How does that change the SSD problem if you are using a file on the SSD? I reread the meme. Maybe I'm too blurry eyed still but I don't see that coming through. |
||
| 1 | |||
| Post Reply |
Page 3 of 3
Goto page
« First
Previous
1, 2, 3
Back to top |