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

Change default memory allocation policy and size of the queue #1751

Merged
merged 9 commits into from
Feb 3, 2025

Conversation

Mallets
Copy link
Member

@Mallets Mallets commented Feb 3, 2025

The default configuration now:

  1. allocates fewer batches
  2. adopts lazy memory allocations

overall reducing memory consumption out-of-the-box.

@Mallets Mallets added the enhancement Existing things could work better label Feb 3, 2025
data: 4,
data_low: 4,
background: 4,
data: 2,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this would impact maximum throughput by a lot.

Copy link
Member Author

@Mallets Mallets Feb 3, 2025

Choose a reason for hiding this comment

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

In my tests I have observed no difference whatsoever... do you observe the same?

8 bytes payload

2 batches

4407172.419259213 msg/s
4343720.114696581 msg/s
4314540.555551352 msg/s
4345756.231605296 msg/s
4338680.473918537 msg/s
4396559.932344768 msg/s
4390461.760899556 msg/s
4377899.688177528 msg/s
4367711.594203114 msg/s
4345347.717885626 msg/s

4 batches

4327679.108419167 msg/s
4389556.194952455 msg/s
4391946.247048938 msg/s
4387449.76094437 msg/s
4315384.108078019 msg/s
4284134.162390979 msg/s
4373345.570887221 msg/s
4397007.707862175 msg/s
4394504.808406187 msg/s
4397692.482819417 msg/s

8192 bytes payload

2 batches

1031180.5019144053 msg/s
1007955.1255636461 msg/s
784623.0171142459 msg/s
837900.7582968347 msg/s
832838.3525152829 msg/s
839854.0857332004 msg/s
921410.3438061457 msg/s
966730.9136375008 msg/s
973037.7477276628 msg/s
958199.2045687528 msg/s

4 batches

1003310.7217095651 msg/s
872120.1753484475 msg/s
997713.8235789438 msg/s
996013.6059402785 msg/s
940227.5416278623 msg/s
876295.9229319188 msg/s
880288.7161776316 msg/s
882700.0310307016 msg/s
862598.8748784737 msg/s
880920.6895369346 msg/s

1M bytes payload

2 batches

7613.407554525003 msg/s
7345.827099413475 msg/s
7597.320740415613 msg/s
7392.356154115356 msg/s
7305.849481062188 msg/s
7659.214160399257 msg/s
7678.778134148506 msg/s
7346.802021237772 msg/s
7560.669783798256 msg/s
7560.8326639161105 msg/s

4 batches

7829.248873567797 msg/s
7471.750145798876 msg/s
7640.854016786412 msg/s
7521.376140221726 msg/s
7778.550286349516 msg/s
7496.163397981484 msg/s
7676.226735395762 msg/s
7408.409743294831 msg/s
7661.548924880467 msg/s
7679.129567591862 msg/s

Copy link
Contributor

Choose a reason for hiding this comment

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

Indeed, it doesn't seems to change the throughput. Then I'm quite confused with my previous "allocation on demand" experiment that enabled 1Mmsg/s increase ...

Copy link
Member Author

Choose a reason for hiding this comment

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

Here I tested on an AMD Ryzen 7 5800X 8-Core Processor, so maybe different architecture?
In any case, the difference seems to be on the positive side at the moment.

@Mallets Mallets changed the base branch from feat/lazy_batching to main February 3, 2025 11:34
@Mallets Mallets requested a review from OlivierHecart February 3, 2025 11:48
@Mallets Mallets enabled auto-merge (squash) February 3, 2025 11:57
@Mallets Mallets merged commit e17de41 into main Feb 3, 2025
25 checks passed
@Mallets Mallets deleted the feat/queue_default_config branch February 3, 2025 13:56
JEnoch added a commit to ZettaScaleLabs/rmw_zenoh that referenced this pull request Feb 4, 2025
Yadunund added a commit to ros2/rmw_zenoh that referenced this pull request Feb 4, 2025
* Bump: zenoh-cpp=bd4d741 zenoh-c=15d56e1 zenoh=e17de41

* Config: add new gossip target setting (eclipse-zenoh/zenoh#1678)

* Config: add new interests timeout setting (eclipse-zenoh/zenoh#1710)

* Config: copy updates from eclipse-zenoh/zenoh#1712

* Config: copy updates from eclipse-zenoh/zenoh#1722

* Config: copy updates from eclipse-zenoh/zenoh#1749

* Config: copy updates from eclipse-zenoh/zenoh#1751

* fix: use the commit 15d56e1 to include the allocation feature

* Bump zenoh-c=5fce7fb zenoh=e4ea6f0 (for eclipse-zenoh/zenoh#1754 fixing a routing issue in 1.2.0)

* Update documentation for commits and undo style changes

Signed-off-by: Yadunund <[email protected]>

---------

Signed-off-by: Yadunund <[email protected]>
Co-authored-by: yuanyuyuan <[email protected]>
Co-authored-by: Yadunund <[email protected]>
mergify bot pushed a commit to ros2/rmw_zenoh that referenced this pull request Feb 4, 2025
* Bump: zenoh-cpp=bd4d741 zenoh-c=15d56e1 zenoh=e17de41

* Config: add new gossip target setting (eclipse-zenoh/zenoh#1678)

* Config: add new interests timeout setting (eclipse-zenoh/zenoh#1710)

* Config: copy updates from eclipse-zenoh/zenoh#1712

* Config: copy updates from eclipse-zenoh/zenoh#1722

* Config: copy updates from eclipse-zenoh/zenoh#1749

* Config: copy updates from eclipse-zenoh/zenoh#1751

* fix: use the commit 15d56e1 to include the allocation feature

* Bump zenoh-c=5fce7fb zenoh=e4ea6f0 (for eclipse-zenoh/zenoh#1754 fixing a routing issue in 1.2.0)

* Update documentation for commits and undo style changes

Signed-off-by: Yadunund <[email protected]>

---------

Signed-off-by: Yadunund <[email protected]>
Co-authored-by: yuanyuyuan <[email protected]>
Co-authored-by: Yadunund <[email protected]>
(cherry picked from commit d322d6f)
mergify bot pushed a commit to ros2/rmw_zenoh that referenced this pull request Feb 4, 2025
* Bump: zenoh-cpp=bd4d741 zenoh-c=15d56e1 zenoh=e17de41

* Config: add new gossip target setting (eclipse-zenoh/zenoh#1678)

* Config: add new interests timeout setting (eclipse-zenoh/zenoh#1710)

* Config: copy updates from eclipse-zenoh/zenoh#1712

* Config: copy updates from eclipse-zenoh/zenoh#1722

* Config: copy updates from eclipse-zenoh/zenoh#1749

* Config: copy updates from eclipse-zenoh/zenoh#1751

* fix: use the commit 15d56e1 to include the allocation feature

* Bump zenoh-c=5fce7fb zenoh=e4ea6f0 (for eclipse-zenoh/zenoh#1754 fixing a routing issue in 1.2.0)

* Update documentation for commits and undo style changes

Signed-off-by: Yadunund <[email protected]>

---------

Signed-off-by: Yadunund <[email protected]>
Co-authored-by: yuanyuyuan <[email protected]>
Co-authored-by: Yadunund <[email protected]>
(cherry picked from commit d322d6f)
Yadunund pushed a commit to ros2/rmw_zenoh that referenced this pull request Feb 4, 2025
* Bump: zenoh-cpp=bd4d741 zenoh-c=15d56e1 zenoh=e17de41

* Config: add new gossip target setting (eclipse-zenoh/zenoh#1678)

* Config: add new interests timeout setting (eclipse-zenoh/zenoh#1710)

* Config: copy updates from eclipse-zenoh/zenoh#1712

* Config: copy updates from eclipse-zenoh/zenoh#1722

* Config: copy updates from eclipse-zenoh/zenoh#1749

* Config: copy updates from eclipse-zenoh/zenoh#1751

* fix: use the commit 15d56e1 to include the allocation feature

* Bump zenoh-c=5fce7fb zenoh=e4ea6f0 (for eclipse-zenoh/zenoh#1754 fixing a routing issue in 1.2.0)

* Update documentation for commits and undo style changes

Signed-off-by: Yadunund <[email protected]>

---------

Signed-off-by: Yadunund <[email protected]>
Co-authored-by: yuanyuyuan <[email protected]>
Co-authored-by: Yadunund <[email protected]>
(cherry picked from commit d322d6f)

Co-authored-by: Julien Enoch <[email protected]>
Yadunund pushed a commit to ros2/rmw_zenoh that referenced this pull request Feb 4, 2025
* Bump: zenoh-cpp=bd4d741 zenoh-c=15d56e1 zenoh=e17de41

* Config: add new gossip target setting (eclipse-zenoh/zenoh#1678)

* Config: add new interests timeout setting (eclipse-zenoh/zenoh#1710)

* Config: copy updates from eclipse-zenoh/zenoh#1712

* Config: copy updates from eclipse-zenoh/zenoh#1722

* Config: copy updates from eclipse-zenoh/zenoh#1749

* Config: copy updates from eclipse-zenoh/zenoh#1751

* fix: use the commit 15d56e1 to include the allocation feature

* Bump zenoh-c=5fce7fb zenoh=e4ea6f0 (for eclipse-zenoh/zenoh#1754 fixing a routing issue in 1.2.0)

* Update documentation for commits and undo style changes

Signed-off-by: Yadunund <[email protected]>

---------

Signed-off-by: Yadunund <[email protected]>
Co-authored-by: yuanyuyuan <[email protected]>
Co-authored-by: Yadunund <[email protected]>
(cherry picked from commit d322d6f)

Co-authored-by: Julien Enoch <[email protected]>
wyfo added a commit to ZettaScaleLabs/zenoh that referenced this pull request Feb 10, 2025
wyfo added a commit to ZettaScaleLabs/zenoh that referenced this pull request Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Existing things could work better
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants