Если у Вас есть два списка, названные и 'b', можно сделать: [m - n for m,n in zip(a,b)]
You first need to determine what the pool will do if a request comes in and there is no free connection to serve it. Does it throw an exception? Return null? Block until another connection is returned to the pool?
Once you know what will happen when the capacity is exceeded, think about how you could deal with this in the calling code, and in what situations it is acceptable for this to happen. At some point as the number of connections increases you're going to have to start refusing to serve some requests, but only you can decide what that point is. The actual point depends on a lot of factors, including such things as
And so on and so forth.
Hopefully from the above you should be able to come up with the number of requests you need to be able to process concurrently (and if there are different types of request, you may need to take this into concern too). Then it's just a matter of looking at how the incoming requests acquire and use connections, reasoning and profiling until you discover the number of connections in the pool that is required to sustain your target rate of connections.
Don't forget to account for things like non-request threads (e.g. worker pools) getting their own connections from the same pool (pool needs to be bigger), as well as requests only holding a connection for part of their execution (pool can be smaller).
Профилируйте свои тестовые экземпляры, внося небольшие изменения в конфигурацию, а затем, наконец, проверьте с помощью нагрузочного тестирования.