[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Reasonably simple setup for 1TB HDD and 250GB M.2 NVMe SSD



On 2021-12-15 15:51, Jorge P. de Morais Neto wrote:
Hello,

Em [2021-12-09 qui 15:00:43+0100], hdv@gmail escreveu:

Regarding the swap space: I wouldn't make it so big.  That really isn't
necessary.  I have a 64GB RAM system here, on which I have 2GB of swap.  I
doubt I have ever seen conky show me more than 35% use.  And I am quite a
heavy user of system resources (much 3D CAD editing, photo editing,
video editing and rendering, and often multiple VM's in use).

My laptop has 32GB of RAM and 2 GB of swap and on that system I haven't
seen much swapping either.

I wanted to play safe in case I later upgrade the RAM to 32 GiB and,
additionally, I later enable the hibernate functionality.  Since I have
a 1 TB HDD, I can spare a 32 GiB (approximately 34 GB) for swapping.

If you can spare the space, then I don't see why not. If you plan to go to ACPI state S4 (suspend to disk, hibernate) this certainly is useful. In my experience only a handful of people actually use S4 though.

> For increased swapping performance, the swapping space on a rotational
drive should be contiguous and located at the start of the drive, right?

I used to think so myself. And out of habit I still choose to do it like that myself. But I haven't noticed any significant performance gains during some extensive testing in practice (>100 disks over a period of 3 years in a server room of a university).

Apart from performance, it is said that it would mean less movement of the heads and thus less wear [1], but again, in practice I haven't ever seen a case where this would have made a significant difference in a normal user setting. It would be different in a large-scale commercial setting though.

There is something else to consider: why not create a swap file, instead of a swap partition? That way you are free to play around and test what fits your needs best, without having to chance the partitions.

[1] This will depend on many, many parameters. You would expect a location somewhere in the middle of the disk to be the sweet spot when it comes to minimising movement in a fairly filled up disk. But then again, if you have lots of static files you do not regularly access in a large partition at the end of the disk, then you will have an uneven geometry which will make the optimum shift.

Grx HdV


Reply to: