Skip to content

Performance of PCF inquiries can be improved with read ahead #16

@andrewkirillov-ibm

Description

@andrewkirillov-ibm

As I mentioned in the previous issue, #14, we are dealing with some slow UK<->US connections, which lead to MQCMD_INQUIRE_Q query for ALL queues (*) to take 22+ seconds. As attributes of each queue are put on PCF reply queue as individual message, we end up reading a lot of messages. Not huge in size, but big in numbers.

However, changing one line in mqadmin.py, changes things dramatically - from 22+ seconds it goes to ~2.5 seconds.

In PCFExecute.__init__ change from this

self.__reply_queue = Queue(self.qm, od, CMQC.MQOO_INPUT_EXCLUSIVE)

to this

self.__reply_queue = Queue(self.qm, od, CMQC.MQOO_INPUT_EXCLUSIVE | CMQC.MQOO_READ_AHEAD)

However, I am not 100% confident, if it may have side effects for those, who specify their own PCF reply queue. In our application, we don't create our PCF reply queue. Instead one is created dynamically for every PCF inquiry, with unique name, and then it gets deleted at the end of PCF inquiry. In such scenario I can not see why we would not want to do read ahead to get performance boost.

Or, to make it all safe for everyone, the PCFExecute.__init__ can be extended with an optional parameter, which allows adding extra MQOO options for PCF reply queue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions