-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increase the netlink buffer size from 3MB to 16MB. #739
Increase the netlink buffer size from 3MB to 16MB. #739
Conversation
As error is seen in fdbsyncd with netlink reports "out of memory on reading a netlink socket" It is seen when kernel is sending 10k remote mac to fdbsyncd. Signed-off-by: kishore.kunal@broadcom.com
Update sonic-swss-common submodule pointer to include the following: * 6b6842a [NotificationProducer] add pipeline support ([sonic-net#708](sonic-net/sonic-swss-common#708)) * 2cb5ea0 Increase the netlink buffer size from 3MB to 16MB. ([sonic-net#739](sonic-net/sonic-swss-common#739)) * dacbdad RedisPipeline ignore flush when call dtor from another thread. ([sonic-net#736](sonic-net/sonic-swss-common#736)) Signed-off-by: dprital <drorp@nvidia.com>
Update sonic-swss-common submodule pointer to include the following: * 6b6842a [NotificationProducer] add pipeline support ([#708](sonic-net/sonic-swss-common#708)) * 2cb5ea0 Increase the netlink buffer size from 3MB to 16MB. ([#739](sonic-net/sonic-swss-common#739)) * dacbdad RedisPipeline ignore flush when call dtor from another thread. ([#736](sonic-net/sonic-swss-common#736)) Signed-off-by: dprital <drorp@nvidia.com>
As error is seen in fdbsyncd with netlink reports "out of memory on reading a netlink socket" It is seen when kernel is sending 10k remote mac to fdbsyncd. Signed-off-by: kishore.kunal@broadcom.com
#### Why I did it Following the PR sonic-net/sonic-swss-common#739 increasing netlink buffer size in linux kernel As error is seen in fdbsyncd with netlink reports "out of memory on reading a netlink socket" It is seen when kernel is sending 10k remote mac to fdbsyncd. #### How I did it Increase the buffer size of the netlink buffer from 3MB to 16MB #### How to verify it Verified with 10k remote mac, and restarting the fdbsyncd process. So that kernel send the bridge fdb dump to the fdbsyncd. Verified that the netlink buffer error is not reported in the sys log.
#### Why I did it Following the PR sonic-net/sonic-swss-common#739 increasing netlink buffer size in linux kernel As error is seen in fdbsyncd with netlink reports "out of memory on reading a netlink socket" It is seen when kernel is sending 10k remote mac to fdbsyncd. #### How I did it Increase the buffer size of the netlink buffer from 3MB to 16MB #### How to verify it Verified with 10k remote mac, and restarting the fdbsyncd process. So that kernel send the bridge fdb dump to the fdbsyncd. Verified that the netlink buffer error is not reported in the sys log.
As error is seen in fdbsyncd with netlink reports "out of memory on reading a netlink socket" It is seen when kernel is sending 10k remote mac to fdbsyncd. Signed-off-by: kishore.kunal@broadcom.com
I suspect there is a problem here in terms of completeness. In my testing related to sonic-net/sonic-buildimage#12587 I verified that the netlink socket rcv buffer size is inevitably constrained by the host net.core.rmem_max setting. So, no matter what size is requested in netlink.cpp the associated socket rcv buffer size will never exceed the host net.core.rmem.max setting. The preferable method, it seems, for manipulating the aforementioned host setting is by changing it in .../files/image_config/sysctl/sysctl-net.conf (as snapshot below) to the appropriate value (in this case 16MB). Once the host value is appropriately changed (when database is instantiated) then the subsequent netlink socket rcv buffer size increase will be honored. Suggest also that care should be taken to run a full OC test suite regression after this (host net.core.rmem_max) change, since a significant amount of additional memory is going to be allocated for socket rcv buffers that was not previously. It is possible that other (non-netlink) sockets may also be allocating more socket rcv buffer memory after the host change, as well, since any existing code that is currently attempting to allocate a socket rcv buffer larger than host net.core.rmem_max setting (currently set to 3MB) is being constrained to that (3MB) value. After the host net.core.rmem_max change now any/all legacy code that requests more than 3MB is going to actually be granted what it wants (up to the new ceiling of 16MB) and it is possible that this could subsequently result in unanticipated memory pressure. |
#### Why I did it Following the PR sonic-net/sonic-swss-common#739 increasing netlink buffer size in linux kernel As error is seen in fdbsyncd with netlink reports "out of memory on reading a netlink socket" It is seen when kernel is sending 10k remote mac to fdbsyncd. #### How I did it Increase the buffer size of the netlink buffer from 3MB to 16MB #### How to verify it Verified with 10k remote mac, and restarting the fdbsyncd process. So that kernel send the bridge fdb dump to the fdbsyncd. Verified that the netlink buffer error is not reported in the sys log.
#### Why I did it Following the PR sonic-net/sonic-swss-common#739 increasing netlink buffer size in linux kernel As error is seen in fdbsyncd with netlink reports "out of memory on reading a netlink socket" It is seen when kernel is sending 10k remote mac to fdbsyncd. #### How I did it Increase the buffer size of the netlink buffer from 3MB to 16MB #### How to verify it Verified with 10k remote mac, and restarting the fdbsyncd process. So that kernel send the bridge fdb dump to the fdbsyncd. Verified that the netlink buffer error is not reported in the sys log.
#### Why I did it Following the PR sonic-net/sonic-swss-common#739 increasing netlink buffer size in linux kernel As error is seen in fdbsyncd with netlink reports "out of memory on reading a netlink socket" It is seen when kernel is sending 10k remote mac to fdbsyncd. #### How I did it Increase the buffer size of the netlink buffer from 3MB to 16MB #### How to verify it Verified with 10k remote mac, and restarting the fdbsyncd process. So that kernel send the bridge fdb dump to the fdbsyncd. Verified that the netlink buffer error is not reported in the sys log.
As error is seen in fdbsyncd with netlink reports "out of memory on reading a netlink socket" It is seen when kernel is sending 10k remote mac to fdbsyncd.
What I did
Increase the buffer size of the netlink buffer from 3MB to 16MB
How I did it
Increase the buffer size in the API nl_socket_set_buffer_size
How to verify it
Verified with 10k remote mac, and restarting the fdbsyncd process. So that kernel send the bridge fdb dump to the fdbsyncd.
Verified that the netlink buffer error is not reported in the sys log.
Signed-off-by: kishore.kunal@broadcom.com