4 ms·
I think you're wrong on every single point you make. > Of what distro? Of any distro. I have done such configs with Ubuntu, Debian, openSUSE, SLE, Fedora, Cen
by lproven 14d ago
I think you're wrong on every single point you make.
> Of what distro?
Of any distro. I have done such configs with Ubuntu, Debian, openSUSE, SLE, Fedora, CentOS, RHEL, Alpine, Arch, you name it.
> If you mean that the example code shows the swapfile directly under / , well of course you don't have to do it that way.
Point missed. If you have a swap file created by the installer then you do not get to specify where that swapfile is, in any distro I have seen in my 30 years of working with Linux and 38 years of Unix. (Not that swap files were common on Unix in the 20th century.)
If you specify a swap partition then you choose where it is.
> I think this is untrue on both counts. First, nobody is going to dedicate an entire physical device to swap,
Incorrect assumption. You inserted "entire device" but I did not say that. A swap partition is part of a device. The clue is there in the name.
All my Thinkpads, for example, have 2 SSDs and typically I put root on the faster SSD and /home and swap on the slower SSD (or HDD). I typically configure 4-8GB of swap even if the machine has 32GB or more of RAM -- I rarely hibernate these boxes, TBH. That is plenty. If you hibernate, swap should be at least as big as RAM, or maybe 10-20% bigger in case it's already swapping when you hibernate.
> If the device is "separate" (from what, / ?)
Yes. More or less all typical Unix-like OSes read and write a lot to and from root in use, and under load, from swap. So, put them on different physical drives and spread the load.
This has been standard practice since the 1960s!
> But also it's trivial to put a swapfile on whatever device you want. It can be anywhere reasonably sane in the filesystem, you just give it a path.
It's extra manual config. A partition is one box in the installer and done. Zero manual config.
> The file could go on whatever partition the distros can share.
Again, you miss the point.
1. Distros do not by default mount one another's partitions.
> Maybe put it under /home or something.
You can but suddenly permissions and ownership become issues.
> It's your system, the FHS is up to your own interpretation.
It is preferable to do this in the installer and not worry about interpreting anything.
> Why would that matter? You're expecting a file not to survive the low-power state?
Have you read the other comments?
- zahlman 14d ago> If you have a swap file created by the installer then you do not get to specify Why should we care about what the installer does when it's trivial to change later? You said this is "bad advice, except for very simplistic scenarios" but people not in "very simplistic scenarios" are perfectly capable of running a few shell commands. Aside from which, typical home users are in very simplistic scenarios. The Mint installer defaults to a single partition aside from what's required for booting, and a swapfile at /swapfile. And tons of Mint users are doing just fine with that. They are not realistically going to distro-hop because it won't realistically solve any problems for them. Your overall argument seems to depend on accommodating some hypothetical power users who nevertheless want the installer to get it right for them. But in this case, why not petition the distro to improve the installer instead? > This has been standard practice since the 1960s! And? the point here is to identify a benefit of putting swap on a carefully chosen partition that cannot be realized by putting swap on a file at a carefully chosen path (since that choice also implicitly puts it on a specific partition). > You can but suddenly permissions and ownership become issues. I can't fathom why. I said /home, not ~. > Point missed. ... Incorrect assumption. ... Have you read the other comments? I consider this sort of commentary incivil (and the commenting guidelines support me in this). I also did not make an assumption at all; I considered one of two alternative meanings without introducing it with the word "if". That's why the second possibility does start with "if". This is just a rhetorical technique, dismissing the most absurd interpretations first exactly because they are easier to dismiss.
- lproven 12d agoAgain, no, on all points. And you find my response "uncivil" but I find yours very much so as well. You won't even entertain my use cases, and my own direct personal experience, but your bad advice that would have repeatedly lost me all the data in my home directory on my work PC if I used your methods, for you trumps my 38 years of Unix experience. No. You are being dogmatic, inconsiderate, not listening, responding with ridiculous strawman arguments ("keep swap in your home directory" as a response to "duplicate swap files waste space" -- that is ridiculous) and mockery. You are rude, and you are arrogant, and you are wrong.
- zahlman 12d ago> No. You are being dogmatic, inconsiderate, not listening, responding with ridiculous strawman arguments ("keep swap in your home directory" as a response to "duplicate swap files waste space" -- that is ridiculous) and mockery. I am not being any more dogmatic or inconsiderate than you. I have listened to you quite carefully, and explained in good faith why I think you are wrong based on my best effort to understand you. But you have still not, as far as I can understand, identified a benefit of putting swap on a carefully chosen partition that cannot be realized by putting swap on a file at a carefully chosen path (since that choice also implicitly puts it on a specific partition). In particular, you are the one who proposed that using swap files would require duplication, and I explained why I disagree. You claimed vaguely that there would be permission issues; when I expressed confusion, you did not elaborate. You have yet to give any concrete reason why there would be duplicate swap files, therefore the fact that duplication wastes space is moot. My assumption was that you would be sharing /home between the two installations, because there is really nothing preventing you from doing that, and because making two separate /home partitions wastes much more space (because you don't know ahead of time how much space you'll use with each). Unless perhaps you do some bind-mounting trick that I would consider much trickier than setting up a swapfile at a custom path. (/home is owned by root, so there should not be any permission issue with a swapfile at /home/swapfile . If you disagree then you should explain why instead of being vague and dismissive.) Nothing I said could reasonably be considered "mockery" in any way, shape or form. You are the one engaging in "mockery", by describing my proposal as "ridiculous" in italics without giving any reason as to why it wouldn't work.