On Sat, Apr 15, 2023 at 3:47 PM Dale <rdalek1967@gmail.com <mailto:rdalek1967@gmail.com>> wrote:
Howdy,
I finally broke down and bought a SSD. It's a Samsung V-Nand 870 EVO 500GB. My current OS sits on a 160GB drive so should be plenty. I plan to even add a boot image for the Gentoo LiveGUI thingy, maybe Knoppix or something plus my usual OS. By the way, caught one for sale for $40.00. It has a production date of 5/2021.
My question is this. Do I need anything special in the kernel or
special fstab options for this thing? I know at one point there was folks having problems with certain settings. I did some googling and it seems to be worked out but I want to be sure I don't blow this thing up
or something.
Anything else that makes these special? Any tips or tricks?
Dale
:-) :-)
P. S. I'm hoping this will make my system a little more responsive. Maybe. Either way, that 160GB drive is getting a little full.
Dale,
I have 500GB SSDs and 1TB M.2 drives in all of my machines. No
machine boots from a spinning drive anyhmore. Never had any
problems.
The only thing I've done differently is the errors=remount=ro item below. Other than that if whatever OS you install sets up boot, and
the machine boots, then it's just a drive in my experience
Best wishes,
Mark
# / was on /dev/nvme1n1p3 during installation UUID=3fe6798f-653f-42e8-8e96-7ba0d490bfdf / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=60DF-9F56 /boot/efi vfat umask=0077 0 1
Howdy,
I finally broke down and bought a SSD. It's a Samsung V-Nand 870 EVO
500GB. My current OS sits on a 160GB drive so should be plenty. I plan
to even add a boot image for the Gentoo LiveGUI thingy, maybe Knoppix or something plus my usual OS. By the way, caught one for sale for
$40.00. It has a production date of 5/2021.
My question is this. Do I need anything special in the kernel or
special fstab options for this thing? I know at one point there was
folks having problems with certain settings. I did some googling and it seems to be worked out but I want to be sure I don't blow this thing up
or something.
Anything else that makes these special? Any tips or tricks?
Dale
:-) :-)
P. S. I'm hoping this will make my system a little more responsive.
Maybe. Either way, that 160GB drive is getting a little full.
> 500GB. My current OS sits on a 160GB drive so should be plenty. I plan<br>> to even add a boot image for the Gentoo LiveGUI thingy, maybe Knoppix or<br>> something plus my usual OS. By the way, caught one for sale for<br>> $40.00.It has a production date of 5/2021. <br>><br>> My question is this. Do I need anything special in the kernel or<br>> special fstab options for this thing? I know at one point there was<br>> folks having problems with certain settings.
Howdy,
I finally broke down and bought a SSD. It's a Samsung V-Nand 870 EVO 500GB. My current OS sits on a 160GB drive so should be plenty. I plan
to even add a boot image for the Gentoo LiveGUI thingy, maybe Knoppix or something plus my usual OS. By the way, caught one for sale for
$40.00. It has a production date of 5/2021.
My question is this. Do I need anything special in the kernel or
special fstab options for this thing? I know at one point there was
folks having problems with certain settings. I did some googling and it seems to be worked out but I want to be sure I don't blow this thing up
or something.
Anything else that makes these special? Any tips or tricks?
Dale
:-) :-)
P. S. I'm hoping this will make my system a little more responsive. Maybe. Either way, that 160GB drive is getting a little full.
look into mount options for SSD's (discard option) and "fstrim" for maintenance. (read up on trimmimg - doing a manual trim before the drive reaches full allocation (they delete files, but do not erase them
because erasing is time consuming so its an OS controlled operation) or
auto trimming (which can cause serious pauses at awkward times) can
prevent serious performance degradation as it has to erase before
writing. I am not sure of the current status but in the early days of
SSD's, this was serious concern.
On Sunday, 16 April 2023 02:47:00 BST William Kenworthy wrote:
look into mount options for SSD's (discard option) and "fstrim" forIn short, see https://wiki.gentoo.org/wiki/SSD . :)
maintenance. (read up on trimmimg - doing a manual trim before the drive
reaches full allocation (they delete files, but do not erase them
because erasing is time consuming so its an OS controlled operation) or
auto trimming (which can cause serious pauses at awkward times) can
prevent serious performance degradation as it has to erase before
writing. I am not sure of the current status but in the early days of
SSD's, this was serious concern.
On 16/4/23 15:18, Peter Humphrey wrote:drive
On Sunday, 16 April 2023 02:47:00 BST William Kenworthy wrote:
look into mount options for SSD's (discard option) and "fstrim" for
maintenance. (read up on trimmimg - doing a manual trim before the
reaches full allocation (they delete files, but do not erase themIn short, see https://wiki.gentoo.org/wiki/SSD . :)
because erasing is time consuming so its an OS controlled operation) or
auto trimming (which can cause serious pauses at awkward times) can
prevent serious performance degradation as it has to erase before
writing. I am not sure of the current status but in the early days of
SSD's, this was serious concern.
Excellent, condenses it nicely.
BillK
On Sun, Apr 16, 2023 at 1:44 AM William Kenworthy <billk@iinet.net.au <mailto:billk@iinet.net.au>> wrote:
On 16/4/23 15:18, Peter Humphrey wrote:
On Sunday, 16 April 2023 02:47:00 BST William Kenworthy wrote:
the drivelook into mount options for SSD's (discard option) and "fstrim" for
maintenance. (read up on trimmimg - doing a manual trim before
operation) orreaches full allocation (they delete files, but do not erase them
because erasing is time consuming so its an OS controlled
days ofauto trimming (which can cause serious pauses at awkward times) can
prevent serious performance degradation as it has to erase before
writing. I am not sure of the current status but in the early
SSD's, this was serious concern.In short, see https://wiki.gentoo.org/wiki/SSD . :)
Excellent, condenses it nicely.
BillK
OK Dale, I'm completely wrong, but also 'slightly' right.
If you have an SSD or nvme drive installed then fstrim should be
installed and run on a regular basis. However it's not 'required'.
Your system will still work, but after all blocks on the drive have
been used for file storage and later deleted, if they are not
written back to zeros then the next time you go to use that
block the write will be slower as the write must first write
zeros and then your data.
fstrim does the write to zeros so that during normal operation
you don't wait.
I've become so completely used to Kubuntu that I had to read
that this is all set up automatically when the system finds an
SSD or nvme. In Gentoo land you have to do this yourself.
Sorry for any confusion. Time to unsubscribe from this list
I guess and leave you all to your beloved distro.
Bye,
Mark
Oh, please, don't go anywhere. <begging> We already lost the long termAlan. BTW, I checked on him a while back. He's still OK. It's been a
I read during a google search that some distros handle this sort of thingautomatically, some sort of firmware thing or something. I figured Gentoo didn't, it rarely does since that is the point of Gentoo. So, no harm.
I do have one gripe. Why can't drive makers pick a screw size and stickto it on ALL drives? It took some digging to find a screw that would fit.
Is running fstrim once a week to often? I update my OS once a week butgiven the amount of extra space, I'd think once a month would be often
Now to play with this thing. I got to remember what all has to be copiedover so I can boot the new thing. :/ Been ages since I moved a OS to
Dale - I touched - truly. I'm happy to stick around but I no longer </div><div>run Gentoo and don't want to cause problems or piss off the </div><div>folks who need to be here. </div><div><br>> I read during a google search that somedistros handle this sort of thing automatically, some sort of firmware thing or something. I figured Gentoo didn't, it rarely does since that is the point of Gentoo. So, no harm. Heck, I just now applied power to the thing. I don't even
BTW - Windows does this in Disk Defragmenter but you have to </div><div>schedule it yourself according to Bard and ChatGPT. I'll be in </div><div>Windows later today to record some new music and plan to look into</div><div>that then.</div><div><going to this drive. </div><div><br></div><div><br>><br>> I do have one gripe. Why can't drive makers pick a screw size and stick to it on ALL drives? It took some digging to find a screw that would fit. Some I bought that are supposed
</div><div>Answering the question from below - weekly is what was set up by </div><div>default here. If your drive isn't near full and you're not writing a lot of new</div><div>data on it each week then weekly would seem reasonable to me. </
<div>However being that you are running Gentoo and hence compiling</div><div>lots and lots and lots of stuff every week it's possible that you </div><div>might _possibly_ want to run fstrim more often if your intermediate </div><div>files are
work, maybe, maybe not.</div><div><br></div><div>3) If you have another SATA port then dual boot, </div><div>either with Gentoo on both or something simple </div><div>like Kubuntu. A base Kubuntu install takes about</div><div>15 minutes and willprobably give you its own</div><div>dual boot grub config. When you're sick of Kubuntu</div><div>you can once again install Gentoo.</div><div><br></div><div>Good luck no matter what path you take.</div><div><br></div><div>Mark</div></div>
If you have an SSD or nvme drive installed then fstrim should be
installed and run on a regular basis. However it's not 'required'.
Your system will still work, but after all blocks on the drive have
been used for file storage and later deleted, if they are not
written back to zeros then the next time you go to use that
block the write will be slower as the write must first write
zeros and then your data.
fstrim does the write to zeros so that during normal operation
you don't wait.
Sorry for any confusion. Time to unsubscribe from this list
I guess and leave you all to your beloved distro.
Bye,See above.
Mark
I think what I read is that it is done automatically. They could have
meant a cron job. I don't think they said how, just that it is already
set up to do it. Firmware was mentioned in the thread somewhere so I
thought maybe that was it. Either way, fstrim is installed here. It's
part of util-linux and that is pulled in by several packages. I doubt
it will be going away here anytime soon given the long list of packages
that need it. Just to set up a cron job for it. Remembering the steps
for that will take time tho. o_O
I've thought of a few options myself. I sort of have a OS copy/backup already. I currently do the compiling in a chroot on a separate drive.
I then copy the compiled packages and use the -k option to update the
live OS. I'll continue to do that when I start booting from the SSD.
That should limit writes and such to the SSD. I also got to rearrange
things so I can put swap on that spare drive I compile on. I don't want
swap on a SSD. I wish this thing would stop using swap completely. I
have swappiness set to 1 already and it still uses swap.
Right now, I'm debating the size of /boot. Knoppix is pretty large.
The Gentoo LiveGUI thingy is too. So, it will have to be larger than
the few hundred megabytes my current one is. I'm thinking 10GBs or so.
Maybe 12GBs to make sure I'm good to go for the foreseeable future.
They may limit them to DVD size right now but one day they could pass
that limit by. Software isn't getting smaller. Besides, USB is the
thing now.
Mark Knecht wrote:
<<< SNIP >>>
I guess I don't understand why you would put Knoppix in the boot
partition vs somewhere else. Is this for some sort of recovery
process you're comfortable with vs recovering from a bootable DVD?
- Mark
I'm wanting to be able to boot something from the hard drive in the
event the OS itself won't boot. The other day I had to dig around and
find a bootable USB stick and also found a DVD. Ended up with the DVD working best. I already have memtest on /boot. Thing is, I very rarely
use it. ;-)
</div><div><br></div></div>
Am Sun, Apr 16, 2023 at 08:08:59AM -0700 schrieb Mark Knecht:
If you have an SSD or nvme drive installed then fstrim should be
installed and run on a regular basis. However it's not 'required'.
Your system will still work, but after all blocks on the drive have
been used for file storage and later deleted, if they are not
written back to zeros then the next time you go to use that
block the write will be slower as the write must first write
zeros and then your data.
fstrim does the write to zeros so that during normal operation
you don't wait.
That is not quite correct. Trimming is about the oppisite of what you say, namely to *not* rewrite areas. Flash memory can only be written to in relatively large blocks. So if your file system wants to write 4 KiB, the drive needs to read all the many kB around it (several hundreds at least, perhaps eben MiBs, I’m not certain), change the small part in question and write the whole block back. This is called write amplification. This also occurs on hard drives, for example when you run a database which uses 4
kiB
datafile chunks, but on a file system with larger sectors. Then the file system is the cause for write amplification.
If the SSD knew beforehand that the area is unused, it does not need to
read
it all in and then write it back. The SSD controller has no knowledge of
file systems. And this is where trim comes in: it does know file systems, detects the unused areas and translates that info for the drive
controller.
Also, only trimmed areas (i.e. areas the controller knows are unused) can
be
used for wear leveling.
I even think that If you read from a trimmed area, the controller does not actually read the flash device, but simply returns zeroes. This is
basically
what a quick erase does; it trims the entire drive, which takes only a few seconds, and then all the data has become inaccessible (unless you address the memory chips directly). It is similar to deleting a file: you erase
its
entry in the directory, but not the actual payload bytes.
AFAIK, SMR HDDs also support trim these days, so they don’t need to do their
SMR reshuffling. I have a WD Passport Ultra external 2.5″ HDD with 5 TB, and
it supports trim. However, a WD Elements 2.5″ 4 TB does not. Perhaps because
it is a cheaper series. Every laptop HDD of 2 (or even 1) TB is SMR.
--
Grüße | Greetings | Salut | Qapla’
Please do not share anything from, with or about me on any social network.
“It is hard to be a conquering hero when it is not in your nature.”
– Captain Hans Geering, ’Allo ’Allo
Frank,
Thank you for the in-depth explanation.
I need to do some study before commenting further other than to say
so far I'm finding different comments depending on whether it's
an SSD or an M.2 drive.
I'm wanting to be able to boot something from the hard drive in the
event the OS itself won't boot. The other day I had to dig around and find a bootable USB stick and also found a DVD. Ended up with the DVD working best. I already have memtest on /boot. Thing is, I very rarely
use it. ;-)
So in the scenario you are suggesting, is grub working, giving you a
boot choice screen, and your new Gentoo install is not working so
you want to choose Knoppix to repair whatever is wrong with
Gentoo?
Given I have a 500GB drive, I got plenty of space. Heck, a 10GB
partition each is more than enough for either Knoppix or LiveGUI. I
could even store info on there about drive partitions and scripts that I
use a lot. Jeez, that's a idea.
Am Sun, Apr 16, 2023 at 01:22:32PM -0700 schrieb Mark Knecht:and
Frank,
Thank you for the in-depth explanation.
I need to do some study before commenting further other than to say
so far I'm finding different comments depending on whether it's
an SSD or an M.2 drive.
Uhm, I think you mix up some terms here. An M.2 drive *is* an SSD
(literally, as the name says, a solid state drive). By “SSD”, did you mean
the classic laptop form factor for SATA HDDs and SSDs?
Because M.2 is also only a physical form factor. It supports both NVMe and SATA. While NVMe is more modern and better suited for solid state media
their properties, in the end it is still only a data protocol to transfer data to and fro.
<div>probably use SATA. </div><div><br></div><div>When I speak of M.2 I mean what you and I both call M.2.</div><div><div><br class="gmail-Apple-interchange-newline">While SSD & M.2 are both Flash devices they don't provide the same info </div><div>when queried by smartctl which makes a direct comparison more</div></div><div>difficult.</div><div><br></div><div>Depending on the manufacturer & the foundry they build the chips in the</div><div>technologies in these devices can be quite
<div>In my case the workloads are generally fairly large files. They are generally</div><div>either 24MB photo files for astrophotography or audio recording files which</div><div>are typically 50-100K. Neither of them are 'modified' and needto be </div><div>rewritten. They are either saved or deleted.</div><div><br></div><div>Whether the write amplification makes a difference or not in real life </div><div>I don't know. I'm sure for some work loads it does but the 'percent</
<div>used' value that smartctl returns is 2% for the Crucial and 0% for</div><div>the Sabrent so both appear to have a lot of life left in them.</div><div><br></div><div>Mark<br><br></div></div>
My current install is over a decade old. My /boot partition is about 375MBs. I should have made it larger but at the time, I booted CD/DVD
media when needed. I didn't have USB sticks at the time. This time, I plan to make some changes. If I put Knoppix and/or Gentoo LiveGUI in
/boot, it will be larger. Much larger. Mark's idea is best tho. If I can get Grub to work and boot it.
On 17/04/2023 02:14, Dale wrote:
My current install is over a decade old. My /boot partition is about 375MBs. I should have made it larger but at the time, I booted CD/DVD media when needed. I didn't have USB sticks at the time. This time, I plan to make some changes. If I put Knoppix and/or Gentoo LiveGUI in /boot, it will be larger. Much larger. Mark's idea is best tho. If I
can get Grub to work and boot it.
If you dd your boot partition across, you can copy it into a larger
partition on the new drive, and then just expand the filesystem.
So changing partition sizes isn't a problem if you want to just copy
your system drive onto a new disk.
Cheers,
Wol
<br></div><div>I'm not sure I'd use dd in this case. If he's moving from an HDD with</div><div>a 4K block size and a 4K file system block size to an SDD with a 16K </div><div>physical block size he might want to consider changing thefilesystem </div><div>block size to 16K which should help on the write amplification side.</div><div><br></div><div>Maybe dd can do that but I wouldn't think so.</div><div><br></div><div>And I don't know that formatting ext4 or some other FS to
And I don't know that formatting ext4 or some other FS to 16K
really helps the write amplification issue but it makes sense to
me to match the file system blocks to the underlying flash
block size.
Real speed testing would be required to ensure reading
16K blocks doesn't slow him down though.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 303 |
Nodes: | 16 (2 / 14) |
Uptime: | 84:13:52 |
Calls: | 6,808 |
Calls today: | 4 |
Files: | 12,328 |
Messages: | 5,401,327 |