Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SSD Optimization and tweaks - Looking for tips/recomendations

26 views
Skip to first unread message

Marcelo Laia

unread,
Jun 28, 2022, 1:50:05 PM6/28/22
to
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?

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.

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

Thank you!

--
Marcelo

Michael Stone

unread,
Jun 28, 2022, 2:20:05 PM6/28/22
to
On Tue, Jun 28, 2022 at 02:25:36PM -0300, Marcelo Laia wrote:
>4. Any other recommendations to improve the performance and lifespan of this disk?

don't worry about it; accept the defaults and you'll be fine

Charles Curley

unread,
Jun 28, 2022, 2:40:06 PM6/28/22
to
On Tue, 28 Jun 2022 14:25:36 -0300
Marcelo Laia <marce...@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/

Linux-Fan

unread,
Jun 28, 2022, 3:00:06 PM6/28/22
to
Marcelo Laia writes:

> 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?

You could do both at once, too. See the other users' answers.

> 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.

IIRC the best practice was to not use the "discard" mount option and rather
run "fstrim" at regular intervals. You could use the `fstrim.timer` systemd
unit from package util-linux for that purpose.

> 3. Should I reserve a swap partition or not? I always had one on hdd disks.
> I was in doubt, too.

If you want to have a swap partition, it is perfectly OK to create one on an
SSD. In fact, I have sometimes used SSD swap to my advantage. Today its
mostly a matter of personal preference.

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

The wiki page is already pretty comprehensive. On my systems I mostly do the
“Reduction of SSD write frequency via RAMDISK” thing.

As with all disks, it can help to setup S.M.A.R.T. monitoring. For SSDs, a
metric like “liftime GiB written” or something similar is often included.
This can be used to reveal if your system is doing a lot of writes or not by
checking the changes of the value over time (e.g. with help from `smartd`
from package smartmontools).

HTH and YMMV
Linux-Fan

öö

Alexander V. Makartsev

unread,
Jun 28, 2022, 3:30:05 PM6/28/22
to
On 28.06.2022 22:25, Marcelo Laia 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?
One is a filesystem and the other is a partition technology, a
completely different thing.
My recommendation is to use whatever you are comfortable and experienced
with.
Unless of course you feel adventurous and want to learn new things and
use extra features. More about that below.

> 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.
Most of those warnings are outdated and nowadays all major SSD
manufacturers have developed stable firmware for their products.
Personally, I don't use "discard" mount option, instead I manually run
"fstrim" utility once a few months.
But, my SSD serves me as a system disk and that is not a write-intensive
workload.

> 3. Should I reserve a swap partition or not? I always had one on hdd disks. I was in doubt, too.
Yes, you should. The difference in performance will be noticeable,
whenever your system would resort to swap usage.

> 4. Any other recommendations to improve the performance and lifespan of this disk?
A performance improvement is a complex task and in some cases could be
impossible due to hardware limits of the host or the SSD device itself.
On modern system with SATA3 interface, there is not much you can do to
increase a performance of SSD, other than optimizing your workloads and
maybe choosing among different flash-optimized filesystems.
I'd recommend to check out a somewhat recent Phoronix article¹ about
filesystem benchmarks.
And then again it depends on your workload if these optimizations even
worth doing and the time spent learning a new techs.

So the bottom line is, if your workload is low, then you should stop
worrying and simply enjoy your new SSD.
It will last for many years and probably will be moved to a newly build
PC to serve as an additional storage device there.

> Thank you!


¹ :
https://www.phoronix.com/scan.php?page=article&item=linux-58-filesystems&num=1

--
With kindest regards, Alexander.

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀⠀⠀⠀

David Wright

unread,
Jun 28, 2022, 7:30:05 PM6/28/22
to
I don't remember there being a default for overprovisioning
besides the so-called inherent 7%. Any recommendations?

Cheers,
David.

gene heskett

unread,
Jun 28, 2022, 11:30:06 PM6/28/22
to
I've had no further card losses in my rpi since moving to a 64 gig u-sd
for its boot, despite
the fact that around a 100 megs a day gets over-written in keeping up
with the development
branch of linuxcnc's master git repo. My basic theory is that if the
card has enough room to
do its thing the card will last quite some time, It nearly 5 years old
now. Whats on it is around
13G, and if I was still running from a 16G, I would probably have
destroyed 2 a year with that
amount of traffic in what would have to be considered cramped space. 
Give an SSD room to
do its thing and you'll be thanked.
>
> .


Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/>
0 new messages