On Mon, Mar 20, 2006 at 10:57:42AM +0100, Nico Prenzel wrote:
> Mon Mar 20 03:21:09 2006 [28542] dbg: bayes: DB expiry: tokens in DB: 
> 208101, Expiry max size: 150000, Oldest atime: 1114657202, Newest atime: 
> 1142821269, Last expire: 1142766961, Current time: 1142821269
> Mon Mar 20 03:21:09 2006 [28542] dbg: bayes: expiry check keep size, 0.75 
> * max: 112500
> Mon Mar 20 03:21:09 2006 [28542] dbg: bayes: token count: 208101, final 
> goal reduction size: 95601
> Mon Mar 20 03:21:09 2006 [28542] dbg: bayes: first pass?  current: 
> 1142821269, Last: 1142766961, atime: 0, count: 0, newdelta: 0, ratio: 0, 
> period: 43200
> Mon Mar 20 03:21:09 2006 [28542] dbg: bayes: can't use estimation method 
> for expiry, unexpected result, calculating optimal atime delta (first 
> pass)

(fwiw, this is pretty well documented in the sa-learn man page/pod)

Ok, so basically you want to keep 112500 tokens, and you have 208101, meaning
you want to get rid of 95601.  An expire hasn't happened before, so estimation
won't work onto the first pass to determine the atime delta.

> Mon Mar 20 03:22:15 2006 [28542] dbg: bayes: atime_token reduction
> Mon Mar 20 03:22:15 2006 [28542] dbg: bayes: ========_===============
> Mon Mar 20 03:22:15 2006 [28542] dbg: bayes: 43200_349041
[...]
> Mon Mar 20 03:22:15 2006 [28542] dbg: bayes: 22118400_139879
> Mon Mar 20 03:22:15 2006 [28542] dbg: bayes: couldn't find a good delta 
> atime, need more token difference, skipping expire

So we only want to get rid of 95601 tokens, but at the maximum atime delta
(256 days), we'd get rid of 139879, which is too many.  Therefore we
can't do an expire.

> How do I get around that problem and recude the tokens for that user? 
> (BTW: I don't want to clear all tokens for that user!)

From the sa-learn doc:

     - the largest atime (smallest reduction count) would expire too many
       tokens.  this means the learned tokens are mostly old and there needs
       to be new tokens learned before an expire can occur.

it turns out that the answer for pretty much all expiration "issues" is to
learn more tokens. :)   By learning more tokens, either tokens that haven't
been seen in a while will become "new", thereby lowering the reduction count
(139879 gets closer to 95601), or you learn new tokens which means you can
expire more (95601 gets closer to 139879), or both and you meet in the middle.

-- 
Randomly Generated Tagline:
"Without question, the greatest invention in the history of mankind is
 beer. Oh, I grant you that the wheel was also a fine invention, but the
 wheel does not go nearly as well with pizza." - Dave Barry

Attachment: pgpcNN9hToA8b.pgp
Description: PGP signature

Reply via email to