Announcement

Collapse
No announcement yet.

What are the SSD and NVMe pre install procedures

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    What are the SSD and NVMe pre install procedures

    What are the best recommended procedures for installing Kubuntu on and SSD or NVMe M.2 drive?

    TRIM - Does Kubuntu set trim automatically or will I need to set trim?

    Alignment - In the past I followed some threads about putting 1MB of unallocated space at the beginning of the SSD to account for alignment of the drive. I have also seen comments about using 3MB for a NVMe drive. Does this need to be done?

    Overprovisioning - Some people say you need 10% unallocated space at the end of the drive to account for over provisioning. Do I need to do this?

    #2
    TRIM - I've been doing some research on these subjects and from other post in this forum it appears that Kubuntu does include trim

    Over-Provisioning -
    I found an interesting article by Seagate about over provisioning a SSD. https://www.seagate.com/tech-insights/ssd-over-provisioning-benefits-master-ti/

    If I read that correctly, it appears that manufacturers build in 7% over provisioning by default due to the difference in GB vs GiB (Note the lower case i) On top of that, it appears that any free space on your SSD will be used as 'dynamic' over-provsioning. So although setting aside additional unallocated space for over-provisioning would increase performance when your drive is full by prohibiting you from truly filling your ssd with data. It seems to me that it would not make a difference if you have any empty space on the drive since that would be used for dynamic over provisioning anyway. I think that would include formatted space that is empty too. At least thats how I understand it. So it appears to me it might be helpful in some cases if your run your SSD at high capacity, but not really necessary. Let me know if its something different.

    Comment


      #3
      I don't think there is anything special required. I certainly have never done anything different or special with solid state drives the past 4 or 5+ years I have used them.

      Comment


        #4
        Review this guidance (*buntu is a Debian derivative), and prepare the SSD accordingly.

        Set up your system to run the fstrim command periodically, or run it manually, on the root filesystem.

        Comment


          #5
          *bunbtu has fstrim set to run weekly.


          You can check it this way:
          Code:
          claydoh@claydoh-ideapad:~$ systemctl status fstrim.timer
          ● fstrim.timer - Discard unused blocks once a week
             Loaded: loaded (/lib/systemd/system/fstrim.timer; enabled; vendor preset: enabled
             Active: active (waiting) since Sun 2018-12-09 17:17:14 EST; 4 days ago
            Trigger: Mon 2018-12-17 00:00:00 EST; 3 days left
               Docs: man:fstrim
          relatime is also the default, so does not have to be set in the fstab, though one could use noatime instead.


          If have the swap on the ssd, and you see it being used too heavily, you will want to change swappiness from the default of 60 down to 10, or even 1
          https://help.ubuntu.com/community/Sw...I_change_it.3F
          I forgot about this one, as I have not seen this issue consistently.
          Swappiness is adjusted a little bit differently than how it is shown for the Debian setup page linked to by dibl. There may be some other differences as well, but I did not notice any others with a quick glance.

          Comment


            #6
            Personally - just my opinion - much of the advice about SSDs and trim, alignment, their life-span, and swap are FUD, out-of-date, or nonsensical.

            First swap: Swap is used only when you run out of memory and need to move "live" stuff out of RAM onto another device (I am really over-simplifying here). Why the heck would you spend somewhere of the order of TEN times to cost of a hard drive to buy a NVMe drive and then not put swap on the fastest device on your system? Boggles the mind - totally backwards thinking. Dumbest thing I've heard. By all means, tune your swap - regardless if you use a hard drive or an SSD to swap to - but don't purposely cripple it by not using the SSD.

            That leads to life expectancy: SSDs - modern SSDs - will last as long as any hard drive under normal use. Swap would be considered a normal use for a storage device, right? There are specific use-cases where a hard drive is better - like massive amounts of data, etc. And there are use-cases where the SSD is of little benefit. Regardless, your SSD will outlive your need to have it. Moore's Law says so.

            Trim: Overused, period. Unless your SSD is 80-90% full, monthly is plenty of trim and still probably too much. Reasoning? Running trim is more activity than using swap (unless you're way low on RAM). If you're questioning swap, why are you trimming more often than necessary?

            Finally, the easiest to address - Alignment. For about 2-3 years now (maybe longer) the partitioning tools supplied with Linux automatically align partitions properly when creating them. You'd have to deliberately make them un-aligned in order to get them that way. I do this (create a single un-aligned partition) because I use GRUB (in lieu of EFI) and it needs extra space on a GPT formatted drive. I use the free space of sectors 34 and 2047 to provide GRUB it's space as the first aligned partition begins at sector 2048.

            Please Read Me

            Comment


              #7
              Thank you all for the information. I'm still researching and reading up on things. For the most part I am finding the same information as you guys have provided. Trim is done automatically and alignment is done automatically. So that really only leaves swap and over partitions.

              I think oshunluvr makes a good point to keep swap on the NVME... if swap is even needed. Although my current system with 16GB does use it on occasions with 2 virtual machines and lots of browser tabs open.

              I am still undecided if I need to reserve unallocated space for over-provisioning.

              Comment


                #8
                Fargo, off topic but... are you a lawyer/studied law, and used to frequent "shooting/firearms" sites?
                If you think Education is expensive, try ignorance.

                The difference between genius and stupidity is genius has limits.

                Comment


                  #9
                  Originally posted by Fargo View Post
                  I am still undecided if I need to reserve unallocated space for over-provisioning.
                  Do some research here also. Most reports I've read say it's overkill for typical (non-commercial) use and some SSDs already OP themselves.

                  Please Read Me

                  Comment


                    #10
                    I am still undecided if I need to reserve unallocated space for over-provisioning.
                    Some have it built in and some don't, so it will depend on what brand you get. For instance, Samsung let's you decide how much space you want to allocate with Samsung Magician Software. Sandisk, if I remember correctly has it built in, but word on the net is you can allocate more if you want, manually, by re-partitioning. I have a PNY also, and that has it built in too, so I never messed with it as I understand it is already set and not of much concern to me really. I say that because I've read enough about the subject to know that with modern SSD's it's not all that important. I'm giving a generous 10% on my Samsung 250 EVO. I remember reading 7-10% is good for your average user. The Sandisk Extreme Pro is using 12.7% from the factory.
                    Dell OptiPlex 9010 SFF, 8GB RAM, i7 3770, Kubuntu 18.04, MB 051FJ8

                    Comment


                      #11
                      Originally posted by Fargo View Post
                      What are the best recommended procedures for installing Kubuntu on and SSD or NVMe M.2 drive?

                      TRIM - Does Kubuntu set trim automatically or will I need to set trim?

                      Alignment - In the past I followed some threads about putting 1MB of unallocated space at the beginning of the SSD to account for alignment of the drive. I have also seen comments about using 3MB for a NVMe drive. Does this need to be done?

                      Overprovisioning - Some people say you need 10% unallocated space at the end of the drive to account for over provisioning. Do I need to do this?
                      What's important, and has been hinted at by everyone's replies, is your needs. Is this a personal use system with not a lot of system intensive applications being used all the time (on the low side) or a commercial use system maybe with a lot of software development, sales, inventory management type activity (on the high side). But, even that will dictate your system administration decisions much more than the initial setup. Over-provisioning is not a necessity. It would be more useful to over-size your storage needs, with the low cost of drives these days (i.e., if you think you need 750GB, get 1 TB).
                      The next brick house on the left
                      Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.24.7 | Kubuntu 22.04.4 | 6.5.0-18-generic

                      Comment


                        #12
                        Thanks for all the replies. I'm not getting updates when a reply was posted so I missed them. My NVMe is a Samsung, but unfortunatly the Samsung Magician does not work with Linux. So its of no use. In the end I did not create an extra drive for over partioning. My understand was that the NVME should have a built in 7% due to the difference in GB vis Gib. My machine is used for business desktop use with a virtual machine. But I don't think it will be too demanding for hard drive usage.

                        Comment


                          #13
                          Originally posted by Fargo View Post
                          My NVMe is a Samsung, but unfortunatly the Samsung Magician does not work with Linux. So its of no use. In the end I did not create an extra drive for over partioning.
                          Whoops, brain fart on my part. I'm not using my samsung with linux anymore. When I did it was Dual Booted with Windows 7, so the Samsung Magician was still used.

                          I believe you can change your Notification Settings by going here: Settings Top Right > General Settings on Left > Default Thread Subscription Mode: Use the dropdown to change it to what you want. Some forums have Notifications OFF by Default.
                          Dell OptiPlex 9010 SFF, 8GB RAM, i7 3770, Kubuntu 18.04, MB 051FJ8

                          Comment


                            #14
                            The SSD will serve you just fine, in place of the stock platter drive. You will boot faster, and have generally faster response versus the spinner.

                            One thing that may make your life with the laptop better, is more RAM. According to the specs sheetyou can go up to 16 GB. Otherwise, you should be good with this package.
                            The next brick house on the left
                            Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.24.7 | Kubuntu 22.04.4 | 6.5.0-18-generic

                            Comment


                              #15
                              Originally posted by Fargo View Post
                              My NVMe is a Samsung
                              It would also be good to know what machine and drive you are talking about for the best answers. Also, I'm looking into possibly installing an NVMe M.2 SSD, so as you can see this would be a more valuable thread if all the deets were included.
                              Dell OptiPlex 9010 SFF, 8GB RAM, i7 3770, Kubuntu 18.04, MB 051FJ8

                              Comment

                              Working...
                              X