1. A method of managing a resource pool comprising a dynamic number of resource instances executing work requests from a work queue, the number of thread instances in the resource pool based on a control setting which specifies a desired number of resources to be in the pool, the method comprising: retaining measurement information of the resource pool including a previous history of throughput measurements for a previous control setting and a current history of throughput measurements for a current control setting such that when a new control setting is established the current history becomes the previous history and the new control setting becomes the current control setting; entering an initializing state, the initializing state comprising: collecting throughput measurements of the thread pool operating at the current control setting until there is a plurality of throughput measurements in the current history and there is less than a selected threshold of variance for a mean throughput of the current history; and when there is less than the selected threshold of variance, establishing a first new control setting as the current control setting and exiting the initializing state; and in response to exiting the initializing state, entering a climbing state, the climbing state comprising: collecting throughput measurements of the resource pool operating at the current control setting until there is a plurality of throughput measurements in the current history and there is less than the selected threshold of variance for the mean throughput of the current history; when there is less than the selected threshold of variance, estimating, via stochastic gradient approximation, the slope of a point on an instance-throughput curve using the previous history, the previous control setting, the current history, and the current control setting, the instance-throughput curve relating the number of thread instances in the thread pool to throughput of the resource pool and the point corresponding to the desired number of resources specified in the current control setting; when the estimated slope is zero, reentering the climbing state; and when the estimated slope is not zero, calculating a next new control setting using the estimated slope, establishing the calculated next new control setting as the current control setting, and reentering the climbing state; the collecting throughput measurements in the initializing state and in the climbing state comprising receiving, from a measurement interface of the resource pool, a plurality of throughput measurements and for each received throughput measurement: receiving, from the measurement interface, an actual number of resources representing the number of resource instances executing work requests in the resource pool when the received throughput measurement was taken; comparing the desired number of resources specified in the current control setting to the actual number of resources; discarding the received throughput measurement if either the desired number of resources is less than the actual number of resources or the desired number of threads is greater than the actual number of resources and the work queue is not empty; adding the received throughput measurement to the current history if the received throughput measurement was not discarded; determining, by applying a change-point detection technique to the throughput measurements in the current history, whether the shape of the instance-throughput curve has changed; and in response to determining the shape of the instance-throughput curve has changed, deleting the previous and current history and reentering the initializing state.