Compare commits

..

2 Commits

Author SHA1 Message Date
Ondřej Surý
1334948345 amend! Reduce QPDB_VIRTUAL to 30 seconds
Reduce QPDB_VIRTUAL to 10 seconds

The *DB_VIRTUAL value was introduced to allow the clients (presumably
ns_clients) that has been running for some time to access the cached
data that was valid at the time of its inception.  The default value
of 5 minutes is way longer than longevity of the ns_client object as
the resolver will give up after 2 minutes.

Reduce the value to 10 seconds to accomodate to honour the original
more closely, but still allow some leeway for clients that started some
time in the past.

Our measurements show that even setting this value to 0 has no
statistically significant effect, thus the value of 10 seconds should be
on the safe side.
2025-03-21 12:24:15 +01:00
Ondřej Surý
7d07d3d6f4 Reduce QPDB_VIRTUAL to 30 seconds
The *DB_VIRTUAL value was introduced to allow the clients (presumably
ns_clients) that has been running for some time to access the cached
data that was valid at the time of its inception.  The default value
of 5 minutes is way longer than longevity of the ns_client object as
the resolver will give up after 2 minutes.

Reduce the value to 30 seconds to accomodate to honour the original
more closely, but still allow some leeway for clients that started some
time in the past.

Our measurements show that even setting this value to 0 has no
statistically significant effect, thus the value of 30 seconds should be
on the safe side.
2025-03-21 11:22:55 +01:00
3 changed files with 528 additions and 457 deletions

View File

@@ -32,7 +32,6 @@
#define NODE_LOCK(l, t, tp) \
{ \
STRONG_RWLOCK_CHECK(*tp == isc_rwlocktype_none); \
rcu_read_lock(); \
RWLOCK((l), (t)); \
*tp = t; \
}
@@ -40,7 +39,6 @@
{ \
STRONG_RWLOCK_CHECK(*tp != isc_rwlocktype_none); \
RWUNLOCK(l, *tp); \
rcu_read_unlock(); \
*tp = isc_rwlocktype_none; \
}
#define NODE_RDLOCK(l, tp) NODE_LOCK(l, isc_rwlocktype_read, tp);
@@ -48,13 +46,10 @@
#define NODE_TRYLOCK(l, t, tp) \
({ \
STRONG_RWLOCK_CHECK(*tp == isc_rwlocktype_none); \
rcu_read_lock(); \
isc_result_t _result = isc_rwlock_trylock(l, t); \
if (_result == ISC_R_SUCCESS) { \
*tp = t; \
} else { \
rcu_read_unlock(); \
} \
}; \
_result; \
})
#define NODE_TRYRDLOCK(l, tp) NODE_TRYLOCK(l, isc_rwlocktype_read, tp)

View File

@@ -43,8 +43,6 @@
#include <stdbool.h>
#include <urcu/rculfhash.h>
#include <isc/atomic.h>
#include <isc/heap.h>
#include <isc/stdtime.h>
@@ -105,31 +103,22 @@ struct dns_slabheader {
*/
union {
struct {
struct cds_lfht_node ht_node;
struct rcu_head rcu_head;
};
struct {
union {
struct dns_slabheader *next;
struct dns_slabheader *up;
};
/*%<
* If this is the top header for an rdataset, 'next'
* points to the top header for the next rdataset (i.e.,
* the next type).
*
* Otherwise 'up' points up to the header whose down
* pointer points at this header.
*/
struct dns_slabheader *down;
/*%<
* Points to the header for the next older version of
* this rdataset.
*/
};
struct dns_slabheader *next;
struct dns_slabheader *up;
};
/*%<
* If this is the top header for an rdataset, 'next' points
* to the top header for the next rdataset (i.e., the next type).
*
* Otherwise 'up' points up to the header whose down pointer points at
* this header.
*/
struct dns_slabheader *down;
/*%<
* Points to the header for the next older version of
* this rdataset.
*/
dns_db_t *db;
dns_dbnode_t *node;

File diff suppressed because it is too large Load Diff