<dte...@freebsd.org> writes: > I decided to stress-test the netgraph(4) subsystem one day and was able to > create 65530 interfaces before it produced an error, refusing to create > another. > > At that point, the system was still usable, but... > > It took over an hour for ifconfig to list all the interfaces. Simply typing > "ifconfig" with no arguments and pressing ENTER would start spewing > information > on-screen for over an hour before it finished. (so I'd say that there could be > some optimizations made; but nonetheless impressive that the system was still > very usable at that point, ifconfig aside).
The interfaces are a linked list, plus there's a separate kernel dive for each interface. The list (as opposed to individual interfaces) is really only accessed from userland, so optimizing these operations would need a really good use case to be worthwhile. The current implementation is not just very well known, it's good for hundreds to thousands of interfaces..For the output of ifconfig alone, it might be possible to grab more information in the original getifaddrs() (which makes a copy of the interface list), but that would make other operations with that function more expensive. _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"