Intelligent batching of distributed messages
First Claim
1. In a computing environment executing a distributed application in at least a first address space and a second address space, a system for causing a sender thread in the first address space to send messages intended for the second address space to the second address space via a network, comprising:
- a sending queue in the first address space for receiving messages from threads in the first address space bound for the second address space;
first means for determining whether a number of messages in said sending queue is greater than or equal to a predetermined number, and if so, causing the sender thread to send the messages in said sending queue to the second node in a single packet; and
second means for determining whether at least one message is present in said sending queue, and if so, and if no higher priority thread is ready to run, causing the sender thread to send all of the messages in the said sending queue to the second address space in a single packet.
1 Assignment
0 Petitions
Accused Products
Abstract
A technique is presented for enhancing performance of distributed applications. A sender loop thread in a sending node for sending messages to a destination node is provided with two different opportunities to gain access to the CPU. A batching priority is provided such that when a predetermined number of messages are in a queue for sending to the destination node, the sender loop thread is provided with access to the CPU. Further, the sender loop thread may gain access to the CPU when processing within the sending node is at a relative lull and any number of messages are waiting to be sent within the sending queue. This combination of techniques ensures that when a sufficient number of messages for batching are ready to be sent, they will be sent with minimal delay, while alternatively, if the number of messages have not reached the threshold for batching, but processing is at a relative lull, the messages will be sent anyway, thus utilizing the CPU and preventing unnecessary slowdowns in performance of the distributed application.
72 Citations
14 Claims
-
1. In a computing environment executing a distributed application in at least a first address space and a second address space, a system for causing a sender thread in the first address space to send messages intended for the second address space to the second address space via a network, comprising:
-
a sending queue in the first address space for receiving messages from threads in the first address space bound for the second address space; first means for determining whether a number of messages in said sending queue is greater than or equal to a predetermined number, and if so, causing the sender thread to send the messages in said sending queue to the second node in a single packet; and second means for determining whether at least one message is present in said sending queue, and if so, and if no higher priority thread is ready to run, causing the sender thread to send all of the messages in the said sending queue to the second address space in a single packet. - View Dependent Claims (2, 3)
-
-
4. Computer readable code for sending messages from a first node to a second node, comprising:
-
first subprocesses in the first node for determining whether a number of messages in a send queue is equal to at least a predetermined number, and if so, causing the messages to be sent to the second node; and second subprocesses in the first node for causing all messages in the send queue to be sent to the second node when at least one message is in the send queue. - View Dependent Claims (5, 6, 7, 8, 9, 10)
-
-
11. A method for sending messages from threads in a first node bound for a second node, comprising the steps of:
-
receiving messages bound for the second node from the threads of the first node in a send queue in the first node; determining whether a number of messages in the send queue is equal to at least a predetermined number and, if so, causing the messages to be sent to the second node, said determining step having a first priority for execution; setting a semaphore so that a scheduler which delegates processing time to threads in the first node knows that a message is waiting to be sent in the send queue when the send queue receives a message from one of the threads; and sending any messages in the send queue to the second node in response to setting of the semaphore, said sending step having a second priority for execution. - View Dependent Claims (12, 13, 14)
-
Specification