Mechanism for implementing multiple thread pools in a computer system to optimize system performance
First Claim
1. A computer implemented method for servicing a request, comprising:
- allocating a first thread pool, said first thread pool comprising one or more threads, with each thread in said first thread pool having a first stack size;
allocating a second thread pool, said second thread pool comprising one or more threads, with each thread in said second thread pool having a second stack size;
receiving a request;
processing said request to determine an operational thread pool with which to associate said request, wherein said operational thread pool is one of said first and second thread pools; and
using a thread from said operational thread pool to carry out servicing of said request;
wherein the first stack size differs from the second stack size.
3 Assignments
0 Petitions
Accused Products
Abstract
A mechanism is disclosed for implementing multiple thread pools in a computer system to optimize system performance. In accordance with the invention, a plurality of thread pools is initially allocated within a process space, with each thread pool comprising one or more threads. Each thread pool has a set of characteristics associated therewith, and the characteristics of each thread pool are customized for one or more particular types of service. After the thread pools have been allocated, the system receives one or more requests. When a request is received, it is processed to determine with which thread pool the request is to be associated. This processing is carried out by determining the type of service being requested by the request, and then determining which thread pool is associated with that type of service. Alternatively, this processing is carried out by extracting a set of indication information (e.g. a universal resource identifier) from the request, and then determining which thread pool is associated with that set of indication information. Once the proper thread pool is determined, a thread from that thread pool is used to carry out servicing of the request. Because the request is serviced using a thread from the thread pool customized for the type of service requested, the servicing of the request is optimized. This in turn optimizes system performance.
137 Citations
39 Claims
-
1. A computer implemented method for servicing a request, comprising:
-
allocating a first thread pool, said first thread pool comprising one or more threads, with each thread in said first thread pool having a first stack size;
allocating a second thread pool, said second thread pool comprising one or more threads, with each thread in said second thread pool having a second stack size;
receiving a request;
processing said request to determine an operational thread pool with which to associate said request, wherein said operational thread pool is one of said first and second thread pools; and
using a thread from said operational thread pool to carry out servicing of said request;
wherein the first stack size differs from the second stack size. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
receiving a second request;
processing said second request to determine a second operational thread pool with which to associate said second request, wherein said second operational thread pool is one of said first and second thread pools; and
using a thread from said second operational thread pool to carry out servicing of said second request.
-
-
7. The method of claim 6, wherein said second request is a request for a second particular type of service, and wherein said second operational thread pool has a second set of characteristics that are customized for said second particular type of service.
-
8. The method of claim 1, wherein processing said request comprises:
-
determining, based upon said request, a type of service requested by said request; and
determining which one of said first and second thread pools is associated with said type of service.
-
-
9. The method of claim 1, wherein processing said request comprises:
-
extracting from said request a set of indication information; and
determining which one of said first and second thread pools is associated with said set of indication information.
-
-
10. The method of claim 9, wherein said set of indication information comprises a universal resource identifier (URI).
-
11. The method of claim 1, wherein allocating comprises:
-
accessing a set of configuration information, said configuration information specifying a set of characteristics associated with each of said first and second thread pools; and
allocating each of said first and second thread pools in accordance with the set of characteristics associated with the thread pool being allocated.
-
-
12. The method of claim 11, wherein said set of configuration information is specifiable by a user.
-
13. The method of claim 1, wherein processing said request comprises:
-
determining the stack size of said threads within each of said first and second thread pools; and
choosing said operational thread pool from said first and second thread pools based on a determination of an optimal thread stack size for processing the request.
-
-
14. An apparatus for servicing a request, comprising:
-
a mechanism for allocating a first thread pool, said first thread pool comprising one or more threads, with each thread in said first thread pool having a first stack size;
a mechanism for allocating a second thread pool, said second thread pool comprising one or more threads, with each thread in said second thread pool having a second stack size;
a mechanism for receiving a request;
a mechanism for processing said request to determine an operational thread pool with which to associate said request, wherein said operational thread pool is one of said first and second thread pools; and
a mechanism for using a thread from said operational thread pool to carry out servicing of said request;
wherein the first stack size differs from the second stack size. - View Dependent Claims (15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26)
a mechanism for receiving a second request;
a mechanism for processing said second request to determine a second operational thread pool with which to associate said second request, wherein said second operational thread pool is one of said first and second thread pools; and
a mechanism for using a thread from said second operational thread pool to carry out servicing of said second request.
-
-
20. The apparatus of claim 19, wherein said second request is a request for a second particular type of service, and wherein said second operational thread pool has a second set of characteristics that are customized for said second particular type of service.
-
21. The apparatus of claim 14, wherein the mechanism for processing said request comprises:
-
a mechanism for determining, based upon said request, a type of service requested by said request; and
a mechanism for determining which one of said first and second thread pools is associated with said type of service.
-
-
22. The apparatus of claim 14, wherein the mechanism for processing said request comprises:
-
a mechanism for extracting from said request a set of indication information; and
a mechanism for determining which one of said first and second thread pools is associated with said set of indication information.
-
-
23. The apparatus of claim 22, wherein said set of indication information comprises a universal resource identifier (URI).
-
24. The apparatus of claim 14, wherein the mechanism for allocating comprises:
-
a mechanism for accessing a set of configuration information, said configuration information specifying a set of characteristics associated with each of said first and second thread pools; and
a mechanism for allocating each of said first and second thread pools in accordance with the set of characteristics associated with the thread pool being allocated.
-
-
25. The apparatus of claim 24, wherein said set of configuration information is specifiable by a user.
-
26. The apparatus of claim 14, wherein the mechanism for processing said request comprises:
-
a mechanism for determining the stack size of said threads within each of said first and second thread pools; and
a mechanism for choosing said operational thread pool from said first and second thread pools based on a determination of an optimal thread stack size for processing the request.
-
-
27. A computer readable medium having stored thereon instructions which, when executed by one or more processors, cause the one or more processors to service a request, said computer readable medium comprising:
-
instructions for causing one or more processors to allocate a first thread pool, said first thread pool comprising one or more threads, with each thread in said first thread pool having a first stack size;
instructions for causing one or more processors to allocate a second thread pool, said second thread pool comprising one or more threads, with each thread in said second thread pool having a second stack size;
instructions for causing one or more processors to receive a request;
instructions for causing one or more processors to process said request to determine an operational thread pool with which to associate said request, wherein said operational thread pool is one of said first and second thread pools; and
instructions for causing one or more processors to use a thread from said operational thread pool to carry out servicing of said request;
wherein the first stack size differs from the second stack size. - View Dependent Claims (28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39)
instructions for causing one or more processors to receive a second request;
instructions for causing one or more processors to process said second request to determine a second operational thread pool with which to associate said second request, wherein said second operational thread pool is one of said first and second thread pools; and
instructions for causing one or more processors to use a thread from said second operational thread pool to carry out servicing of said second request.
-
-
33. The computer readable medium of claim 32, wherein said second request is a request for a second particular type of service, and wherein said second operational thread pool has a second set of characteristics that are customized for said second particular type of service.
-
34. The computer readable medium of claim 27, wherein the instructions for causing one or more processors to process said request comprises:
-
instructions for causing one or more processors to determine, based upon said request, a type of service requested by said request; and
instructions for causing one or more processors to determine which one of said first and second thread pools is associated with said type of service.
-
-
35. The computer readable medium of claim 27, wherein the instructions for causing one or more processors to process said request comprises:
-
instructions for causing one or more processors to extract from said request a set of indication information; and
instructions for causing one or more processors to determine which one of said first and second thread pools is associated with said set of indication information.
-
-
36. The computer readable medium of claim 35, wherein said set of indication information comprises a universal resource identifier (URI).
-
37. The computer readable medium of claim 27, wherein the instructions for causing one or more processors to allocate comprises:
-
instructions for causing one or more processors to access a set of configuration information, said configuration information specifying a set of characteristics associated with each of said first and second thread pools; and
instructions for causing one or more processors to allocate each of said first and second thread pools in accordance with the set of characteristics associated with the thread pool being allocated.
-
-
38. The computer readable medium of claim 37, wherein said set of configuration information is specifiable by a user.
-
39. The computer readable medium of claim 27, wherein the instructions for causing one or more processors to process said request comprises:
-
instructions for causing one or more processors to determine the stack size of said threads within each of said first and second thread pools; and
instructions for causing one or more processors to choose said operational thread pool from said first and second thread pools based on a determination of an optimal thread stack size for processing the request.
-
Specification