Re: [Proxool-developer] Temporary creation of connections when maximum connection has been reached
UNMAINTAINED!
Brought to you by:
billhorsman
From: Bill H. <bi...@lo...> - 2005-07-15 19:07:44
|
Hi Diarmuid, Diarmuid McDonald wrote: > I think the Oracle use of Dynamic scheme is related to performance on > heavy load applications. Creating new connections afresh when under heavy load would seem to be a bad idea. > I am not 100% certain how it makes a difference, but Im sure Oracle > have their reasons. They may do. They may not. It might just something that someone put in a long time ago without thinking it through. Having said that, as long as it was turned off by default I don't see it causing any problems. > I just have another quick question about the > maximum-connection-lifetime. Is there any logic in proxool, that if a > heavy load application creates connections at the same time on > startup, does it stagger the refreshing of the connections in the > pool, to ensure that there is not a spike in the delay time of the > application. No there isn't. Connections would tend to be created in waves as you describe. It would gradually become more even though. I like the idea of solving that. How about: 1. Never expire more than 25% of the connections in any one sweep unless we have too (see rule 2). 2. Force the expiry of a connection if delaying it until the next sweep will make it more than 1.25 older than the expire time regardless of how many connections you have already expired in that sweep. I think we can improve on that algorithm too. If the lifetime is 4 hours then we could happily delay an expiry for 10 minutes I would think. I think this might be a new configuration property called expiry-leniency or something. So, for example, if you have 10 connections all due for expiry after 30 minutes they would be expired in four goes, 30 seconds apart. Note that we aren't breaking a contract by delaying the expiry. At least, no more so than we do already. We only agree to expire them soon after their maximum-connection-lifetime. In the existing code, under the default configuration, the connections can last up to 30 seconds or so longer than the maximum-connection-lifetime. - Bill |