Announcement

Collapse
No announcement yet.

new SSD for OS's , guidance please

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

    #16
    My systemd-analyze plot output

    I've been playing with various systemd services and adjusting them to minimize bootup time. My biggest time waster was NetworkManager-wait-online.services. It was taking 28 seconds. I set it to wait a random amount of time between 15 and 30 minutes after the desktop displayed before it would run. My next most problematic service is my USB Printer connection, which takes 7.1 seconds. Below are the outputs of the plot. They show
    Startup finished in 3.774s (kernel) + 8.433s (userspace) = 12.207s
    graphical.target reached after 2.025s in userspace
    When my laptop starts up there is a pause of about 4-6 seconds and then a beep. Is that the grub beep? Then there is a pause of about 15-20 seconds and I get the login prompt. After entering my password the desktop shows almost immediately. But, actually, by my wrist watch, my power on to working desktop is about 25-30 seconds. Most of it between the beep and the appearance of tthe login prompt. I can't explain what those systemd-analyze numbers mean. If I were to guess I'd say that from power on to the beep is the POST period, which Systemd cannot time. Timing starts when Grub fires the kernel. Is the beep due to grub? As I wrote, my longest stretch is between the beep and the login prompt. I've timed from the press of the power button to the login prompt at 31 seconds.

    Click image for larger version

Name:	Pllot30a.jpg
Views:	1
Size:	77.8 KB
ID:	644035

    Click image for larger version

Name:	plot30b.jpg
Views:	1
Size:	78.1 KB
ID:	644036

    As you can see in the second graph, my biggest delay is the usb printer connection service. IF I found a way to move that service till some time after my desktop appears and is functional, then my power-on to working desktop would be about 7 seconds.

    Over Provisioning an SSD


    Note: The BEST time to set up OP is when you are in the format phase of a new install. Decide how much the OP space should be and subtract that from the size of the RAW partition. Format the raw space at the front of the drive. Leave the unformatted raw space for the controller to untilize as an Over Provisioning area.

    Another thing I've been looking into in order to speed things up is to increase the over provisioning of my SSD from the factory default of 9% to about 20-30%, WITHOUT having to reinstall Kubuntu Bionic. My first task would be to shrink my BTRFS <ROOT_FS> volume by about 10-20%. Then, resize that partition to be just above that shrunken volume. Make snapshots and back them up. Then, expand the <ROOT_FS> into the partition to fill it up. After I'd need to do a secure erase of that freed up raw space using hdparm. Unfortunately, the hdparm secure erase command is:

    hdparm --user-master u --security-erase PASSWD /dev/sdb security_password="PASSWD"

    which doesn't allow setting sector starting (or ending) parameters, that I can find.

    From what I've read, over provisioning can speed up an SSD by up to a factor of 4, for an OP of around 30%.
    If I could just double my SSD speed my boot up would be 5 or 6 seconds.

    https://www.thomas-krenn.com/en/wiki/SSD_Secure_Erase

    A method of OP'ing using fdisk is shown here, but using KPartitionManager isn't any different and is a lot easier because it is visual.

    https://www.tech-g.com/2015/06/13/ov...-ssd-in-linux/

    To see if using only the 9% factor OP was sufficient I checked the LBA on my SSD.

    "Total LBAs Written","never","99","99","0","4,409,274,097","old age","-O--CK"
    Putting that "Total LBAs Written" value into the calculator at

    https://www.virten.net/2016/12/ssd-t...en-calculator/

    I get a value of 2.05 TBW (TerraBytesWritten). My SSD has a TBW life of 300 TWB.
    That TBW of 2.05 is for 1,061 hours of total use. Dividing 300 by 2.05 yields 146.
    1,061 hrs * 146 / 24/365 = 17 years. My warranty is good for 10 years, IIRC.

    So, I may not need to increase my OP. Probably won't. (IF it ain't broke don't fix it!)
    Last edited by GreyGeek; Oct 30, 2018, 06:47 PM.
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #17
      @GG, you could test your "beep" theory with a bootable USB stick (which has no grub). If the laptop waits the same amount of time, then beeps and starts booting the stick, which I predict it will, then you are correct that it is the POST and BIOS reading, before anything gets booted.

      Comment


        #18
        Good idea, dibl. I'll test that.

        Meanwhile, I timed my bootup this morning and noted that after pressing the power button 5 seconds elapsed before the beep. From the beep to the login prompt was 25 seconds. The desktop appeared within a couple seconds, like it usually does. Total measured time to the desktop was 30 seconds. However, systemd-analyze reported:

        Startup finished in 5.558s (kernel) + 8.288s (userspace) = 13.846s graphical.target reached after 2.083s in userspace


        Usually, the kernel is around 4 seconds, and my combined total is about 12 seconds. Regardless, I am still half a minute from power on to a working desktop. Before I installed my SSD my working desktop took about 3 minutes to appear.
        "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
        – John F. Kennedy, February 26, 1962.

        Comment


          #19
          Originally posted by dibl View Post
          @GG, you could test your "beep" theory with a bootable USB stick (which has no grub). If the laptop waits the same amount of time, then beeps and starts booting the stick, which I predict it will, then you are correct that it is the POST and BIOS reading, before anything gets booted.
          From the poweron to the "Try or Install" screen took about 40 seconds and no beep. From that screen, using the "Try", to a working desktop took another 40 seconds. Using the systemd-analyze plot command showed the kernel= 18.824s, user space= 1m 3.863s, for a total of 1m 22.786s, and the graphical target was reached 1m 3.837s into user space. 1m 23s is about 83 seconds, which is the time I measured from bootup to a working desktop. Interestingly, the ubuiquity.service took 1m 3s to run and was the service with the longest dark red bar.

          I recall the old desktops, and some of the laptops I've used over the years doing a beep to signal the beginning of the POST, but for the last 10 years I've always used headphones so as to not disturb my wife, so I don't know what the beeps mean because I haven't heard them in ten years. Even when installing Kubuntu on someone's laptop I've never noticed any POST or other beeps except on my laptop. Strange, isn't it? ??
          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
          – John F. Kennedy, February 26, 1962.

          Comment


            #20
            Is your grub installation set to show the grub menu? If not, you know that most grub installations have a default 5-second delay while the menu shows. prior to booting the top listed kernel. So those 5 second of "pause" need to be factored into your calculation of boot time (versus pause time).

            Comment


              #21
              Duh, I had totally forgotten about that "GRUB_DEFAULT=5" setting in /default/grub.

              That explains the first 5 seconds. Five seconds is not important to me so I am not going to change that. Overall, the replacement of my sda spinning HD with a Samsung SSD, and jacking the RAM from 6GB to 16GB has given new life to this nearly 7 year old computer. I'm happy with where it is so I'm not going to putz with the settings any more.
              "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
              – John F. Kennedy, February 26, 1962.

              Comment


                #22
                hay GG ,,dont you still have the systemd system settings tool installed ? ,,,, package "kde-config-systemd"
                you can use it to sort by "services" and then "mask" the services you do not need , and "edit unit file" to see the services config and edit it if you want .

                you do not need any of the "apt" services either .

                VINNY
                i7 4core HT 8MB L3 2.9GHz
                16GB RAM
                Nvidia GTX 860M 4GB RAM 1152 cuda cores

                Comment


                  #23
                  Originally posted by vinnywright View Post
                  hay GG ,,dont you still have the systemd system settings tool installed ? ,,,, package "kde-config-systemd"
                  you can use it to sort by "services" and then "mask" the services you do not need , and "edit unit file" to see the services config and edit it if you want .

                  you do not need any of the "apt" services either .

                  VINNY
                  Ya, I've been using that GUI for several years. It's how I do my work with units and services. Nice tool! I like systemd!
                  "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                  – John F. Kennedy, February 26, 1962.

                  Comment

                  Working...
                  X