Abstract:
In accordance with embodiments, there are provided mechanisms and methods for facilitating sliding window resource tracking in message queues for fair management of resources for application servers in an on-demand services environment. In one embodiment and by way of example, a method includes monitoring, in real-time, in-flight jobs in message queues for incoming jobs from organizations in a distributed environment having application servers in communication over a network, applying local sliding windows to the message queues to estimate wait time associated with each incoming job in a message queue. A local sliding window may include segment of time being monitored in each message queue for estimating the wait time. The method may further include allocating, in real-time, based on the estimated wait time, thread resources to one or more of the incoming jobs associated with the one or more of the organizations.
Abstract:
In accordance with embodiments, there are provided mechanisms and methods for facilitating an auction-based fair allocation and usage of thread resources for user messages according to one embodiment in an on-demand services environment. In one embodiment and by way of example, a method includes receiving job requests and bids from a plurality of organizations over a network, where each job request and the corresponding bid is placed by a user associated with an organization having a resource currency value within a multi-tenant database system via a user interface at a computing device over the network, determining resource currency values associated with pending jobs relating to the plurality of organizations, wherein the resource currency values corresponds to resources dedicated to the pending jobs, and performing an auction of the received bids for resources that are not dedicated and remains available for purchase, where a bid includes a purchase request to purchase the available resources. The method may further include prioritizing the job requests based on the dedicated resources and the auction of the available resources, and processing the job requests based on the prioritized job requests.