-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP Decrease memory usage of queue_type state
Prior to this commit, 1 MQTT publisher publishing to 1 Million target classic queues requires around 680 MB of process memory. After this commit, it requires around 290 MB of process memory. This commit requires feature flag classic_queue_type_delivery_support and introduces a new one called no_queue_name_in_classic_queue_client. Instead of storing the binary queue name 4 times, this commit now stores it only 1 time. The monitor_registry is removed since only classic queue clients monitor their classic queue server processes. The classic queue client does not store the queue name anymore. Instead the queue name is included in messages handled by the classic queue client. Storing the queue name in the record ctx was unnecessary. More potential future memory optimisations: * Use ets continuations when looking up destination queues * Only fetch ETS columns that are necessary instead of whole queue records * Do not hold the same vhost binary in memory many times. Instead, maintain a mapping. * Remove unnecessary tuple fields.
- Loading branch information
Showing
16 changed files
with
165 additions
and
281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.