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

Re: SSD Optimization and tweaks - Looking for tips/recommendations



On Tue, 28 Jun 2022 14:25:36 -0300
Marcelo Laia <marcelolaia@gmail.com> wrote:

> Hi,
> 
> I bought a SSD solid disk and will perform a fresh install on it.
> Debian testing. I've never used such a disc.
> 
> I bought a Crucial CT1000MX500SSD1 (1TB 3D NAND Crucial SATA MX500
> Internal SSD (with 9.5mm adapter) — 6.35cm (2.5in) and 7mm).
> 
> I read the recommendations on the
> https://wiki.debian.org/SSDOptimization page.
> 
> However, I still have some doubts:
> 
> 1. Use ext4 or LVM partitioning?

I think you have some confusion here. They are different layers in
the mass storage hierarchy. ext4 is a file system. LVM is a system for
managing volumes. Volumes are room on mass storage. File systems go
into volumes to organize files and their metadata. So I recommend both.

I usually build as follows:

/dev/sda1: A 500 MB fat32 partition for EFI iff you are going to boot
using UEFI. That's probably overkill, but on a 1 TB drive you have room
to spare. That will mount to /boot/efi. Debian Installer will do that
for you if it can.

/dev/sda2: A 500 MB ext4 boot partition. Mounts at /boot.

/dev/sda3: Unless you are using GPT, this is an extended partition,
containing the rest:

/dev/sda5: An encrypted LVM physical volume (PV). It contains:

A swap logical volume (LV), sized per your hardware

a root LV, mounted at /, and

a home LV, mounted at /home

All of those have sizes suitable for what you are doing, and I have no
idea what you are doing.

Any of those volumes or partitions that are mounted get the ext4 file
system.

With LVM, you can use GParted to expand and contract volumes within the
(PV). So if later you decide you don't need swap space, you can delete
the swap LV, and expand other LV(s) to use that space.

Which means you don't have to create LVs to use up the entire PV when
you start. You can expand into the unused space later as needed.

> 
> 2. I read in the Warnming section that some discs contain bugs,
> including Crucial. But I don't know if I need to use or not use
> "discard" on this disk (CT1000MX500SSD1). If I need to proceed with
> use "discard", would you please have any tips on how to do it? I
> didn't understand how to do this.
> 
> 3. Should I reserve a swap partition or not? I always had one on hdd
> disks. I was in doubt, too.

That depends on your hardware and work load, not the type of mass
storage you have. If you've had swap in the past, you should almost
certainly have it now.

> 
> 4. Any other recommendations to improve the performance and lifespan
> of this disk?

You will find the performance a noticeable improvement over spinning
rust, and life spans of SSDs are comparable to HDDs. I wouldn't worry
about it.

And for Murphy's sake, do backups!
https://charlescurley.com/blog/posts/2019/Nov/02/backups-on-linux/


-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/


Reply to: