Skip to content
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

Merged

Conversation

kishorekunal01
Copy link
Contributor

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

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
@prsunny prsunny merged commit 2cb5ea0 into sonic-net:master Jan 30, 2023
dprital added a commit to dprital/sonic-buildimage that referenced this pull request Jan 30, 2023
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>
liat-grozovik pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Feb 5, 2023
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>
StormLiangMS pushed a commit that referenced this pull request Feb 10, 2023
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
qiluo-msft pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Feb 27, 2023
#### 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.
mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Feb 28, 2023
#### 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.
yxieca pushed a commit that referenced this pull request Mar 1, 2023
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
@snider-nokia
Copy link

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.

image

mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Mar 7, 2023
#### 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.
mssonicbld pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Mar 7, 2023
#### 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.
xumia pushed a commit to xumia/sonic-buildimage-1 that referenced this pull request Mar 10, 2023
#### 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants