- 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
This commit is contained in:
Wouter Wijngaards 2010-06-28 11:42:21 +00:00
parent 595eab57de
commit 0a848d686c
3 changed files with 15 additions and 1 deletions

View file

@ -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 25 June 2010: Wouter
- Fix handling of corner case reply from lame server, follows rfc2308. - 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 It could lead to a nodata reply getting into the cache if the search

View file

@ -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 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 spent more than their allowed time. This protects against denial of
service by slow queries or high query rates. Default 200 milliseconds. 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 .TP
.B so\-rcvbuf: \fI<number> .B so\-rcvbuf: \fI<number>
If not 0, then set the SO_RCVBUF socket option to get more buffer If not 0, then set the SO_RCVBUF socket option to get more buffer

View file

@ -234,7 +234,7 @@ mesh_delete_all(struct mesh_area* mesh)
int mesh_make_new_space(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 */ /* free space is available */
if(mesh->num_reply_states < mesh->max_reply_states) if(mesh->num_reply_states < mesh->max_reply_states)
return 1; return 1;