this post was submitted on 07 Dec 2023
205 points (96.0% liked)

Linux

48328 readers
540 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] Infiltrated_ad8271@kbin.social 23 points 11 months ago (12 children)
  • Hibernation into swap files backed by Btrfs are now supported.

So, with btrfs on ssd, is there any use case for a swap partition?

[–] falsem@kbin.social 25 points 11 months ago (9 children)

Use case is not having enough RAM?

[–] lemmyvore@feddit.nl 1 points 11 months ago (6 children)
[–] falsem@kbin.social 15 points 11 months ago* (last edited 11 months ago) (1 children)

https://en.m.wikipedia.org/wiki/Virtual_memory

What would you describe it as? With virtual memory it pretty much functions that way, no?

[–] lemmyvore@feddit.nl 3 points 11 months ago (1 children)
[–] wmassingham@lemmy.world 3 points 11 months ago* (last edited 11 months ago) (1 children)

I'm not sure what that post is meant to show, if swap isn't "disk RAM". That post even concludes:

Swap [...] provides another, slower source of memory [...]

[–] lemmyvore@feddit.nl -1 points 11 months ago (1 children)

Um, you really need to read the entire phrase and not pick out only what you want from it. 😃

Swap can make a system slower to OOM kill, since it provides another, slower source of memory to thrash on in out of memory situations

It means that if you try to use it as a source of memory, when you run out of actual RAM it will make your system almost completely unresponsive due to disk thrash, instead of allowing the kernel to just kill the process that's eating your RAM. So you'll just end up hard-booting system.

[–] wmassingham@lemmy.world 0 points 11 months ago (1 children)

Yes, and that's a good thing if you don't want it to start killing processes. You have that extra time/space to deal with the out-of-memory condition yourself.

Or you can ignore that condition and continue using the system in a degraded state, with swap as "disk RAM".

[–] lemmyvore@feddit.nl 2 points 11 months ago

Like I said, the system will be almost completely unresponsive due to disk access being several orders of magnitude lower than RAM and allocation thrashing... you won't be able to do much, the mouse, keyboard and display will react extremely slowly. There may be situations where you'd prefer this to an OOM kill, for example if you're running a test or experiment where you'd rather have it finish even if it takes a very long time rather than lose the data. But if you're a regular desktop user or server admin you'll probably just reboot.

load more comments (4 replies)
load more comments (6 replies)
load more comments (8 replies)