]> git.ipfire.org Git - thirdparty/haproxy.git/commit
OPTIM: session: don't process the whole session when only timers need a refresh
authorWilly Tarreau <w@1wt.eu>
Thu, 8 Nov 2012 13:49:17 +0000 (14:49 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 8 Nov 2012 15:55:07 +0000 (16:55 +0100)
commit798f4325fa085556bbb7a57b332a5eeab1e6bbd0
tree9dd7804f73d62da1b7a738702952c2fea6299dc9
parent9d5f5480fdf4eac3c1440c377f1b75652a92bc25
OPTIM: session: don't process the whole session when only timers need a refresh

Having a global expiration timer for a task means that the tasks are regularly
woken up (at least after each expiration timer). It's totally useless and counter
productive to process the whole session upon each such wakeup, and it's fairly
easy to detect such wakeups, so let's just update the task's timer and return
to sleep when this happens.

For 100k concurrent connections with 10s of timeouts, this can save 10k wakeups
per second, which is not bad.
src/session.c