LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-27-2022, 05:00 AM   #1
stoorky
Member
 
Registered: Sep 2015
Posts: 63

Rep: Reputation: Disabled
Why is bridge-utils slowing down ifupdown-pre.service at boot?


Since I configured a bridged interface, I noticed that the boot went from 3-4 seconds to about 20 seconds. Here are my investigations, the ifupdown-pre.service is to blame. But why ?

Note1 : I'm on Debian 11.4
Note2 : Apart of the tests below I did several other tests, with an empty bridge (e.g. without bridge_ports), with a bridge with only a dummy0 interface, ... Same result. It seems whenever there is a bridge it slows down ifupdown-pre.service, whatever the configuration of that bridge is.

1/ Without a bridge :

Code:
$ ls /etc/network/interfaces.d/
da200-enx3448ed795fcb
    
$ cat /etc/network/interfaces.d/da200-enx3448ed795fcb 
allow-hotplug enx3448ed795fcb
iface enx3448ed795fcb inet static
    address 192.168.137.2
    netmask 255.255.255.0

$ systemd-analyze blame | head -n 3
3.701s plymouth-quit-wait.service
1.698s loadcpufreq.service
1.244s postfix@-.service

$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
   (...)
2: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
   (...)
3: enx3448ed795fcb: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
   link/ether 34:48:ed:79:5f:cb brd ff:ff:ff:ff:ff:ff
   inet 192.168.137.2/24 brd 192.168.137.255 scope global enx3448ed795fcb
      valid_lft forever preferred_lft forever
2/ With a bridge :

My network files :

Code:
    $ ls /etc/network/interfaces.d/
    br0  da200-enx3448ed795fcb
    
    $ cat /etc/network/interfaces.d/da200-enx3448ed795fcb 
    allow-hotplug enx3448ed795fcb
    iface enx3448ed795fcb inet static
        address 0.0.0.0
        netmask 0.0.0.0
    
    $ cat /etc/network/interfaces.d/br0 
    auto br0
    iface br0 inet static
        address 192.168.137.2
        netmask 255.255.255.0
        bridge_ports enx3448ed795fcb
        bridge_maxwait 0
        bridge_stp off

ifupdown-pre.service` now takes 18 seconds :
Code:
    $ systemd-analyze blame | head -n 3
    17.851s ifupdown-pre.service
     2.707s plymouth-quit-wait.service
     1.946s loadcpufreq.service

    $ ip addr
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
        (...)
    2: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
        (...)
    3: enx3448ed795fcb: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel master br0 state DOWN group default qlen 1000
        link/ether 34:48:ed:79:5f:cb brd ff:ff:ff:ff:ff:ff
    4: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
        link/ether 2e:55:46:7e:5c:1e brd ff:ff:ff:ff:ff:ff
        inet 192.168.137.2/24 brd 192.168.137.255 scope global br0
           valid_lft forever preferred_lft forever

    $ systemd-analyze critical-chain
    graphical.target @21.006s
    └─multi-user.target @21.006s
      └─plymouth-quit-wait.service @18.298s +2.707s
        └─rc-local.service @18.247s +49ms
          └─network-online.target @18.241s
            └─network.target @18.241s
              └─networking.service @18.173s +67ms
                └─ifupdown-pre.service @321ms +17.851s
                  └─systemd-udev-trigger.service @251ms +68ms
                    └─systemd-udevd-kernel.socket @244ms
                      └─system.slice @185ms
                        └─-.slice @185ms

    # journalctl -b -u ifupdown-pre.service
     22 -- Journal begins at Tue 2022-07-12 21:45:01 WAT, ends at Sat 2022-08-27 09:26:02 WAT. --
     23 août 27 09:25:00 xps13-7390 systemd[1]: Starting Helper to synchronize boot up for ifupdown...
     24 août 27 09:25:00 xps13-7390 sh[347]: ifquery: parsing file /etc/network/interfaces.d/br0
     25 août 27 09:25:00 xps13-7390 sh[347]: ifquery: parsing file /etc/network/interfaces.d/da200-enx3448ed795fcb
     26 août 27 09:25:18 xps13-7390 systemd[1]: Finished Helper to synchronize boot up for ifupdown.
 
  


Reply

Tags
boot, bridge, ifup



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to remove ifupdown from systemd service Ubuntu 18.04 tpprynn Linux - Networking 3 11-02-2020 03:27 AM
Guessnet-ifupdown sees no device – and then in some case founds it though HRS1064 Linux - Newbie 6 11-03-2012 11:37 AM
LXer: Mozilla to Crack Down on Add-ons Slowing Down Firefox LXer Syndicated Linux News 0 04-02-2011 04:11 PM
I can't find the ifupdown command htamayo Linux - Networking 1 11-27-2007 08:58 AM
ifupdown/ifplugd equivalent(s) for Slackware? alephnull Slackware 3 01-28-2005 10:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration