Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
4.9.2. Disk-paged Queues
flow-to-disk
queue policy with more performant paged queues. Paged queues are backed by a file, and a configurable number of pages of messages are held in memory. Paged queues balance responsive performance (by holding messages in-memory and writing pages of messages rather than individual messages to disk) with load capacity (by allowing the queue to use the file system for additional storage).
cat /proc/sys/vm/max_map_count
, and set at run-time with:
echo 100000 >/proc/sys/vm/max_map_count
echo 100000 >/proc/sys/vm/max_map_count
/etc/sysctl.conf
file.
durable
, which provides persistence to messages that request it.
- A paged queue cannot handle a message larger than the page size, so the queue must be configured with pages at least as big as the largest anticipated message.
- A paged queue cannot also be a LVQ or Priority queue. An exception is thrown by an attempt to create a paged queue with LVQ or Priority specified.
To configure a queue as a paged queue, specify the argument qpid.paging
as true
when declaring the queue.
qpid.max_pages_loaded
- Controls how many pages are allowed to be held in memory at any given time. Default value is 4.
qpid.page_factor
- Controls the size of the page. Default value is 1. The value is a multiple of the platform-defined page size. On Linux the platform-defined page size can be examined using the command
getconf PAGESIZE
. It is typically 4k, depending on your CPU architecture.
The following command line example demonstrates creation of a paged queue:
qpid-config add queue my-paged-queue --argument qpid.paging=True --argument qpid.max_pages_loaded=100 --argument qpid.page_factor=1
qpid-config add queue my-paged-queue --argument qpid.paging=True --argument qpid.max_pages_loaded=100 --argument qpid.page_factor=1
- Python
tx = session.sender("my-paged-queue; {create: always, node: {x-declare: {'auto-delete': True, arguments:{'qpid.page_factor': 1, 'qpid.max_pages_loaded': 100, 'qpid.paging': True}}}}")
tx = session.sender("my-paged-queue; {create: always, node: {x-declare: {'auto-delete': True, arguments:{'qpid.page_factor': 1, 'qpid.max_pages_loaded': 100, 'qpid.paging': True}}}}")
Copy to Clipboard Copied! Toggle word wrap Toggle overflow