Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-760

Inconsistent behavior with PFC depending on producer speed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Major Major
    • None
    • None
    • Documentation

      A queue has been configured with the following limits:

      <policyEntry queue="queue1" producerFlowControl="true" memoryLimit="1mb" />
      

      A very fast producer is then used to send .5mb messages to this queue as follows:

      java -jar extras/mq-client.jar producer --size 524288 --user admin --password admin  --destination queue1 --count 2000 --brokerUrl tcp://localhost:61616
      

      This is using the mq-client.jar provided with the 6.1 JBoss A-MQ distribution.

      The result is all 2000 messages are able to be enqueued which far exceeds the memory limit of 1mb.

      Checking the queue stats reveals the cursorPercentUsage at 10069 and the memoryPercentUsage at 10069.

      Even with the changes for AMQ-4495, this seem a bit aggressive.

      When the producer is slowed using the following command

      java -jar extras/mq-client.jar producer --size 524288 --user admin --password admin  --destination queue1 --count 2000 --brokerUrl tcp://localhost:61616 --sleep 1000
      

      Only 30 message are able to be enqueued and PFC is triggered. The queue stats shows CursorPercentUsage at 1502 and MemoryPercentUsage at 1502.

      If the producer is slowed even more using:

      java -jar extras/mq-client.jar producer --size 524288 --user admin --password admin  --destination queue1 --count 2000 --brokerUrl tcp://localhost:61616 --sleep 2000
      

      Doubling the sleep interval, only half as many messages are now enqueued, 15.

      The queue stats shows CursorPercentUsage at 751 and MemoryPercentUsage at 751.

      Is this the expected behavior?

              fbolton@redhat.com Fintan Bolton (Inactive)
              rhn-support-jsherman Jason Sherman
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: