["SOLVED"] Re: [gentoo-user] Re: [OT] suggest SSD partitioning

2021-12-12 Thread pat

On 2021-12-10 20:51, Laurence Perkins wrote:



-Original Message-
From: Wols Lists 
Sent: Friday, December 10, 2021 11:25 AM
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Re: [OT] suggest SSD partitioning

On 10/12/2021 15:16, Nikos Chantziaras wrote:
> If you can't do that, then it doesn't matter much whether you use a
> swap file or partition. On an SSD, both should perform about the same.
> On an HDD, swap files could run into fragmentation issues if you
> resize them or create them incorrectly. On an SSD, fragmentation
> doesn't have much of an impact. A swap file gives you the option to
> resize it later on without having to do filesystem and partition
> resizing, so I'd say a swap file sounds better.

It very much does matter whether you use a swap file or partition in 
practice. I've just been reading right now a discussion about systemd 
logging and hibernation, and how btrfs handles swap files. It sounds 
nasty.


If you have a swap file, linux creates an immutable file then uses 
direct disk i/o. There's a LOT of unnecessary crap there that could 
go wrong. Just avoid all that trouble and give yourself a decent swap 
partition. (And if you're running btrfs, a lot of this sounds 
experimental and dangerous ...)


Cheers,
Wol




For BTRFS I usually do one partition for the whole system and one
partition for swap and then use subvolumes for /home and anything else
I want to keep separate in case of reinstall.

Since BTRFS is a storage pool model, everything else can dynamically
resize similarly to using LVM.

Swap files in general aren't as reliable if one is planning to
hibernate the system.  Swap files on BTRFS should go through a loop
device unless you set them up really carefully.

There's no reason you can't have both swap files and a swap partition.
 I occasionally end up dynamically adding more when I get a program
that uses a terabyte of virtual but very little resident at a time or
something.

Swap onto zram devices can also be a useful tool if the data being
swapped is more highly compressible than zswap will take advantage of.

LMP


Thanks to all for hints. I've created a swap partition.

Pat


Freehosting PIPNI - http://www.pipni.cz/




RE: [gentoo-user] Re: [OT] suggest SSD partitioning

2021-12-10 Thread Laurence Perkins
>> 
>> 
>> -Original Message-
>> From: Wols Lists  
>> Sent: Friday, December 10, 2021 11:25 AM
>> To: gentoo-user@lists.gentoo.org
>> Subject: Re: [gentoo-user] Re: [OT] suggest SSD partitioning
>> 
>> On 10/12/2021 15:16, Nikos Chantziaras wrote:
>> > If you can't do that, then it doesn't matter much whether you use a 
>> > swap file or partition. On an SSD, both should perform about the same. 
>> > On an HDD, swap files could run into fragmentation issues if you 
>> > resize them or create them incorrectly. On an SSD, fragmentation 
>> > doesn't have much of an impact. A swap file gives you the option to 
>> > resize it later on without having to do filesystem and partition 
>> > resizing, so I'd say a swap file sounds better.
>> 
>> It very much does matter whether you use a swap file or partition in 
>> practice. I've just been reading right now a discussion about systemd 
>> logging and hibernation, and how btrfs handles swap files. It sounds nasty.
>> 
>> If you have a swap file, linux creates an immutable file then uses direct 
>> disk i/o. There's a LOT of unnecessary crap there that could go wrong. Just 
>> avoid all that trouble and give yourself a decent swap partition. (And if 
>> you're running btrfs, a lot of this sounds experimental and dangerous ...)
>> 
>> Cheers,
>> Wol
>> 
>> 

For BTRFS I usually do one partition for the whole system and one partition for 
swap and then use subvolumes for /home and anything else I want to keep 
separate in case of reinstall.

Since BTRFS is a storage pool model, everything else can dynamically resize 
similarly to using LVM.

Swap files in general aren't as reliable if one is planning to hibernate the 
system.  Swap files on BTRFS should go through a loop device unless you set 
them up really carefully.

There's no reason you can't have both swap files and a swap partition.  I 
occasionally end up dynamically adding more when I get a program that uses a 
terabyte of virtual but very little resident at a time or something.

Swap onto zram devices can also be a useful tool if the data being swapped is 
more highly compressible than zswap will take advantage of.

LMP


Re: [gentoo-user] Re: [OT] suggest SSD partitioning

2021-12-10 Thread Wols Lists

On 10/12/2021 15:16, Nikos Chantziaras wrote:
If you can't do that, then it doesn't matter much whether you use a swap 
file or partition. On an SSD, both should perform about the same. On an 
HDD, swap files could run into fragmentation issues if you resize them 
or create them incorrectly. On an SSD, fragmentation doesn't have much 
of an impact. A swap file gives you the option to resize it later on 
without having to do filesystem and partition resizing, so I'd say a 
swap file sounds better.


It very much does matter whether you use a swap file or partition in 
practice. I've just been reading right now a discussion about systemd 
logging and hibernation, and how btrfs handles swap files. It sounds nasty.


If you have a swap file, linux creates an immutable file then uses 
direct disk i/o. There's a LOT of unnecessary crap there that could go 
wrong. Just avoid all that trouble and give yourself a decent swap 
partition. (And if you're running btrfs, a lot of this sounds 
experimental and dangerous ...)


Cheers,
Wol



Re: [gentoo-user] Re: [OT] suggest SSD partitioning

2021-12-10 Thread Dale
Grant Edwards wrote:
> On 2021-12-10, Nikos Chantziaras  wrote:
>> On 09/12/2021 21:27, p...@xvalheru.org wrote:
>>> I'm planning small /boot partition, / partition and /data (including 
>>> home) partition.
>> I just use one partition. What's the point of having multiple ones if
>> they're all on the same storage device?
> I find it easier to re-install if home and data directories are on a
> different filesystem than the system stuff.
>
> --
> Grant
>
>
>


Plus if you use LVM or some other similar software, you can expand as
needed.  I have /boot and / on regular file systems for simple booting. 
I have /usr and /var on their own partition.  Obviously /home is on it's
own and on multiple hard drives at that.  Since I did my install on this
rig, I've had to expand /usr at least twice, maybe three times.  I've
also had to expand /var as well.  If one doesn't use LVM or similar,
then you have to redo pretty much everything or reinstall.  I've done
that in the past and I learned to use LVM.  One day, I may switch to
BTFS, sp?, or similar.  That said, LVM works fine for me at the moment.

As I mentioned in a previous post, I've had a log file go crazy and fill
up /var.  My system continued to run just fine.  However, if it was on
the same file system as / is on, that could have created problems. 
Could even cause a crash and may not even reboot normally either.  Just
depends on what must store things there I guess. 

Just thoughts.  Each has to do things to suit their situation. 

Dale

:-)  :-) 



[gentoo-user] Re: [OT] suggest SSD partitioning

2021-12-10 Thread Grant Edwards
On 2021-12-10, Nikos Chantziaras  wrote:
> On 09/12/2021 21:27, p...@xvalheru.org wrote:
>> I'm planning small /boot partition, / partition and /data (including 
>> home) partition.
>
> I just use one partition. What's the point of having multiple ones if
> they're all on the same storage device?

I find it easier to re-install if home and data directories are on a
different filesystem than the system stuff.

--
Grant




[gentoo-user] Re: [OT] suggest SSD partitioning

2021-12-10 Thread Nikos Chantziaras

On 09/12/2021 21:27, p...@xvalheru.org wrote:
I'm planning small /boot partition, / partition and /data (including 
home) partition.


I just use one partition. What's the point of having multiple ones if
they're all on the same storage device?


But I'm not sure if I should create a swap partition or swap to 
file. I'm daily hibernating the system to disk. And what should be 
the size od the swap same as RAM or bigger?
The "perfect" setup here would be to get a very small SSD (and those 
tend to be very cheap), like a 64GB one for $20 or thereabout, and use 
that as your swap. Just a single swap partition that uses all available 
storage space.


I don't like swap being on my main SSD, since SSDs wear out when you 
write to them. If you're hibernating the system all the time, that 
results in quite a lot of data being written. Having a cheap small 
dedicated SSD for that where you don't care much about its longevity 
sounds like a good idea to me.


If you can't do that, then it doesn't matter much whether you use a swap 
file or partition. On an SSD, both should perform about the same. On an 
HDD, swap files could run into fragmentation issues if you resize them 
or create them incorrectly. On an SSD, fragmentation doesn't have much 
of an impact. A swap file gives you the option to resize it later on 
without having to do filesystem and partition resizing, so I'd say a 
swap file sounds better.