From 0a848d686cb4da9c26e5df0085cfbae9ead32cf8 Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Mon, 28 Jun 2010 11:42:21 +0000 Subject: [PATCH] - Fix jostle list bug found by Vince (luoce@cnnic), it caused the qps in overload situations to be about 5 qps for the class of shortly serviced queries. The capacity of the resolver is then about (numqueriesperthread / 2) / (average time for such long queries) qps for long queries. And about (numqueriesperthread / 2)/(jostletimeout in whole seconds) qps for short queries, per thread. git-svn-id: file:///svn/unbound/trunk@2170 be551aaa-1e26-0410-a405-d3ace91eadb9 --- doc/Changelog | 9 +++++++++ doc/unbound.conf.5.in | 5 +++++ services/mesh.c | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/doc/Changelog b/doc/Changelog index 2e7cb97a6..a627f78b5 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,12 @@ +28 June 2010: Wouter + - Fix jostle list bug found by Vince (luoce@cnnic), it caused the qps + in overload situations to be about 5 qps for the class of shortly + serviced queries. + The capacity of the resolver is then about (numqueriesperthread / 2) + / (average time for such long queries) qps for long queries. + And about (numqueriesperthread / 2)/(jostletimeout in whole seconds) + qps for short queries, per thread. + 25 June 2010: Wouter - Fix handling of corner case reply from lame server, follows rfc2308. It could lead to a nodata reply getting into the cache if the search diff --git a/doc/unbound.conf.5.in b/doc/unbound.conf.5.in index f33da11af..614bd4f19 100644 --- a/doc/unbound.conf.5.in +++ b/doc/unbound.conf.5.in @@ -214,6 +214,11 @@ arrive, then 50% of the queries are allowed to run to completion, and the other 50% are replaced with the new incoming query if they have already spent more than their allowed time. This protects against denial of service by slow queries or high query rates. Default 200 milliseconds. +The effect is that the qps for long-lasting queries is about +(numqueriesperthread / 2) / (average time for such long queries) qps. +The qps for short queries can be about (numqueriesperthread / 2) +/ (jostletimeout in whole seconds) qps per thread, about (1024/2)*5 = 2560 +qps by default. .TP .B so\-rcvbuf: \fI If not 0, then set the SO_RCVBUF socket option to get more buffer diff --git a/services/mesh.c b/services/mesh.c index a25f221a0..ca899ce98 100644 --- a/services/mesh.c +++ b/services/mesh.c @@ -234,7 +234,7 @@ mesh_delete_all(struct mesh_area* mesh) int mesh_make_new_space(struct mesh_area* mesh) { - struct mesh_state* m = mesh->jostle_last; + struct mesh_state* m = mesh->jostle_first; /* free space is available */ if(mesh->num_reply_states < mesh->max_reply_states) return 1; -- 2.47.2