1 |
On 2021-12-10 20:51, Laurence Perkins wrote: |
2 |
>>> |
3 |
>>> |
4 |
>>> -----Original Message----- |
5 |
>>> From: Wols Lists <antlists@××××××××××××.uk> |
6 |
>>> Sent: Friday, December 10, 2021 11:25 AM |
7 |
>>> To: gentoo-user@l.g.o |
8 |
>>> Subject: Re: [gentoo-user] Re: [OT] suggest SSD partitioning |
9 |
>>> |
10 |
>>> On 10/12/2021 15:16, Nikos Chantziaras wrote: |
11 |
>>> > If you can't do that, then it doesn't matter much whether you use a |
12 |
>>> > swap file or partition. On an SSD, both should perform about the same. |
13 |
>>> > On an HDD, swap files could run into fragmentation issues if you |
14 |
>>> > resize them or create them incorrectly. On an SSD, fragmentation |
15 |
>>> > doesn't have much of an impact. A swap file gives you the option to |
16 |
>>> > resize it later on without having to do filesystem and partition |
17 |
>>> > resizing, so I'd say a swap file sounds better. |
18 |
>>> |
19 |
>>> It very much does matter whether you use a swap file or partition in |
20 |
>>> practice. I've just been reading right now a discussion about systemd |
21 |
>>> logging and hibernation, and how btrfs handles swap files. It sounds |
22 |
>>> nasty. |
23 |
>>> |
24 |
>>> If you have a swap file, linux creates an immutable file then uses |
25 |
>>> direct disk i/o. There's a LOT of unnecessary crap there that could |
26 |
>>> go wrong. Just avoid all that trouble and give yourself a decent swap |
27 |
>>> partition. (And if you're running btrfs, a lot of this sounds |
28 |
>>> experimental and dangerous ...) |
29 |
>>> |
30 |
>>> Cheers, |
31 |
>>> Wol |
32 |
>>> |
33 |
>>> |
34 |
> |
35 |
> For BTRFS I usually do one partition for the whole system and one |
36 |
> partition for swap and then use subvolumes for /home and anything else |
37 |
> I want to keep separate in case of reinstall. |
38 |
> |
39 |
> Since BTRFS is a storage pool model, everything else can dynamically |
40 |
> resize similarly to using LVM. |
41 |
> |
42 |
> Swap files in general aren't as reliable if one is planning to |
43 |
> hibernate the system. Swap files on BTRFS should go through a loop |
44 |
> device unless you set them up really carefully. |
45 |
> |
46 |
> There's no reason you can't have both swap files and a swap partition. |
47 |
> I occasionally end up dynamically adding more when I get a program |
48 |
> that uses a terabyte of virtual but very little resident at a time or |
49 |
> something. |
50 |
> |
51 |
> Swap onto zram devices can also be a useful tool if the data being |
52 |
> swapped is more highly compressible than zswap will take advantage of. |
53 |
> |
54 |
> LMP |
55 |
|
56 |
Thanks to all for hints. I've created a swap partition. |
57 |
|
58 |
Pat |
59 |
|
60 |
---------------------------------------- |
61 |
Freehosting PIPNI - http://www.pipni.cz/ |