Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Aug 2021 09:30:35 +0200
From:      Hans Petter Selasky <hps@selasky.org>
To:        =?UTF-8?Q?=c3=96zkan_KIRIK?= <ozkan.kirik@gmail.com>, FreeBSD Net <freebsd-net@freebsd.org>
Subject:   Re: Creating/destroying bulk VLAN interfaces takes too long
Message-ID:  <a6010767-afec-ced7-2a39-1c582e372e64@selasky.org>
In-Reply-To: <CAAcX-AHacpFmEiMLV57mLFG-=RSjJt=zjNNBpxHK8qE6DYFD3w@mail.gmail.com>
References:  <CAAcX-AHacpFmEiMLV57mLFG-=RSjJt=zjNNBpxHK8qE6DYFD3w@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 8/30/21 9:13 AM, Özkan KIRIK wrote:
> Hello,
> 
> I'm using FreeBSD stable/12. Creating/destroying bulk vlan interfaces takes
> too long to finish. Running parallel doesn't matter.
> Is there any fast way to create 100 vlan interfaces?
> 
> seq 1 100 | /usr/bin/time xargs -t -n 1 -I % ifconfig em1.% create
> ...
> ifconfig em1.99 create
> ifconfig em1.100 create
>         14.78 real         0.03 user         1.19 sys
> 
> with 4 parallel workers:
> seq 1 100 | /usr/bin/time xargs -t -P4 -n 1 -I % ifconfig em1.% create
> ...
> ifconfig em1.99 create
> ifconfig em1.100 create
>         14.46 real         0.03 user         1.20 sys
> 
> destroying:
> ifconfig -g vlan | /usr/bin/time xargs -t -n 1 -I % ifconfig % destroy
> ...
> ifconfig em1.98 destroy
> ifconfig em1.100 destroy
>         21.89 real         0.03 user         1.64 sys
> 
> Any suggestions?
> 

Creating VLAN interfaces sometimes involve firmware commands on the 
network devices which take time.

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a6010767-afec-ced7-2a39-1c582e372e64>