@eyedeekay
+R4SAS
+RN
+RN_
+Xeha
+orignal
FreeRider
Irc2PGuest22478
Irc2PGuest48042
Onn4l7h
Onn4|7h
T3s|4_
aargh3
acetone_
anon4
eyedeekay_bnc
not_bob_afk
profetikla
shiver_1
u5657
weko_
x74a6
zzz
getting a surprising number of unknown tokens in session request
zzz
trying to figure out why
zzz
cache too small or expiration too long or bugs or what
zzz
orignal, what's the max number of tokens you remember?
zzz
ok, I remember 512 tokens and give them out with an expiration of one hour, but they're being evicted after 20 minutes
dr|z3d
cache too small?
dr|z3d
and/or expiration too long. sounds like expiration might be too long for 512 entries.
zzz
and this is on a router with only about 200 ssu2 conns
zzz
I'm going to have to make it a lot smarter
zzz
its not just the added latency, we're forcing a 2nd keygen and DH on alice
dr|z3d
is 4096 cache entries excessive?
dr|z3d
I guess you could just bump the cache up dynamically as required, and shrink when not in use a la byte caches?
zzz
LHMCache doesn't work like that
zzz
I'm going to measure average eviction time and set the expiration to that
zzz
and probably size the cache based on max connections
dr|z3d
can you vary the eviction period dynamically based on averages?
zzz
the expiration, not the eviction.
dr|z3d
yeah, right, that's what I meant.
dr|z3d
is it graphable yet, or that's a TODO?
zzz
everything is todo
dr|z3d
:)
dr|z3d
> zzz: you mentioned 1 hour expiration for session tokens..
dr|z3d
> maybe I'm barking up the wrong tree, but I'm seeing: public static final long IB_TOKEN_EXPIRATION = 2*60*60*1000L;
zzz
true, but there's some halfassery below that cuts it in half when the cache starts to fill up
dr|z3d
ah, ok, missed that.
dr|z3d
right, see it.
dr|z3d
if (expiration > 2*60*1000 && _inboundTokens.size() > MAX_TOKENS / 2)
dr|z3d
expiration /= 2;
dr|z3d
ok, another thing.
dr|z3d
apparently tokens are stored in ~/.i2p/ssu2tokens.txt but I'm not seeing any evidence of that file.
dr|z3d
it looks like they're loaded at the router session start and then the file's deleted?
zzz
yup, stop yer router to take a peek ))
dr|z3d
roger that, over :)