Page 1 of 8 123 ... LastLast
Results 1 to 10 of 76

Thread: 6min 36.208s fstrim.service ?!

  1. #1
    Join Date
    Oct 2014
    Location
    Switzerland
    Posts
    851

    Default 6min 36.208s fstrim.service ?!

    Hello,
    I currently have a dualboot LEAP 15.1/W10 laptop and recently I had to re-install W10 without touching OpenSUSE. This is due to the fact that I was cloning from smaller SSD to larger SSD a couple of times for the boot drive, and it was once performed while my RAM module was failing.

    There was an instability with W10, and I had to re-install everything and it's gone smooth.

    Something else I am noticing is that on LEAP 15.1 side, boot is rather slow. My root is on the SSD, and /home is on a platter HDD (cloned once from near-failing HDD to current one). Just now, my LEAP took forever to boot and I decided to investigate what's going on.

    The following came to my attention
    Code:
    
    # systemd-analyze blame
        6min 36.208s fstrim.service
             26.516s backup-rpmdb.service
              7.473s btrfsmaintenance-refresh.service
              6.697s vboxdrv.service
              6.433s logrotate.service
              6.430s mandb.service
              5.941s dracut-initqueue.service
              2.606s mnt-Shared_Data.mount
              1.031s postfix.service
               772ms display-manager.servic
    
    6 minutes for fstrim?! Is this normal?

    For additional information, none of my partitions are btrfs. They are all ext4 or ntfs.
    Code:
    # systemctl list-timers  
    NEXT                          LEFT          LAST                          PASSED             UNIT                         ACTIVATES
    Mon 2020-07-27 19:00:00 CEST  40min left    n/a                           n/a                snapper-timeline.timer       snapper-timeline.service
    Tue 2020-07-28 00:00:00 CEST  5h 40min left Mon 2020-07-27 18:01:09 CEST  18min ago          logrotate.timer              logrotate.service
    Tue 2020-07-28 00:00:00 CEST  5h 40min left Mon 2020-07-27 18:01:09 CEST  18min ago          mandb.timer                  mandb.service
    Tue 2020-07-28 01:11:08 CEST  6h left       Mon 2020-07-27 18:01:16 CEST  18min ago          backup-sysconfig.timer       backup-sysconfig.service
    Tue 2020-07-28 01:40:13 CEST  7h left       Mon 2020-07-27 18:01:09 CEST  18min ago          check-battery.timer          check-battery.service
    Tue 2020-07-28 01:58:38 CEST  7h left       Mon 2020-07-27 18:01:09 CEST  18min ago          backup-rpmdb.timer           backup-rpmdb.service
    Tue 2020-07-28 18:16:29 CEST  23h left      Mon 2020-07-27 18:16:29 CEST  2min 49s ago       systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service
    Sat 2020-08-01 00:00:00 CEST  4 days left   Mon 2020-07-27 18:01:09 CEST  18min ago          btrfs-balance.timer          btrfs-balance.service
    Sat 2020-08-01 00:00:00 CEST  4 days left   Wed 2020-07-01 16:06:47 CEST  3 weeks 5 days ago btrfs-scrub.timer            btrfs-scrub.service
    Mon 2020-08-03 00:00:00 CEST  6 days left   Mon 2020-07-27 18:01:09 CEST  18min ago          fstrim.timer                 fstrim.service
    n/a                           n/a           n/a                           n/a                snapper-cleanup.timer        snapper-cleanup.service
    
    Could someone let me know how I can disable btrfs-scrub and btrfs-balance from the schedule while we're at it? They are both disabled and inactive according to systemd but timer says it's being used... somehow.

    Also, my fstab looks as follows:
    Code:
    # cat /etc/fstab
    UUID=df520a3e-1837-4ebb-8535-c9ca32504fc5  /                 ext4  acl,user_xattr               0  1
    UUID=cb2f0bc6-9c49-42a9-a797-072702eb62c1  /home             ext4  data=ordered,acl,user_xattr  0  2
    UUID=3216-F39E                             /boot/efi         vfat  defaults                     0  0
    UUID=B0B4915CB491263E                      /mnt/Shared_Data  ntfs  defaults                     0  0
    
    Can someone help me completely disable btrfs related maintenance on my LEAP 15.1 installation? I hope that's the only cause of the slow boot.

    Thanks!
    -SJL

  2. #2
    Join Date
    Oct 2014
    Location
    Switzerland
    Posts
    851

    Default Re: 6min 36.208s fstrim.service ?!

    FYI, I did look at https://en.opensuse.org/SDBisable_btrfsmaintenance
    Code:
    /etc/sysconfig/btrfsmaintenance
    BTRFS_BALANCE_PERIOD="none"
    BTRFS_SCRUB_PERIOD="none"
    worked perfectly but I am wondering if I can do this from systemctl.

    Obviously the BTRFS balance and scrub has ran on my ext4 several times already. What kind of effect would it have?

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    28,734

    Default Re: 6min 36.208s fstrim.service ?!

    Quote Originally Posted by SJLPHI View Post
    worked perfectly but I am wondering if I can do this from systemctl.
    Well, looking at YaST > System > Services Manager, I see btrfs-balance, btrfs-scrub and btrfs-trim (all set to "manual", which imho means "off", in my case)
    I assume that apart from uing YaST you can use systemctl on those when you prefer that.
    Quote Originally Posted by SJLPHI View Post
    Obviously the BTRFS balance and scrub has ran on my ext4 several times already. What kind of effect would it have?
    I have no idea. I vaguely remember taht it was "on" after installation on my system, ut I haven't any Btrfs. Now even if this is switched on ny default (in case someone starts using a Btrfs file system, but forgetting to switch them on), it should bail out immediatly when started in a system without any Btrfs. Just my idea.
    Henk van Velden

  4. #4
    Join Date
    Oct 2014
    Location
    Switzerland
    Posts
    851

    Default Re: 6min 36.208s fstrim.service ?!

    Quote Originally Posted by hcvv View Post
    Well, looking at YaST > System > Services Manager, I see btrfs-balance, btrfs-scrub and btrfs-trim (all set to "manual", which imho means "off", in my case)
    I assume that apart from uing YaST you can use systemctl on those when you prefer that.

    I have no idea. I vaguely remember taht it was "on" after installation on my system, ut I haven't any Btrfs. Now even if this is switched on ny default (in case someone starts using a Btrfs file system, but forgetting to switch them on), it should bail out immediatly when started in a system without any Btrfs. Just my idea.


    I used the configuration file /etc/sysconfig/btrfsmaintenance to set scrub and balance to none, then disabled
    btrfsmaintenance-refresh from systemctl and everything seems alright now.
    Code:
    systemctl disable btrfsmaintenance-refresh
    

    Now there is no ~6 mins delay in boot anymore. Everything is more-or-less the way they should be. I am still shocked at the >6mins fstrim on boot. Apparently the BTRFS balance was running along with fstrim. I wonder what was happening... This was on EXT4 partition.


  5. #5
    Join Date
    Oct 2014
    Location
    Switzerland
    Posts
    851

    Default Re: 6min 36.208s fstrim.service ?!

    The reason I favour using systemd rather than YAST in most cases is because I've been collecting a pile of "To run" on fresh-install script to fully customise the installation to my preferences. I'm glad that such features are available on Yast.

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    31,295
    Blog Entries
    15

    Default Re: 6min 36.208s fstrim.service ?!

    Quote Originally Posted by SJLPHI View Post


    I used the configuration file /etc/sysconfig/btrfsmaintenance to set scrub and balance to none, then disabled
    btrfsmaintenance-refresh from systemctl and everything seems alright now.
    Code:
    systemctl disable btrfsmaintenance-refresh
    

    Now there is no ~6 mins delay in boot anymore. Everything is more-or-less the way they should be. I am still shocked at the >6mins fstrim on boot. Apparently the BTRFS balance was running along with fstrim. I wonder what was happening... This was on EXT4 partition.

    Hi
    To ensure it is really disabled, it pays to mask (send to dev null) as well.....

    Code:
    systemctl mask btrfsmaintenance-refresh
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  7. #7
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    28,734

    Default Re: 6min 36.208s fstrim.service ?!

    Quote Originally Posted by SJLPHI View Post
    The reason I favour using systemd rather than YAST in most cases is because I've been collecting a pile of "To run" on fresh-install script to fully customise the installation to my preferences. I'm glad that such features are available on Yast.
    What I tried to show is that you can get from YaST the information you asked for. After that you can of course use what you prefer.
    Henk van Velden

  8. #8
    Join Date
    Oct 2014
    Location
    Switzerland
    Posts
    851

    Default Re: 6min 36.208s fstrim.service ?!

    Quote Originally Posted by malcolmlewis View Post
    Hi
    To ensure it is really disabled, it pays to mask (send to dev null) as well.....

    Code:
    systemctl mask btrfsmaintenance-refresh
    That's something new to me. Great! Thanks.

  9. #9
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    28,734

    Default Re: 6min 36.208s fstrim.service ?!

    Quote Originally Posted by malcolmlewis View Post
    Hi
    To ensure it is really disabled, it pays to mask (send to dev null) as well.....

    Code:
    systemctl mask btrfsmaintenance-refresh
    Yes, of course. But IMHO the questions are:
    • why is it running at all on a system without any btrfs file system in use?
    • why does it take 6 mins. to do nthing useful.


    To me it looks if there might be bugzilla cases here, but I am not sure. Maybe someone has a plausible explanation.
    Henk van Velden

  10. #10
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    28,734

    Default Re: 6min 36.208s fstrim.service ?!

    Quote Originally Posted by SJLPHI View Post
    That's something new to me. Great! Thanks.
    Sorry, my post above assumed that that was included in your systemctl knowledge.

    It makes @malcolmlewis post the more valuable.
    Henk van Velden

Page 1 of 8 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •