You are not logged in.

#1 2020-07-31 02:41:27

csts
Member
Registered: 2020-04-05
Posts: 12

System is slow after Kernel update on slow laptop

This happens on first boot after a Kernel update, probably because I'm using a potato laptop.
The only solution I found is after the first boot I simply log out, then everything is normal.
My Openbox autostart and inxi -F follows.

Openbox autostart:

/usr/bin/corectrl &
/usr/bin/imwheel --kill &
/usr/bin/thunar --daemon &
nitrogen --restore &
/usr/bin/gnome-keyring-daemon --start --components=secrets &
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
/usr/bin/nm-applet &
/usr/bin/xfce4-clipman &
/usr/bin/tint2 &
/usr/bin/searx-run &
/usr/bin/play-with-mpv &
/usr/bin/tilda &
/opt/MYKI/myki &

inxi -F:

~ ❯❯❯ inxi -F
System:    Host: kw Kernel: 5.7.11-arch1-1 x86_64 bits: 64 Desktop: Openbox 3.6.1 
           Distro: Arch Linux 
Machine:   Type: Laptop System: Hewlett-Packard product: HP 15 Notebook PC 
           v: 0975100000405F00001620180 serial: <superuser/root required> 
           Mobo: Hewlett-Packard model: 21F7 v: 52.0A serial: <superuser/root required> 
           UEFI: Insyde v: F.00 date: 10/31/2013 
Battery:   ID-1: BAT1 charge: 33.9 Wh condition: 33.9/33.9 Wh (100%) 
CPU:       Topology: Dual Core model: AMD E1-2100 APU with Radeon HD Graphics bits: 64 
           type: MCP L2 cache: 1024 KiB 
           Speed: 799 MHz min/max: 800/1000 MHz Core speeds (MHz): 1: 799 2: 798 
Graphics:  Device-1: AMD Kabini [Radeon HD 8210] driver: radeon v: kernel 
           Device-2: Suyin HP Truevision HD type: USB driver: uvcvideo 
           Display: x11 server: X.Org 1.20.8 driver: ati,radeon unloaded: modesetting 
           resolution: 1366x768~60Hz 
           OpenGL: renderer: AMD KABINI (DRM 2.50.0 5.7.11-arch1-1 LLVM 10.0.0) 
           v: 4.5 Mesa 20.1.4 
Audio:     Device-1: AMD Kabini HDMI/DP Audio driver: snd_hda_intel 
           Device-2: AMD FCH Azalia driver: snd_hda_intel 
           Sound Server: ALSA v: k5.7.11-arch1-1 
Network:   Device-1: Qualcomm Atheros AR9485 Wireless Network Adapter driver: ath9k 
           IF: wlo1 state: up mac: 40:f0:2f:6c:c8:34 
           Device-2: Realtek RTL810xE PCI Express Fast Ethernet driver: r8169 
           IF: enp4s0 state: up speed: 100 Mbps duplex: full mac: a0:1d:48:08:ae:e1 
Drives:    Local Storage: total: 465.76 GiB used: 145.37 GiB (31.2%) 
           ID-1: /dev/sda vendor: Western Digital model: WD5000LPVX-60V0TT0 
           size: 465.76 GiB 
Partition: ID-1: / size: 456.46 GiB used: 145.30 GiB (31.8%) fs: ext4 dev: /dev/sda2 
           ID-2: /boot size: 510.0 MiB used: 70.8 MiB (13.9%) fs: vfat dev: /dev/sda1 
Swap:      ID-1: swap-1 type: partition size: 512.0 MiB used: 0 KiB (0.0%) dev: /dev/sda3 
Sensors:   System Temperatures: cpu: 57.8 C mobo: 20.0 C gpu: radeon temp: 57 C 
           Fan Speeds (RPM): N/A 
Info:      Processes: 176 Uptime: 1h 59m Memory: 7.24 GiB used: 2.23 GiB (30.8%) 
           Shell: fish inxi: 3.1.04 

Thanks for any suggestions.

Offline

#2 2020-07-31 08:38:40

pk.gmp
Member
Registered: 2020-06-15
Posts: 44

Re: System is slow after Kernel update on slow laptop

@csts, could you please paste output of this command?

"systemd-analyze && systemd-analyze critical-chain && systemd-analyze blame"

It should print something like:
Startup finished in ______ s (Kernel) + ______________ s (userspace) = _____________s

Then a hierarchy of the slowest service .dependencies..
A  ( + ______ ms)
+-> B   (+ ______________ ms)
     + -> C   (+ ________ ms)

Followed by each systemd service active and its startup time.




After this, please share output of lsmod

And then the kernel boot parameter line from your boot loader.


This should be a good starting point.

Offline

#3 2020-07-31 09:04:08

csts
Member
Registered: 2020-04-05
Posts: 12

Re: System is slow after Kernel update on slow laptop

systemd-analyze && systemd-analyze critical-chain && systemd-analyze blame

~ ❯❯❯ systemd-analyze && systemd-analyze critical-chain && systemd-analyze blame
Startup finished in 5.748s (kernel) + 26.431s (userspace) = 32.179s 
graphical.target reached after 24.840s in userspace
The time when unit became active or started is printed after the "@" character.
The time the unit took to start is printed after the "+" character.

graphical.target @24.840s
└─lightdm.service @24.249s +589ms
  └─systemd-user-sessions.service @24.166s +78ms
    └─network.target @24.160s
      └─NetworkManager.service @22.180s +1.979s
        └─dbus.service @22.169s
          └─basic.target @22.127s
            └─sockets.target @22.127s
              └─snapd.socket @22.123s +3ms
                └─sysinit.target @22.111s
                  └─systemd-update-utmp.service @21.997s +113ms
                    └─systemd-tmpfiles-setup.service @21.402s +589ms
                      └─systemd-journal-flush.service @7.633s +13.764s
                        └─systemd-journald.service @5.334s +2.294s
                          └─systemd-journald.socket @5.182s
                            └─system.slice @4.833s
                              └─-.slice @4.833s
13.764s systemd-journal-flush.service                                            
10.920s lvm2-monitor.service                                                     
10.585s dev-sda2.device                                                          
 6.993s polkit.service                                                           
 4.993s systemd-udevd.service                                                    
 4.445s upower.service                                                           
 2.442s systemd-logind.service                                                   
 2.294s systemd-journald.service                                                 
 2.264s systemd-fsck@dev-disk-by\x2duuid-FCE4\x2dE807.service                    
 1.979s NetworkManager.service                                                   
 1.319s wpa_supplicant.service                                                   
  978ms var-lib-snapd-snap-core18-1880.mount                                     
  853ms var-lib-snapd-snap-qt513-19.mount                                        
  837ms dev-loop8.device                                                         
  691ms dhcpcd.service                                                           
  689ms var-lib-snapd-snap-snapd-8542.mount                                      
  661ms var-lib-snapd-snap-gifex-3.mount                                         
  660ms var-lib-snapd-snap-core18-1754.mount                                     
  641ms udisks2.service                                                          
  634ms user@1000.service                                                        
  627ms dev-loop5.device                                                         
  609ms modprobe@drm.service                                                     
  589ms lightdm.service                                                          
  589ms systemd-tmpfiles-setup.service                                           
  587ms var-lib-snapd-snap-gtk\x2dcommon\x2dthemes-1506.mount                    
  553ms systemd-udev-trigger.service                                             
  536ms systemd-tmpfiles-setup-dev.service                                       
  500ms dev-disk-by\x2duuid-f70f8f30\x2d92b6\x2d4f55\x2d8d39\x2d53a0f13c6506.swap
  488ms boot.mount                                                               
  483ms var-lib-snapd-snap-plumber-23.mount                                      
  442ms var-lib-snapd-snap-qt513-18.mount                                        
  430ms var-lib-snapd-snap-plumber-27.mount                                      
  380ms var-lib-snapd-snap-snapd-8140.mount                                      
  357ms systemd-sysctl.service                                                   
  338ms systemd-random-seed.service                                              
  261ms dev-loop0.device                                                         
  258ms dev-loop4.device                                                         
  257ms dev-loop9.device                                                         
  247ms systemd-binfmt.service                                                   
  214ms systemd-tmpfiles-clean.service                                           
  212ms systemd-rfkill.service                                                   
  211ms dev-hugepages.mount                                                      
  210ms kmod-static-nodes.service                                                
  208ms dev-mqueue.mount                                                         
  203ms sys-kernel-debug.mount                                                   
  199ms sys-kernel-tracing.mount                                                 
  191ms cpupower.service                                                         
  181ms dev-loop2.device                                                         
  150ms systemd-backlight@backlight:acpi_video0.service                          
  126ms dev-loop6.device                                                         
  113ms systemd-update-utmp.service                                              
  107ms user-runtime-dir@1000.service                                            
  102ms systemd-remount-fs.service                                               
   88ms sys-fs-fuse-connections.mount                                            
   87ms rtkit-daemon.service                                                     
   78ms systemd-user-sessions.service                                            
   68ms sys-kernel-config.mount                                                  
   57ms dev-loop1.device                                                         
   44ms dev-loop7.device                                                         
   31ms systemd-backlight@backlight:radeon_bl0.service                           
   16ms tmp.mount                                                                
    8ms proc-sys-fs-binfmt_misc.mount                                            
    3ms snapd.socket    

   
   
lsmod

  
    ~ ❯❯❯ lsmod
Module                  Size  Used by
ccm                    20480  3
fuse                  139264  5
8021q                  40960  0
garp                   16384  1 8021q
mrp                    20480  1 8021q
stp                    16384  1 garp
llc                    16384  2 stp,garp
nls_iso8859_1          16384  1
nls_cp437              20480  1
amdgpu               5742592  0
vfat                   24576  1
fat                    86016  1 vfat
gpu_sched              40960  1 amdgpu
squashfs               69632  10
loop                   40960  20
amd_freq_sensitivity    16384  0
cpufreq_ondemand       16384  1 amd_freq_sensitivity
edac_mce_amd           32768  0
kvm_amd               114688  0
ccp                   118784  1 kvm_amd
rng_core               16384  1 ccp
ath9k                 184320  0
kvm                   835584  1 kvm_amd
ath9k_common           40960  1 ath9k
ath9k_hw              520192  2 ath9k_common,ath9k
joydev                 28672  0
ath                    36864  3 ath9k_common,ath9k,ath9k_hw
uvcvideo              114688  0
radeon               1654784  13
mac80211             1040384  2 ath9k,ath9k_hw
irqbypass              16384  1 kvm
videobuf2_vmalloc      20480  1 uvcvideo
crct10dif_pclmul       16384  1
videobuf2_memops       20480  1 videobuf2_vmalloc
videobuf2_v4l2         28672  1 uvcvideo
crc32_pclmul           16384  0
hp_wmi                 20480  0
videobuf2_common       57344  2 videobuf2_v4l2,uvcvideo
ghash_clmulni_intel    16384  0
sparse_keymap          16384  1 hp_wmi
wmi_bmof               16384  0
videodev              274432  3 videobuf2_v4l2,uvcvideo,videobuf2_common
aesni_intel           368640  2
mousedev               24576  0
mc                     61440  4 videodev,videobuf2_v4l2,uvcvideo,videobuf2_common
snd_hda_codec_realtek   135168  1
snd_hda_codec_generic    98304  1 snd_hda_codec_realtek
ledtrig_audio          16384  2 snd_hda_codec_generic,snd_hda_codec_realtek
crypto_simd            16384  1 aesni_intel
snd_hda_codec_hdmi     73728  1
cryptd                 24576  2 crypto_simd,ghash_clmulni_intel
i2c_algo_bit           16384  2 amdgpu,radeon
snd_hda_intel          53248  4
glue_helper            16384  1 aesni_intel
psmouse               184320  0
snd_intel_dspcfg       28672  1 snd_hda_intel
ttm                   118784  2 amdgpu,radeon
cfg80211              897024  4 ath9k_common,ath9k,ath,mac80211
snd_hda_codec         167936  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
r8169                  98304  0
pcspkr                 16384  0
input_leds             16384  0
fam15h_power           16384  0
k10temp                16384  0
wdat_wdt               20480  0
drm_kms_helper        253952  2 amdgpu,radeon
realtek                24576  1
snd_hda_core          106496  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
libphy                147456  2 r8169,realtek
snd_hwdep              16384  1 snd_hda_codec
snd_pcm               147456  4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
rfkill                 28672  4 hp_wmi,cfg80211
wmi                    36864  2 hp_wmi,wmi_bmof
cec                    69632  1 drm_kms_helper
evdev                  28672  15
mac_hid                16384  0
libarc4                16384  1 mac80211
snd_timer              45056  1 snd_pcm
rc_core                61440  1 cec
syscopyarea            16384  1 drm_kms_helper
sysfillrect            16384  1 drm_kms_helper
sysimgblt              16384  1 drm_kms_helper
snd                   114688  16 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm
battery                20480  0
fb_sys_fops            16384  1 drm_kms_helper
ac                     16384  0
sp5100_tco             20480  0
soundcore              16384  1 snd
i2c_piix4              28672  0
hp_wireless            16384  0
acpi_cpufreq           28672  0
drm                   581632  11 gpu_sched,drm_kms_helper,amdgpu,radeon,ttm
agpgart                53248  2 ttm,drm
ip_tables              36864  0
x_tables               53248  1 ip_tables
ext4                  798720  1
crc32c_generic         16384  0
crc16                  16384  1 ext4
mbcache                16384  1 ext4
jbd2                  139264  1 ext4
hid_generic            16384  0
usbhid                 65536  0
hid                   143360  2 usbhid,hid_generic
serio_raw              20480  0
rtsx_pci_sdmmc         32768  0
atkbd                  36864  0
libps2                 20480  2 atkbd,psmouse
sdhci_pci              61440  0
cqhci                  32768  1 sdhci_pci
sdhci                  77824  1 sdhci_pci
xhci_pci               20480  0
sr_mod                 28672  0
crc32c_intel           24576  2
cdrom                  77824  1 sr_mod
xhci_hcd              286720  1 xhci_pci
mmc_core              188416  4 rtsx_pci_sdmmc,sdhci,cqhci,sdhci_pci
ohci_pci               20480  0
rtsx_pci               98304  1 rtsx_pci_sdmmc
ohci_hcd               61440  1 ohci_pci
ehci_pci               20480  0
ehci_hcd               98304  1 ehci_pci
i8042                  32768  0
serio                  28672  6 serio_raw,atkbd,psmouse,i8042


/etc/default/grub excerpt:

GRUB_CMDLINE_LINUX_DEFAULT="mitigations=off acpi_backlight=video nowatchdog quiet splash "

Offline

#4 2020-07-31 09:06:00

csts
Member
Registered: 2020-04-05
Posts: 12

Re: System is slow after Kernel update on slow laptop

System is slow only after logging in, and only on the first boot after kernel updating.

Offline

#5 2020-07-31 09:54:51

ondoho
Member
Registered: 2013-04-30
Posts: 638
Website

Re: System is slow after Kernel update on slow laptop

^ ???

Are you saying you only experience problems after a kernel update?
And how slow - 25s isn't too bad on a dual core with fully encrypted spinning rust?

Frankly, I'm still not sure what the problem is.

Are you saying the slowness occurs only after you login with lightdm?

And how slow? It's such a relative term...

This speaks a clear language:

13.764s systemd-journal-flush.service
10.920s lvm2-monitor.service
10.585s dev-sda2.device

Your hard drive is slow, and consequently i/o intensive services are slow.

You might also want to remove "quiet splash" form your kernel command and see in real time where the holdup is.


However studied and stilted your rant, it can never hide the base and primitve emotion that inspired it.

Offline

#6 2020-07-31 13:17:03

csts
Member
Registered: 2020-04-05
Posts: 12

Re: System is slow after Kernel update on slow laptop

ondoho wrote:

^ ???

Are you saying you only experience problems after a kernel update?
And how slow - 25s isn't too bad on a dual core with fully encrypted spinning rust?

Frankly, I'm still not sure what the problem is.

Are you saying the slowness occurs only after you login with lightdm?

And how slow? It's such a relative term...

This speaks a clear language:

13.764s systemd-journal-flush.service
10.920s lvm2-monitor.service
10.585s dev-sda2.device

Your hard drive is slow, and consequently i/o intensive services are slow.

You might also want to remove "quiet splash" form your kernel command and see in real time where the holdup is.

After a Kernel update, after I log in, apps take twice the time to open until I log out or restart.
It is a very slow 2 x 1 GHz CPU laptop with HDD, not SSD.
I prefer quiet splash, boot time was longer but setting journal max to 50M fixed that.
https://wiki.archlinux.org/index.php/Sy … size_limit

Offline

#7 2020-07-31 15:31:39

pk.gmp
Member
Registered: 2020-06-15
Posts: 44

Re: System is slow after Kernel update on slow laptop

@csts

Thanks for data. It is clear that HDD is slowing boot (systemd-journal-flush.service and dev-sda2.device took longer to boot).


                  └─systemd-update-utmp.service @21.997s +113ms
                    └─systemd-tmpfiles-setup.service @21.402s +589ms
                      └─systemd-journal-flush.service @7.633s +13.764s
                        └─systemd-journald.service @5.334s +2.294s
                          └─systemd-journald.socket @5.182s

Observations:
1. You seem to have a few "snapd" related installations. Not sure what those are. They seem to be adding up into your boot time (please look at those mounts in your systemd-analyze blame). Consider removing this from boot time.
2. There are bunch of loopback devices. Do you need these many?
3. If you are on openbox and lightdm, I assume you are primarily on GTK, then consider removing qt5 things from your boot up. These also are adding delays into boot time.
4. Consider reducing the number of active kernel modules. Consider blacklisting modules you know you don't use. This will need bunch of trial and errors (and a few attemps when system may not boot). Good chance, you will learn those dependencies. This might be a controversial advise from my end and fellow members might suggest otherwise.
5. I am not sure whether you chose to perform kernel tracing.. there is hint of a systemd service about it. It might slow down the kernel.
6. Consider removing "splash" from kernel boot line. If you are already asking for quiet boot due to slowness, there is no benefit of splash (except for potential eye candy).
7. Consider optimizing your journald logging. You might have done that already but there may be more room.
8. Consider turning off bunch of systemd- related services which you know you don't really need. Everyone has different tastes. I kept them to the minimum on my laptop.

What is output of your cat /etc/fstab?   If you have some encryption or passwords, please mask it before posting. The number of mounts in your report is prompting this question.

On the face of it, it didn't appear that your kernel upgrade did anything so far. If things are slow, they might have always been slow (on account of the slow HDD).

Offline

#8 2020-07-31 15:32:28

csts
Member
Registered: 2020-04-05
Posts: 12

Re: System is slow after Kernel update on slow laptop

I did a "sudo mkinitcpio -p linux" to verify this.
It's not the kernel update, it's the initial ramdisk regeneration that causes this.

Offline

#9 2020-08-01 11:24:33

ondoho
Member
Registered: 2013-04-30
Posts: 638
Website

Re: System is slow after Kernel update on slow laptop

csts wrote:

After a Kernel update, after I log in, apps take twice the time to open until I log out or restart.

I have experienced the same.
It's obviously more pronounced on slow CPU/HDD.
Something to do with buffers.
I don't think you can "fix" this - all you can do is generally try to reduce & speed up things during boot.

Last edited by ondoho (2020-08-01 12:58:25)


However studied and stilted your rant, it can never hide the base and primitve emotion that inspired it.

Offline

#10 2020-08-01 12:02:26

csts
Member
Registered: 2020-04-05
Posts: 12

Re: System is slow after Kernel update on slow laptop

pk.gmp wrote:

@csts

Thanks for data. It is clear that HDD is slowing boot (systemd-journal-flush.service and dev-sda2.device took longer to boot).


                  └─systemd-update-utmp.service @21.997s +113ms
                    └─systemd-tmpfiles-setup.service @21.402s +589ms
                      └─systemd-journal-flush.service @7.633s +13.764s
                        └─systemd-journald.service @5.334s +2.294s
                          └─systemd-journald.socket @5.182s

Observations:
1. You seem to have a few "snapd" related installations. Not sure what those are. They seem to be adding up into your boot time (please look at those mounts in your systemd-analyze blame). Consider removing this from boot time.
2. There are bunch of loopback devices. Do you need these many?
3. If you are on openbox and lightdm, I assume you are primarily on GTK, then consider removing qt5 things from your boot up. These also are adding delays into boot time.
4. Consider reducing the number of active kernel modules. Consider blacklisting modules you know you don't use. This will need bunch of trial and errors (and a few attemps when system may not boot). Good chance, you will learn those dependencies. This might be a controversial advise from my end and fellow members might suggest otherwise.
5. I am not sure whether you chose to perform kernel tracing.. there is hint of a systemd service about it. It might slow down the kernel.
6. Consider removing "splash" from kernel boot line. If you are already asking for quiet boot due to slowness, there is no benefit of splash (except for potential eye candy).
7. Consider optimizing your journald logging. You might have done that already but there may be more room.
8. Consider turning off bunch of systemd- related services which you know you don't really need. Everyone has different tastes. I kept them to the minimum on my laptop.

What is output of your cat /etc/fstab?   If you have some encryption or passwords, please mask it before posting. The number of mounts in your report is prompting this question.

On the face of it, it didn't appear that your kernel upgrade did anything so far. If things are slow, they might have always been slow (on account of the slow HDD).

1. I only used 2 snaps gifex and plumber -but they had dependencies. I removed everything and uninstalled snapd too -giffine is a good gifex replacement from AUR, and I can always download a video and use eg flowblade to edit it instead of using plumber.
2. They're probably there to handle my browsers' profiles running from RAM instead of HDD to speed up browsing.
3. I have optimized everything like you mentioned before this, only the qt5 apps that I have to use are installed, many gtk2 apps from AUR replace the gtk3 ones too -if they work faster, for example gnome-system-monitor is faster for me than gnome-system-monitor-gtk2.
4. Thanks for reminding me. I used modinfo to all but I blacklisted only amdgpu, the rest were drivers and needed stuff. My old GPU doesn't really support Vulkan so I use Radeon drivers which are faster.
5. From a search I did on this forum, they're sleeping services, only needed when an actual tracing is performed. I'll let them exist just in case.
6. Done.
7. It's at what Arch Wiki recommends, 50M.
8. Will do.

~ ❯❯❯ cat /etc/fstab 
# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda2
UUID=6d962c1e-1f29-4b1e-ad85-34362d7e5979	/         	ext4      	rw,relatime,noatime,commit=60	0 1

# /dev/sda1
UUID=FCE4-E807      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro	0 2

# /dev/sda3
UUID=f70f8f30-92b6-4f55-8d39-53a0f13c6506	none      	swap      	defaults  	0 0

Last edited by csts (2020-08-01 12:33:58)

Offline

#11 2020-08-01 12:24:49

csts
Member
Registered: 2020-04-05
Posts: 12

Re: System is slow after Kernel update on slow laptop

@pk.gmp these are the latest times:

~ ❯❯❯ systemd-analyze && systemd-analyze critical-chain && systemd-analyze blame
Startup finished in 5.812s (kernel) + 20.638s (userspace) = 26.451s 
graphical.target reached after 19.236s in userspace
The time when unit became active or started is printed after the "@" character.
The time the unit took to start is printed after the "+" character.

graphical.target @19.236s
└─lightdm.service @18.540s +694ms
  └─systemd-user-sessions.service @18.442s +92ms
    └─network.target @18.437s
      └─NetworkManager.service @16.611s +1.824s
        └─dbus.service @16.601s
          └─basic.target @16.574s
            └─sockets.target @16.574s
              └─org.cups.cupsd.socket @16.574s
                └─sysinit.target @16.540s
                  └─systemd-update-done.service @16.476s +62ms
                    └─ldconfig.service @14.053s +2.418s
                      └─local-fs.target @14.049s
                        └─boot.mount @13.754s +294ms
                          └─systemd-fsck@dev-disk-by\x2duuid-FCE4\x2dE807.service @12.597s +>
                            └─local-fs-pre.target @12.594s
                              └─lvm2-monitor.service @4.985s +7.607s
                                └─lvm2-lvmetad.service @8.849s
                                  └─systemd-udevd.service @6.401s +2.443s
                                    └─systemd-tmpfiles-setup-dev.service @6.045s +351ms
                                      └─systemd-sysusers.service @5.340s +701ms
                                        └─systemd-remount-fs.service @5.145s +105ms
                                          └─systemd-journald.socket @4.950s
                                            └─system.slice @4.755s
                                              └─-.slice @4.755s
7.607s lvm2-monitor.service                                                     
7.527s polkit.service                                                           
7.267s dev-sda2.device                                                          
4.150s upower.service                                                           
2.443s systemd-udevd.service                                                    
2.418s ldconfig.service                                                         
2.268s systemd-journald.service                                                 
2.261s systemd-logind.service                                                   
1.824s NetworkManager.service                                                   
1.130s systemd-fsck@dev-disk-by\x2duuid-FCE4\x2dE807.service                    
1.120s wpa_supplicant.service                                                   
 725ms systemd-tmpfiles-setup.service                                           
 721ms modprobe@drm.service                                                     
 701ms systemd-sysusers.service                                                 
 694ms lightdm.service                                                          
 612ms dhcpcd.service                                                           
 573ms systemd-journal-flush.service                                            
 569ms systemd-udev-trigger.service                                             
 550ms user@1000.service                                                        
 471ms systemd-random-seed.service                                              
 381ms dev-disk-by\x2duuid-f70f8f30\x2d92b6\x2d4f55\x2d8d39\x2d53a0f13c6506.swap
 365ms systemd-journal-catalog-update.service                                   
 360ms systemd-binfmt.service                                                   
 351ms systemd-tmpfiles-setup-dev.service                                       
 334ms cpupower.service                                                         
 311ms systemd-rfkill.service                                                   
 294ms boot.mount                                                               
 269ms kmod-static-nodes.service                                                
 259ms systemd-sysctl.service                                                   
 236ms dev-hugepages.mount                                                      
 233ms dev-mqueue.mount                                                         
 229ms sys-kernel-tracing.mount                                                 
 229ms sys-kernel-debug.mount                                                   
 143ms systemd-update-utmp.service                                              
 126ms systemd-backlight@backlight:acpi_video0.service                          
 123ms rtkit-daemon.service                                                     
 122ms proc-sys-fs-binfmt_misc.mount                                            
 105ms systemd-remount-fs.service                                               
  92ms systemd-user-sessions.service                                            
  62ms systemd-update-done.service                                              
  56ms sys-kernel-config.mount                                                  
  47ms user-runtime-dir@1000.service                                            
  41ms systemd-backlight@backlight:radeon_bl0.service                           
  15ms tmp.mount    

Offline

#12 2020-08-01 12:45:00

csts
Member
Registered: 2020-04-05
Posts: 12

Re: System is slow after Kernel update on slow laptop

The above was after an initramfs regeneration took place.
This is after restarting:

~ ❯❯❯ systemd-analyze && systemd-analyze critical-chain && systemd-analyze blame
Startup finished in 5.778s (kernel) + 17.838s (userspace) = 23.616s 
graphical.target reached after 16.458s in userspace
The time when unit became active or started is printed after the "@" character.
The time the unit took to start is printed after the "+" character.

graphical.target @16.458s
└─lightdm.service @15.720s +737ms
  └─systemd-user-sessions.service @15.651s +63ms
    └─network.target @15.647s
      └─NetworkManager.service @13.680s +1.966s
        └─dbus.service @13.668s
          └─basic.target @13.629s
            └─sockets.target @13.629s
              └─org.cups.cupsd.socket @13.629s
                └─sysinit.target @13.619s
                  └─systemd-backlight@backlight:acpi_video0.service @14.272s +215ms
                    └─system-systemd\x2dbacklight.slice @14.257s
                      └─system.slice @4.667s
                        └─-.slice @4.667s
6.940s polkit.service                                                           
6.591s lvm2-monitor.service                                                     
6.334s dev-sda2.device                                                          
2.797s systemd-udevd.service                                                    
2.504s systemd-logind.service                                                   
2.172s systemd-journald.service                                                 
1.966s NetworkManager.service                                                   
1.390s systemd-fsck@dev-disk-by\x2duuid-FCE4\x2dE807.service                    
1.231s wpa_supplicant.service                                                   
 778ms systemd-journal-flush.service                                            
 737ms lightdm.service                                                          
 641ms systemd-udev-trigger.service                                             
 622ms modprobe@drm.service                                                     
 610ms dhcpcd.service                                                           
 555ms user@1000.service                                                        
 525ms systemd-tmpfiles-setup-dev.service                                       
 365ms systemd-binfmt.service                                                   
 328ms systemd-random-seed.service                                              
 327ms boot.mount                                                               
 278ms systemd-tmpfiles-setup.service                                           
 265ms systemd-sysctl.service                                                   
 257ms dev-disk-by\x2duuid-f70f8f30\x2d92b6\x2d4f55\x2d8d39\x2d53a0f13c6506.swap
 221ms systemd-rfkill.service                                                   
 215ms systemd-backlight@backlight:acpi_video0.service                          
 200ms cpupower.service                                                         
 191ms kmod-static-nodes.service                                                
 184ms sys-kernel-debug.mount                                                   
 180ms sys-kernel-tracing.mount                                                 
 177ms dev-hugepages.mount                                                      
 173ms dev-mqueue.mount                                                         
 170ms proc-sys-fs-binfmt_misc.mount                                            
 111ms systemd-update-utmp.service                                              
  65ms rtkit-daemon.service                                                     
  63ms systemd-user-sessions.service                                            
  62ms systemd-remount-fs.service                                               
  53ms systemd-backlight@backlight:radeon_bl0.service                           
  47ms user-runtime-dir@1000.service                                            
  42ms sys-fs-fuse-connections.mount                                            
  41ms sys-kernel-config.mount                                                  
  13ms tmp.mount      

Offline

#13 2020-08-02 17:04:04

pk.gmp
Member
Registered: 2020-06-15
Posts: 44

Re: System is slow after Kernel update on slow laptop

Cool. You still saved about 25% of boot time or 9s. Congratulations!

I believe you can further optimize your /etc/fstab.

I usually keep "defaults, noatime" as mount options in fstab for most of my entries. Unless you have specific reasons you may want to take a look there.

Also consider tweaking your "sysctl vm.swappiness" value. Idea is to swap only when RAM is approaching full. Default is like at 60% RAM we swap. I assume your machine being old, doesn't have much RAM.

Last edited by pk.gmp (2020-08-03 17:14:21)

Offline

#14 2020-08-03 07:49:49

ondoho
Member
Registered: 2013-04-30
Posts: 638
Website

Re: System is slow after Kernel update on slow laptop

pk.gmp wrote:

I didn't understand reason for the mount order. You seem to be mounting swap first, then root and then boot based on fstab entries. You may want to change that. I am refering to the last column of fstab for each of those entries.

This is nonsense.
Did you not read 'man fstab'?

The order of records in fstab is important because fsck(8), mount(8), and umount(8) sequentially iterate through fstab doing their thing.

and the last field has nothing to do with that:

This field is used by fsck(8) to determine the order in which filesystem checks are done at boot time. The root filesystem should be specified with a fs_passno of 1. Other filesystems
should have a fs_passno of 2.

That means the fs_passno are correct in OP's fstab.


However studied and stilted your rant, it can never hide the base and primitve emotion that inspired it.

Offline

#15 2020-08-03 17:13:48

pk.gmp
Member
Registered: 2020-06-15
Posts: 44

Re: System is slow after Kernel update on slow laptop

Thank you @ondoho for pointing out issues.
I will correct my prior comment.

Offline

#16 2020-08-04 23:41:40

csts
Member
Registered: 2020-04-05
Posts: 12

Re: System is slow after Kernel update on slow laptop

pk.gmp wrote:

Cool. You still saved about 25% of boot time or 9s. Congratulations!

I believe you can further optimize your /etc/fstab.

I usually keep "defaults, noatime" as mount options in fstab for most of my entries. Unless you have specific reasons you may want to take a look there.

Also consider tweaking your "sysctl vm.swappiness" value. Idea is to swap only when RAM is approaching full. Default is like at 60% RAM we swap. I assume your machine being old, doesn't have much RAM.


I added noatime to entries that didn't have it. Looked into Arch Wiki / fstab but didn't find an entry that might make things any better.

I set vm.swappiness to 10 when I installed Arch according to:
https://wiki.archlinux.org/index.php/Swap#Swappiness

Offline

#17 2020-08-05 00:23:01

csts
Member
Registered: 2020-04-05
Posts: 12

Re: System is slow after Kernel update on slow laptop

I checked systemd-analyze and it was now 5 seconds slower, after some digging it seems journal stores many activities from my browsers running in RAM in /var/log/journal/, they were 250 MB.
It seems I haven't uncommented the #SystemMaxUse=50M in /etc/systemd/journald.conf and restart the service afer all.
After that booting was as fast as before.

Last edited by csts (2020-08-05 00:42:49)

Offline

#18 2020-08-05 01:21:48

Toad39
Member
Registered: 2020-07-06
Posts: 14

Re: System is slow after Kernel update on slow laptop

Please mark your post as solved by prepending [SOLVED] to the title.

Offline

#19 2020-08-05 06:23:04

csts
Member
Registered: 2020-04-05
Posts: 12

Re: System is slow after Kernel update on slow laptop

Toad39 wrote:

Please mark your post as solved by prepending [SOLVED] to the title.

It is not solved. The problem is that after every initial ramdisk regeneration, after logging in, the system is slow until a logout or a restart is done.

csts wrote:

I did a "sudo mkinitcpio -p linux" to verify this.
It's not the kernel update, it's the initial ramdisk regeneration that causes this.

Offline

Board footer

Powered by FluxBB