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

Improves daemon <-> pubsub memory footprint when many objects #400

Merged
merged 9 commits into from
Aug 24, 2023

Conversation

cgalibern
Copy link
Contributor

@cgalibern cgalibern commented Aug 23, 2023

  • improves daemon memory footprint (many objects)
  • prevents daemondata <-> pubsub hang during event storms

Rename SubscriptionError.Error error to Errs string
log warn when free size is < 1/4 of full size, publish SubscriptionQueueThreshold with level=warn
log error when free size is < 1/2 of full size, publish SubscriptionQueueThreshold with level=info
main daemon components needs dedicated subscription queue size values to avoid hang during
activity storm (boot, peer lost, peer join...) because they are "slow" or they filter many events.

This commit also defines dedicated queue sizes as public values to allow updates from package consumers.

With this commit it will be possible to reduce the default pubsub subscription queue size to consume less memory for
<path> dedicated consumers such as imon, omon, icfg...

New defaults:
    daemondata: SubscriptionQueueSize = 40000
    discover.cfg: SubscriptionQueueSizeCfg = 30000
    discover.omon: SubscriptionQueueSizeOmon = 16000
    dns: SubscriptionQueueSize = 1000
    istats: SubscriptionQueueSize = 1000
    scheduler: SubscriptionQueueSize = 16000
…cription queue size

since huge pubsub subscription queue consumers have dedicated value, we can now reduce the default
bus subscription queue size from 4000 -> 200.

Impact example for 500 simple objects on 3 node cluster: 300Mo -> 100Mo
@arnaudveron arnaudveron merged commit 4b6f373 into opensvc:main Aug 24, 2023
1 check passed
@cgalibern cgalibern deleted the improve-memory-footprint branch August 31, 2023 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants