EllisLab/CodeIgniter — pull request #1549 by chrisguiney (2012-06-29 05:16:02+00:00)
Title: Allow session garbace collection percentage to be configured.

A hardcoded value of 5% is way too often for a large scale site, especially if you're getting bursts of traffic.

I'd personally like to see the probability calculated more along the lines of

rand()/divisor < probability, so you can have a percentage of less than one, but greater than 0.

Without that kind of granularity, I've found it's actually more efficient to run a cron job every minute to clean up stale sessions.

Any opinions on the matter?