On 15/09/2015 21:42, Rémy Maucherat wrote: > 2015-09-15 22:28 GMT+02:00 Mark Thomas <ma...@apache.org>: > >>> Sounds like a false positive to me. There are numerous implicit >> synchronizations in the above sequence, so the volatile is not particularly >> useful (but it's not terribly expensive either). >> >> Thanks. I'll revert that fix and resolve it as invalid. >> > OTOH since you're in that section, the TCK prefers if the background check > for session expiration is run once per second. How epensive is it ? It > would make that algorithm a lot simpler.
It has to iterate through every single connection. The check shouldn't be that expensive and it looks like there are a few optimisations we could apply if necessary. The most expensive part is sending the close messages (which uses blocking I/O). I suspect that at scale this will become a bottleneck. Some form of dispatch to a separate thread will probably be required. That is likely to add more complexity than will be removed if we go to a check every second. I'm wary of premature optimisation here. We probably need to come up with some sort of load test (probably one that emulates slow clients) to figure out how much of an issue this is. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org