14

I have jumped back into using Ubuntu again, but I am having real issues with the overall performance of Ubuntu 19.04. It's very sluggish, it locks up, but the worst is that it can take about 5 mins to boot up.

I have an old Dell Optiplex 7010 with an i3 3000 processor with 8 GB of ram and using Intel HD 3000 onboard graphics. So performance shouldn't be such an issue.

As I mentioned I'm still new to Ubuntu so I'm still learning.

After searching for a fix, I found this command to see what's taking so much time to boot Ubuntu:

systemd-analyze blame

Which gives me this output:

tux@tux-OptiPlex-7010:~$ systemd-analyze blame
    5min 13.441s sav-protect.service
    1min 20.310s apt-daily.service
         57.163s plymouth-quit-wait.service
         30.008s systemd-journal-flush.service
         27.969s dev-mapper-ubuntu\x2d\x2dvg\x2droot.device
         22.765s accounts-daemon.service
         22.205s snapd.service
         21.924s ModemManager.service
         19.630s networkd-dispatcher.service
         18.044s udisks2.service
         17.974s dev-loop30.device
         17.899s dev-loop26.device
         17.824s dev-loop49.device
         17.768s dev-loop34.device
         17.713s dev-loop55.device
         17.480s dev-loop45.device
         17.435s dev-loop29.device
         17.384s dev-loop48.device
         17.350s dev-loop31.device
         17.231s dev-loop2.device
         17.218s dev-loop39.device
         17.185s dev-loop40.device
         17.168s dev-loop44.device
         17.071s dev-loop46.device
         16.724s dev-loop19.device
         15.978s dev-loop51.device
         15.836s dev-loop43.device
         15.791s dev-loop47.device
         15.764s dev-loop41.device
         15.762s dev-loop50.device
         15.707s dev-loop42.device
         15.638s dev-loop37.device
         15.587s dev-loop38.device
         15.524s dev-loop54.device
         15.377s dev-loop35.device
         15.185s dev-loop33.device
         15.090s dev-loop24.device
         15.049s dev-loop7.device
         15.014s dev-loop14.device
         14.889s dev-loop13.device
         14.560s dev-loop53.device
         14.519s dev-loop52.device
         14.087s dev-loop15.device
         14.077s dev-loop32.device
         14.000s dev-loop20.device
         13.948s dev-loop27.device
         13.832s dev-loop3.device
         13.830s dev-loop8.device
         13.824s dev-loop11.device
         13.708s dev-loop6.device
         13.614s dev-loop25.device
         13.574s dev-loop36.device
         13.518s dev-loop16.device
         13.424s dev-loop23.device
         13.375s dev-loop10.device
         13.346s dev-loop28.device
         13.168s dev-loop21.device
         12.864s grub-common.service
         12.737s dev-loop17.device
         12.667s systemd-resolved.service
         12.616s avahi-daemon.service
         12.473s dev-loop18.device
         12.407s sddm.service
         12.358s rsyslog.service
         12.342s apport.service
         12.142s wpa_supplicant.service
         12.134s NetworkManager.service
         12.130s systemd-logind.service
         12.124s dev-loop9.device
         12.122s dev-loop12.device
         12.120s dev-loop22.device
         11.944s gpu-manager.service
         11.733s lm-sensors.service
         11.645s apparmor.service
         11.362s thermald.service
         11.075s [email protected]
         10.956s switcheroo-control.service
         10.822s dev-loop0.device
         10.702s dev-loop4.device
         10.488s dev-loop1.device
         10.442s dev-loop5.device
          9.189s systemd-udevd.service
          9.112s NetworkManager-wait-online.service
          8.930s nginx.service
          8.629s snap.ufw.srv.service
          7.295s ufw.service
          6.514s networking.service
          6.239s fwupd.service
          5.406s gdm.service
          4.896s systemd-sysctl.service
          4.688s snap-gnome\x2d3\x2d26\x2d1604-90.mount
          4.641s [email protected]
          4.472s snap-gtk\x2dcommon\x2dthemes-1313.mount
          4.304s snap-polar\x2dbookshelf-69.mount
          4.181s snap-chromium-821.mount
          4.023s snap-core18-1074.mount
          3.946s snap-webcatalog-10.mount
          3.872s snap-easy\x2dopenvpn-5.mount
          3.697s apt-daily-upgrade.service
          3.691s snap-code-13.mount
          3.680s virtualbox.service
          3.598s snap-gnome\x2dlogs-45.mount
          3.556s snap-ao-20.mount
          3.456s snap-riseup\x2dvpn-152.mount
          3.424s snap-gnome\x2d3\x2d26\x2d1604-70.mount
          3.375s snap-gnome\x2dcalculator-406.mount
          3.348s snap-hexchat-42.mount
          3.317s snap-core-5662.mount
          3.242s snap-odrive\x2dunofficial-2.mount
          3.157s snap-translatium-6.mount
          3.084s uwsgi.service
          3.010s snap-ufw-296.mount
          2.931s polkit.service
          2.925s snap-tinc\x2dvpn-2.mount
          2.825s snap-tusk-29.mount
          2.784s snap-ubuntu\x2dapp\x2dplatform-34.mount
          2.718s snap-gtk\x2dcommon\x2dthemes-701.mount
          2.693s snap-gnome\x2dlogs-61.mount
          2.643s snap-ubuntu\x2dcloud\x2dimage-63.mount
          2.582s snap-zaproxy-4.mount
          2.550s snap-nmap-564.mount
          2.511s snap-opera-47.mount
          2.369s snap-midori-550.mount
          2.278s snap-tor-2.mount
          2.278s lvm2-monitor.service
          2.264s systemd-modules-load.service
          2.194s snap-gnome\x2d3\x2d28\x2d1804-71.mount
          2.168s snap-deja\x2ddup-190.mount
          2.142s systemd-tmpfiles-setup.service
          2.135s snap-usdxworldparty-30.mount
          1.936s snap-xmr\x2dminer\x2dgui-9.mount
          1.753s snap-google\x2dplay\x2dmusic\x2ddesktop\x2dplayer-70.mount
          1.645s snap-webcatalog-4.mount
          1.525s lvm2-pvscan@8:1.service
          1.519s snap-john\x2dthe\x2dripper-297.mount
          1.470s privoxy.service
          1.402s snap-google\x2dwebapp-4.mount
          1.338s snap-chromium\x2dffmpeg-13.mount
          1.320s snap-gnome\x2dcharacters-124.mount
          1.253s snap-communitheme-1768.mount
          1.131s snap-canonical\x2dlivepatch-81.mount
          1.117s systemd-tmpfiles-setup-dev.service
          1.094s keyboard-setup.service
          1.044s plymouth-start.service
           988ms dns-clean.service
           916ms systemd-sysusers.service
           896ms snap-firefox-253.mount
           895ms snap-opera-46.mount
           833ms pppd-dns.service
           829ms snap-i2pd-25.mount
           828ms snap-gnome\x2dcalculator-238.mount
           796ms snap-gnome\x2dsystem\x2dmonitor-100.mount
           796ms snap-gnome\x2dcharacters-296.mount
           785ms tor.service
           772ms snap-google\x2dcloud\x2dsdk-95.mount
           740ms colord.service
           688ms snap-wonderwall-13.mount
           687ms snap-gnome\x2dsystem\x2dmonitor-57.mount
           575ms systemd-timesyncd.service
           557ms plymouth-read-write.service
           522ms snap-googletools\x2ddesktop-1.mount
           520ms snap-vlc-1049.mount
           497ms snap-gtk2\x2dcommon\x2dthemes-5.mount
           448ms grub-initrd-fallback.service
           429ms upower.service
           397ms ifupdown-pre.service
           387ms kerneloops.service
           320ms snapd.seeded.service
           311ms systemd-tmpfiles-clean.service
           311ms systemd-journald.service
           296ms dev-mqueue.mount
           295ms dev-hugepages.mount
           290ms dev-mapper-ubuntu\x2d\x2dvg\x2dswap_1.swap
           274ms systemd-udev-trigger.service
           265ms [email protected]
           265ms snap-qshodan-196.mount
           261ms systemd-backlight@backlight:acpi_video0.service
           219ms bolt.service
           217ms console-setup.service
           207ms setvtrgb.service
           203ms blk-availability.service
           201ms systemd-remount-fs.service
           178ms snap.canonical-livepatch.canonical-livepatchd.service
           173ms systemd-user-sessions.service
           168ms snap.easy-openvpn.easy-openvpn.service
           163ms hddtemp.service
           163ms sys-kernel-debug.mount
           161ms kmod-static-nodes.service
           152ms systemd-random-seed.service
           144ms snap.tor.tor.service
           124ms snap-hello\x2dworld-29.mount
           116ms snap-core-7396.mount
           115ms rtkit-daemon.service
           102ms proc-sys-fs-binfmt_misc.mount
            89ms systemd-update-utmp.service
            84ms systemd-update-utmp-runlevel.service
            59ms snapd.socket
            14ms openvpn.service
             4ms sys-fs-fuse-connections.mount
             3ms sys-kernel-config.mount

