Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
21.1 Legacy Series
»
Huge bogonsv6 list = really long boot time
« previous
next »
Print
Pages: [
1
]
Author
Topic: Huge bogonsv6 list = really long boot time (Read 2738 times)
puithove
Newbie
Posts: 7
Karma: 0
Huge bogonsv6 list = really long boot time
«
on:
April 21, 2021, 11:38:56 pm »
I don't reboot my router very often luckily, usually just when doing upgrades. However, I recently started noticing a really long startup time which is spent waiting on "Configuring Firewall..." with the CPU just pegged out. We're talking times of 10+ minutes waiting like that.
I decided to dig through all of my firewall rules to figure out what was taking so long. In doing so I looked at the number of addresses defined for the bogonsv6 alias, and as soon as I saw that I knew what the holdup was. There are 10s of thousands that are added to the firewall rules for blocking bogons via that alias (makes sense given the address space of IPv6).
I have turned off blocking bogons for now and that makes an instant difference. I wonder though if there are any optimizations that can be made to how firewall rulesets are loaded that could reduce the amount of time it takes to get through this at bootup time. Considering that making changes to firewall rulesets and applying changes even with the block bogons enabled is very quick, it kinda surprises me that it takes so long to load the ruleset at bootup (though maybe applying changes doesn't force a full ruleset reload).
Other thought - I've had the Block Bogons feature enabled since the dawn of time, and have had dual-stack IPv6 running for the past few years - so why is this suddenly an issue more recently?
Currently on OPNsense 21.1.5-amd64
«
Last Edit: April 21, 2021, 11:41:01 pm by puithove
»
Logged
franco
Administrator
Hero Member
Posts: 17661
Karma: 1611
Re: Huge bogonsv6 list = really long boot time
«
Reply #1 on:
April 22, 2021, 10:02:09 am »
So the tough question is what hardware are you using?
Cheers,
Franci
Logged
puithove
Newbie
Posts: 7
Karma: 0
Re: Huge bogonsv6 list = really long boot time
«
Reply #2 on:
April 23, 2021, 01:38:00 am »
I definitely should have included that.
VM running under Proxmox
Dual E5-2630v2 - 12 physical cores with hyperthreading enabled
VM given 24 threads (virtual cores)
Logged
franco
Administrator
Hero Member
Posts: 17661
Karma: 1611
Re: Huge bogonsv6 list = really long boot time
«
Reply #3 on:
April 23, 2021, 08:16:53 am »
Ok... can you try giving it fewer cores? About 6 should be enough to see a significant difference if you have multiple VMs running in Proxmox (or any other virtualisation solution).
Over the years I have seen this consistent pattern during support sessions that the VM will get no CPU time because it rarely, if ever, gets all the cores at once and thus the VM cannot be resumed a lot which results in sluggish operation.
Cheers,
Franco
Logged
puithove
Newbie
Posts: 7
Karma: 0
Re: Huge bogonsv6 list = really long boot time
«
Reply #4 on:
April 23, 2021, 04:27:15 pm »
Yea, you're not wrong on that. Right now though it's running on an otherwise unused node, and was the same when I had only 12 vcpus on it (turned it up to try to improve boot time, which it as expected didn't). I'm away from home right now so don't / can't take down the router to change it. I'll play with it a bit more when I'm back home in a few days.
Logged
puithove
Newbie
Posts: 7
Karma: 0
Re: Huge bogonsv6 list = really long boot time
«
Reply #5 on:
April 28, 2021, 10:01:01 pm »
It seems you were right on the money. Dropped the vcpu down to 6, and while it does spin up the CPU when applying the firewall rules, it doesn't take very long at all - 30s or so vs 10 minutes. Definitely seems like CPU contention anyway.
Thanks!
Logged
franco
Administrator
Hero Member
Posts: 17661
Karma: 1611
Re: Huge bogonsv6 list = really long boot time
«
Reply #6 on:
April 29, 2021, 09:07:15 pm »
Yay, happy that worked out fine.
Cheers,
Franco
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
21.1 Legacy Series
»
Huge bogonsv6 list = really long boot time