Announcement

Collapse
No announcement yet.

Any steps needed to setup TRIM for SSD

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

    #16
    Originally posted by SpecialEd View Post
    It seems Kubuntu 18.04 also automatically added fstrim.service to my system.
    Code:
    specialed@specialed-Aspire-VN7-791:~$ dpkg -L util-linux|grep fstrim
    /lib/systemd/system/fstrim.service
    /lib/systemd/system/fstrim.timer
    /sbin/fstrim
    /usr/share/bash-completion/completions/fstrim
    /usr/share/man/man8/fstrim.8.gz
    This runs every time I boot the machine. The problem is it adds 15 seconds to my boot time.

    Code:
    specialed@specialed-Aspire-VN7-791:~$ systemd-analyze blame         
            15.071s fstrim.service
             7.953s NetworkManager-wait-online.service
             1.783s apt-daily-upgrade.service
             1.324s networkd-dispatcher.service
             1.192s gpu-manager.service
             1.154s snapd.service
              748ms mpd.service
              660ms NetworkManager.service
              647ms apt-daily.service
              612ms motd-news.service
              538ms colord.service
              520ms dev-sdb1.device
              470ms systemd-user-sessions.service
              403ms virtualbox.service
              263ms udisks2.service
              217ms systemd-logind.service
              200ms ModemManager.service
              183ms systemd-resolved.service
              180ms grub-common.service
              172ms systemd-timesyncd.service
              148ms systemd-udevd.service
              147ms apparmor.service
              129ms systemd-journal-flush.service
              128ms systemd-rfkill.service
              127ms upower.service
              123ms wpa_supplicant.service
              110ms accounts-daemon.service
               93ms alsa-restore.service
               77ms keyboard-setup.service
               76ms apport.service
               70ms systemd-udev-trigger.service
               68ms plymouth-quit.service
               65ms rsyslog.service
               56ms polkit.service
               55ms thermald.service
               53ms swapfile.swap
               45ms systemd-journald.service
    I'd prefer to remove the service on boot and change it to a cron job or even do it manually. Also the 7.953s NetworkManager-wait-online.service adds almost 8 seconds to my boot times too. Can I remove that? If so how?
    How much time it adds depends on how much it has to trim. This morning my fstrim, which is set to run weekly and 30 min after bootup, took 43 seconds. Apt-daily-upgrade.timer is another one that causes delays during bootup.

    You can delay fstrim from running during the bootup by putting
    RandomizedDelaySec=30min
    into the timer section of
    /etc/systemd/system/timers.target.wants/fstrim.timer

    You can do the same thing with
    /etc/systemd/system/timers.target.wants/apt-daily-upgrade.timer

    and putting
    RandomizedDelaySec=1h
    into
    /etc/systemd/system/timers.target.wants/apt-daily.timer
    Last edited by GreyGeek; Nov 12, 2018, 12:56 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
      Thanks GG, I'll give it a try.
      If you think Education is expensive, try ignorance.

      The difference between genius and stupidity is genius has limits.

      Comment

      Working...
      X