As you can see something is not right. I'd appreciate if somebody could help me fix this please.

Ubuntu 19.04 is a relatively fresh install. But I can say I've had performance issues from clean installation. I hope someone can help me rectify this please. I'm looking forward to learning how to do so.

3
  • 2
    You have a ton of snap apps installed. Each one is a performance hit. Remove each snap and replace it with a standard app.
    – heynnema
    Commented Aug 24, 2019 at 17:03
  • Sluggish performance and especially lockups may be a symptom of a failing hard drive - the drive's firmware may be trying to re-read failing sectors multiple times. I suggest checking the hard drive's SMART status.
    – Sergey
    Commented Aug 27, 2019 at 20:51
  • 1
    @starkus Plymouth runs in parallel. If the other boot processes finish faster, it will finish faster too. Please, read: askubuntu.com/a/1168249/968501
    – Raffa
    Commented Aug 30, 2019 at 11:39

2 Answers 2

23

You have Sophos Anti-Virus for Linux installed:

sav-protect.service belongs to Sophos. Please read here. So does sav-rms.service.

sav-protect.service is Sophos Real-Time (On-Access) Scanning service.

sav-rms.service is Sophos Remote Management System service.

The delay is due to boot-time virus scan.While the sluggish overall performance is due to real-time (on-access) Scanning. Please read similar issues here, here and here.

It is worth noting that this is NOT an issue specific to Sophos. This is generally how Anti-Virus software work. They demand system resources to do their job and it gets worse with higher workloads. The more you use your system --> the more system and file access processes are triggered --> the more system resources are used up by both your regular processes and the Anti-Virus that scans them --> the more your system becomes sluggish and non-responding until it reaches a bottleneck and sometimes it halts.


If virus scan at boot-time and on-access is not critical for your system, you can disable the service and gain back speed at boot-time and system responsiveness. To do this, please run the following command in the terminal and reboot your system:

sudo systemctl disable sav-protect.service

If it shows up again after reboot, you can follow the above command with this:

sudo systemctl mask sav-protect.service

If you get alerts at boot-time about real-time protection being disabled, you can follow the above commands with this:

sudo systemctl disable sav-rms.service

If it shows up again after reboot, you can follow the above command with this:

sudo systemctl mask sav-rms.service

To roll back the above changes anytime, please run:

sudo systemctl unmask sav-protect.service

Then follow it with this:

sudo systemctl enable sav-protect.service

Then follow it with this:

sudo systemctl unmask sav-rms.service

Then follow it with this:

sudo systemctl enable sav-rms.service

Notice:

All the above is done without the need to uninstall Sophos Anti-Virus for Linux. It will remain on your system so that you can use other features of the Anti-Virus or you can later roll back the changes done above and go back to the full blown package as you wish.

3
  • 6
    I'm actually not sure Sophos is fully to blame here; all the snap-* and the dev-loop* services add up to some 15 minutes, which after accounting for parallelism might well take 5 minutes to start all of them. It's possible that the Sophos startup service is partly just waiting for all the snaps to start (so it can be sure it scanned them).
    – marcelm
    Commented Aug 24, 2019 at 22:23
  • @macelm snaps and otherwise, will run much faster without an Anti-Virus. So, I recommend disabling Sophos first before messing with the installed packages to replace snaps with debs. Good point though. Thank you
    – Raffa
    Commented Aug 25, 2019 at 5:45
  • 2
    Agreed, Sophos certainly won't make all those snaps faster. For the OP, I think it's worth looking at (and experimenting with) both issues.
    – marcelm
    Commented Aug 25, 2019 at 8:27
1

Around 1 year ago on Debian 9 I had a 50% performance decrease on gcc compilation. Page Table Isolation caused this, it has something todo with Spectra/Meltdown. You could add -no-pti from grub on startup. Note that this was on a Haswell i7 and only when using 32 bits Linux, on 64 bits there are is no such big performance decrease.

Are you using 32 or 64 bits?

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .