How many interfaces can the openwrt support at most

I conducted an experiment and configured the Ethernet sub interface as follows

config interface 'lan8'
option ifname 'eth2.8'
option proto 'static'

config interface 'lan9'
option ifname 'eth2.9'
option proto 'static'

config interface 'lan10'
option ifname 'eth2.10'
option proto 'static'

When the number of interfaces is 1000, openwrt starts normally,
When the number of interfaces is 2000, openwrt cannot SSH login,and the ‘netifd’ process occupies 70% of the CPU
I found there are many UBUS traffic , just like this

:{"name":3,"link-ext":7,"vlan":1},"remove_device":{"name":3,"link-ext":7,"vlan":1},"notify_proto":{},"remove":{},"set_data":{}}}
-> 95f74551 #00000000 invoke: {"objid":-776211017,"method":"ubus.object.add","data":{"id":1166776769,"path":"network.interface.lan1670"}}
-> 60cfc3f5 #00000000 invoke: {"objid":-2010738611,"method":"ubus.object.add","data":{"id":1166776769,"path":"network.interface.lan1670"}}
-> 3e28bec6 #00000000 data: {"objid":1166776769,"objtype":-2073285326}
-> 3e28bec6 #00000000 status: {"status":0}
<- 95f74551 #00000000 status: {"status":0,"objid":-776211017}
<- 60cfc3f5 #00000000 status: {"status":0,"objid":-2010738611}
<- 3e28bec6 #00000000 add_object: {"objpath":"network.interface","objtype":-2073285326}
-> 95f74551 #00000000 invoke: {"objid":-776211017,"method":"ubus.object.add","data":{"id":-1713830723,"path":"network.interface"}}
-> 60cfc3f5 #00000000 invoke: {"objid":-2010738611,"method":"ubus.object.add","data":{"id":-1713830723,"path":"network.interface"}}
-> 3e28bec6 #00000000 data: {"objid":-1713830723}
-> 3e28bec6 #00000000 status: {"status":0}
<- 60cfc3f5 #00000000 subscribe: {"objid":-2089960030}
-> 3e28bec6 #00000000 notify: {"objid":-1713830723,"active":true}
-> 60cfc3f5 #00000000 status: {"status":0}
<- 95f74551 #00000000 lookup: {"objpath":"network.interface"}
-> 95f74551 #00000000 data: {"objpath":"network.interface","objid":-1713830723,"objtype":-2073285326,"signature":{"up":{},"down":{},"renew":{},"status":{},"prepare":{},"dump":{},"add_device":{"name":3,"link-ext":7,"vlan":1},"remove_device":{"name":3,"link-ext":7,"vlan":1},"notify_proto":{},"remove":{},"set_data":{}}}
-> 95f74551 #00000000 status: {"status":0}

by the way,Is there a limit on the number of register objects or other capacity restrictions in Ubus

None specifically, but apparently there’s implementation flaws limiting the usable amount

i see, thanks

according to the code

static int
netifd_handle_dump(struct ubus_context *ctx, struct ubus_object *obj,
struct ubus_request_data *req, const char *method,
struct blob_attr *msg)
{
blob_buf_init(&b, 0);
void *a = blobmsg_open_array(&b, "interface");

struct interface *iface;
vlist_for_each_element(&interfaces, iface, node) {
void *i = blobmsg_open_table(&b, NULL);
blobmsg_add_string(&b, "interface", iface->name);
netifd_dump_status(iface);
blobmsg_close_table(&b, i);
}

blobmsg_close_array(&b, a);
ubus_send_reply(ctx, req, b.head);

return 0;
}

when the number of interfaces increase, the dump message will increase so that the size of blob msg will be very big for unix domain socket to send.