Conversation
This is an extension of the idea of the free disk space alarm. That option enables blocking publishers when the free disk space on the data dir's disk falls below some threshold. This feature blocks publishers of individual queue types when the disk space taken by the queue type exceeds the configured threshold. This change is incomplete: it only affects QQs and streams and AMQP 0-9-1 so far.
|
I like this. I wonder if it is possible to set such limits via policies and configs for individual queues? |
| %% | ||
| %% On especially large directories this can be an expensive operation since | ||
| %% each sub-directory is scanned recursively and each file's metadata must be | ||
| %% read. |
There was a problem hiding this comment.
Might be better for queue types to increment/decrement an internal counter (that may be stored in persistent_term).
I am wondering if it would be better (by some definition of better) that if you want this type of feature the different data directories were mounted as separate disk volumes which should make usage querying a lot simpler and faster. Also making this queue type specific isn't necessarily always going to work. For example we have experimented with running multiple quorum queue Ra systems which would use different data directories (ideally on different volumes). In this case it it is much harder to work out which channels etc related to particular quorum queues in different systems. Not impossible but not a straight map to a queue type. |
|
Thanks for the quick feedback on this! Sorry it took me so long to get back to it. I have opened up #14590 to discuss it further and I will continue in a new branch, most likely with the |
This is an extension of the idea of the free disk space alarm. That option enables blocking publishers when the free disk space on the data dir's disk falls below some threshold. This feature blocks publishers of individual queue types when the disk space taken by the queue type exceeds the configured threshold.
This change is incomplete: it only affects QQs and streams and AMQP 0-9-1 so far. I thought I'd open this as a draft early though to hear if anyone has thoughts on this as a feature.
How to demo the changes...
make run-broker RABBITMQ_CONFIG_FILE=example.confrabbit_queue_type_disk_monitor:start_link()(should become part of a sup tree eventually)perf-test -qq -u qq -x 1 -y 1 --rate 5 --confirm 5perf-test -sq -u sq -x 1 -y 1 --rate 5 --confirm 5cd /tmp/rabbitmq-test-instances/<node>/mnesia/<node>/quorum/<node>/dd if=/dev/zero of=ballast.bin bs=1G count=3rm ballast.binand the QQ perf-test command should continue