You are not logged in.

#1 2020-10-18 16:32:52

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Network taking a long time to start [Nearly Solved]

Recently noticed that Network Manager was taking a long time to start, mostly the dispatcher script. So I switched too systemd-networkd.

Got this:

 systemd-analyze blame
17.570s dhcpcd@enp2s0.service                                                                    
 5.305s systemd-networkd-wait-online.service                                                     
  757ms lvm2-monitor.service                                                                     
  543ms dev-sda2.device                                                                          
  400ms systemd-random-seed.service                                                              
  390ms systemd-journal-flush.service                                                            
  272ms systemd-journald.service                                                                 
  269ms systemd-udevd.service                                                                    
  265ms systemd-networkd.service                                                                 
  229ms systemd-logind.service                                                                   
  220ms org.cups.cupsd.service                                                                   
  103ms user@1000.service                                                                        
   93ms systemd-udev-trigger.service                                                             
   84ms lm_sensors.service                                                                       
   70ms systemd-modules-load.service                                                             
   61ms systemd-fsck@dev-disk-by\x2duuid-6ca51681\x2dff04\x2d4cec\x2d8622\x2d82f7472e25e6.service
   61ms systemd-fsck@dev-disk-by\x2duuid-5BEC\x2d1713.service                                    
   50ms modprobe@drm.service                                                                     
   47ms colord.service                                                                           
   44ms boot.mount                                                                               
   32ms systemd-boot-system-token.service                                                        
   32ms systemd-tmpfiles-setup.service                                                           
   30ms systemd-tmpfiles-setup-dev.service                                                       
   19ms dev-hugepages.mount                                                                      
   18ms dev-mqueue.mount                                                                         
   17ms sys-kernel-debug.mount                                                                   
   16ms sys-kernel-tracing.mount                                                                 
   15ms kmod-static-nodes.service                                                                
   14ms systemd-user-sessions.service                                                            
   14ms tmp.mount                                                                                
   12ms home.mount                                                                               
   10ms systemd-update-utmp.service                                                              
   10ms user-runtime-dir@1000.service                                                            
    9ms systemd-sysctl.service                                                                   
    8ms systemd-remount-fs.service                                                               
    4ms sys-fs-fuse-connections.mount                                                            
    4ms sys-kernel-config.mount                                        

Really not much better, not sure why a simple wired connection would take so long. Either I have an issue with dhcpcd or resolving. Not really bothered once system is up and running but system never used to boot so slowly.

Any ideas?

Last edited by Mr Green (2020-10-21 16:37:25)


Mr Green

Offline

#2 2020-10-18 16:39:04

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,720

Re: Network taking a long time to start [Nearly Solved]

You are not supposed to have dhcpcd started or running when you use networkmanager or systemd-networkd for that matter.

https://wiki.archlinux.org/index.php/Ne … k_managers note the blue box and the mention of either of these two solutions using their own dhcp clients.

Last edited by V1del (2020-10-18 16:39:46)

Offline

#3 2020-10-19 01:48:18

rsmarples
Member
Registered: 2009-05-12
Posts: 287

Re: Network taking a long time to start [Nearly Solved]

V1del wrote:

You are not supposed to have dhcpcd started or running when you use networkmanager or systemd-networkd for that matter


Or vice versa

Offline

#4 2020-10-19 10:41:24

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: Network taking a long time to start [Nearly Solved]

That explains everything, used to run netctl (many moons ago). Do know you should not have anything else running so assumed (quite wrongly) that dhcpcd was started by them.

Marking as solved ;-)


Mr Green

Offline

#5 2020-10-21 16:26:00

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: Network taking a long time to start [Nearly Solved]

I have disabled

  dhcpcd@enp2s0.service 

But on reboot service reappears.

systemctl --type=service 
  UNIT                                                                                      LOAD   ACTIVE SUB     DESCRIPTION                                                                >
  colord.service                                                                            loaded active running Manage, Install and Generate Color Profiles                                >
  dbus.service                                                                              loaded active running D-Bus System Message Bus                                                   >
  dhcpcd@enp2s0.service                                                                     loaded active running dhcpcd on enp2s0                                                           >
  getty@tty1.service                                                                        loaded active running Getty on tty1                                                              >
  haveged.service                                                                           loaded active running Entropy Daemon based on the HAVEGE algorithm                               >
  kmod-static-nodes.service                                                                 loaded active exited  Create list of static device nodes for the current kernel                  >
  lm_sensors.service                                                                        loaded active exited  Initialize hardware monitoring sensors                                     >
  lvm2-lvmetad.service                                                                      loaded active running LVM2 metadata daemon                                                       >
  lvm2-monitor.service                                                                      loaded active exited  Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polli>
● NetworkManager-wait-online.service                                                        loaded failed failed  Network Manager Wait Online                                                >
  NetworkManager.service                                                                    loaded active running Network Manager                                                            >
  ntpd.service                                                                              loaded active running Network Time Service                                                       >
  org.cups.cupsd.service                                                                    loaded active running CUPS Scheduler                                                             >
  polkit.service                                                                            loaded active running Authorization Manager                                                      >
  sshd.service                                                                              loaded active running OpenSSH Daemon                                                             >
  systemd-boot-system-token.service                                                         loaded active exited  Store a System Token in an EFI Variable                                    >
  systemd-fsck@dev-disk-by\x2duuid-5BEC\x2d1713.service                                     loaded active exited  File System Check on /dev/disk/by-uuid/5BEC-1713                           >
  systemd-fsck@dev-disk-by\x2duuid-6ca51681\x2dff04\x2d4cec\x2d8622\x2d82f7472e25e6.service loaded active exited  File System Check on /dev/disk/by-uuid/6ca51681-ff04-4cec-8622-82f7472e25e6>
  systemd-journal-flush.service                                                             loaded active exited  Flush Journal to Persistent Storage                                        >
  systemd-journald.service                                                                  loaded active running Journal Service                                                            >
  systemd-logind.service                                                                    loaded active running User Login Management                                                      >
  systemd-modules-load.service                                                              loaded active exited  Load Kernel Modules                                                        >
  systemd-random-seed.service                                                               loaded active exited  Load/Save Random Seed                                                      >
  systemd-remount-fs.service                                                                loaded active exited  Remount Root and Kernel File Systems                                       >
  systemd-sysctl.service                                                                    loaded active exited  Apply Kernel Variables                                                     >
  systemd-tmpfiles-setup-dev.service                                                        loaded active exited  Create Static Device Nodes in /dev                                         >
  systemd-tmpfiles-setup.service                                                            loaded active exited  Create Volatile Files and Directories                                      >
  systemd-udev-trigger.service                                                              loaded active exited  Coldplug All udev Devices                                                  >
  systemd-udevd.service                                                                     loaded active running Rule-based Manager for Device Events and Files                             >
  systemd-update-utmp.service                                                               loaded active exited  Update UTMP about System Boot/Shutdown                                     >
  systemd-user-sessions.service                                                             loaded active exited  Permit User Sessions                                                       >
  user-runtime-dir@1000.service                                                             loaded active exited  User Runtime Directory /run/user/1000                                      
  user@1000.service                                                                         loaded active running User Manager for UID 1000                                                  >

Only have Network Manager running....


Mr Green

Offline

#6 2020-10-21 16:36:44

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: Network taking a long time to start [Nearly Solved]

So I re read wiki and found that I have dhcpcd installed instead of dhclient... once I removed dhcpcd and installed dhclient boot time dropped too 10 seconds. However wait online is failing (need to look into that)


Mr Green

Offline

#7 2020-10-25 15:42:49

rsmarples
Member
Registered: 2009-05-12
Posts: 287

Re: Network taking a long time to start [Nearly Solved]

dhcpcd will ARP check the offered IP address by default, dhclient wont.

If speed is your thing then you can add noarp to /etc/dhcpcd.conf and watch it work just as quickly as dhclient - and let the potential for IP address conflict begin!

Offline

Board footer

Powered by FluxBB