Skip to content

Comments

[lib] Make ZMQ buffer size adjustable and set it to 4MB by default#1697

Merged
lolyu merged 17 commits intosonic-net:masterfrom
croos12:adjust-buffer-size
Jan 7, 2026
Merged

[lib] Make ZMQ buffer size adjustable and set it to 4MB by default#1697
lolyu merged 17 commits intosonic-net:masterfrom
croos12:adjust-buffer-size

Conversation

@croos12
Copy link
Contributor

@croos12 croos12 commented Nov 15, 2025

Adds zmqResponseBufferSize variables to ZeroMQ Channel classes to reduce the size of ZeroMQ Servers in memory. Only ServerSai <-> Syncd channel will use 64 MB ZMQ Buffer. All other buffers reduced back to 4 MB to be the same as before commit 8123a9820cc330675147b5a99cfd81ea8df39271

Update zmq response buffers to be adjustable, also decrease the size of
response buffers outside of syncd

Signed-off-by: Connor Roos <croos@nvidia.com>
Adds 64MB buffer size constants to RedisRemoteSaiInterface and syncd

Signed-off-by: Connor Roos <croos@nvidia.com>
Signed-off-by: Connor Roos <croos@nvidia.com>
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@croos12 croos12 changed the title Make ZMQ buffer size adjustable and set it to 4MB by default [lib] Make ZMQ buffer size adjustable and set it to 4MB by default Nov 15, 2025
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@croos12
Copy link
Contributor Author

croos12 commented Nov 24, 2025

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@croos12
Copy link
Contributor Author

croos12 commented Nov 24, 2025

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@croos12
Copy link
Contributor Author

croos12 commented Nov 25, 2025

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@croos12
Copy link
Contributor Author

croos12 commented Nov 25, 2025

@prabhataravind this is another PR for 202511 this time to reduce memory consumption, especially in orchagent

@volodymyrsamotiy
Copy link
Collaborator

@lolyu , could you please help to review?

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prsunny prsunny requested a review from saiarcot895 December 18, 2025 18:35
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@bingwang-ms
Copy link
Contributor

@lolyu Kindly reminding on this review request.

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@lolyu lolyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lolyu lolyu merged commit 52b9102 into sonic-net:master Jan 7, 2026
16 checks passed
DavidZagury pushed a commit to DavidZagury/sonic-sairedis that referenced this pull request Jan 14, 2026
…onic-net#1697)

* Update zmq buffer to be adjustable

Update zmq response buffers to be adjustable, also decrease the size of
response buffers outside of syncd

Signed-off-by: Connor Roos <croos@nvidia.com>

* Add buffer size constants

Adds 64MB buffer size constants to RedisRemoteSaiInterface and syncd

Signed-off-by: Connor Roos <croos@nvidia.com>

* Remove trailing whitespace

Signed-off-by: Connor Roos <croos@nvidia.com>

* Make buffer adjustable in RedisRemoteSaiInterface

Signed-off-by: Connor Roos <croos@nvidia.com>

---------

Signed-off-by: Connor Roos <croos@nvidia.com>
Co-authored-by: Longxiang Lyu <35479537+lolyu@users.noreply.github.com>
croos12 added a commit to croos12/sonic-sairedis that referenced this pull request Jan 14, 2026
…onic-net#1697)

* Update zmq buffer to be adjustable

Update zmq response buffers to be adjustable, also decrease the size of
response buffers outside of syncd

Signed-off-by: Connor Roos <croos@nvidia.com>

* Add buffer size constants

Adds 64MB buffer size constants to RedisRemoteSaiInterface and syncd

Signed-off-by: Connor Roos <croos@nvidia.com>

* Remove trailing whitespace

Signed-off-by: Connor Roos <croos@nvidia.com>

* Make buffer adjustable in RedisRemoteSaiInterface

Signed-off-by: Connor Roos <croos@nvidia.com>

---------

Signed-off-by: Connor Roos <croos@nvidia.com>
Co-authored-by: Longxiang Lyu <35479537+lolyu@users.noreply.github.com>
croos12 added a commit to croos12/sonic-sairedis that referenced this pull request Jan 15, 2026
…onic-net#1697)

* Update zmq buffer to be adjustable

Update zmq response buffers to be adjustable, also decrease the size of
response buffers outside of syncd

Signed-off-by: Connor Roos <croos@nvidia.com>

* Add buffer size constants

Adds 64MB buffer size constants to RedisRemoteSaiInterface and syncd

Signed-off-by: Connor Roos <croos@nvidia.com>

* Remove trailing whitespace

Signed-off-by: Connor Roos <croos@nvidia.com>

* Make buffer adjustable in RedisRemoteSaiInterface

Signed-off-by: Connor Roos <croos@nvidia.com>

---------

Signed-off-by: Connor Roos <croos@nvidia.com>
Co-authored-by: Longxiang Lyu <35479537+lolyu@users.noreply.github.com>
croos12 added a commit to croos12/sonic-sairedis that referenced this pull request Jan 15, 2026
…onic-net#1697)

* Update zmq buffer to be adjustable

Update zmq response buffers to be adjustable, also decrease the size of
response buffers outside of syncd

Signed-off-by: Connor Roos <croos@nvidia.com>

* Add buffer size constants

Adds 64MB buffer size constants to RedisRemoteSaiInterface and syncd

Signed-off-by: Connor Roos <croos@nvidia.com>

* Remove trailing whitespace

Signed-off-by: Connor Roos <croos@nvidia.com>

* Make buffer adjustable in RedisRemoteSaiInterface

Signed-off-by: Connor Roos <croos@nvidia.com>

---------

Signed-off-by: Connor Roos <croos@nvidia.com>
Co-authored-by: Longxiang Lyu <35479537+lolyu@users.noreply.github.com>
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to msft-202506: Azure/sonic-sairedis.msft#101

@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202511: #1740

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.

8 participants