mirror of https://github.com/BOINC/boinc.git
- client: tweak the LTD calculation so that the largest debt
always tends towards zero svn path=/trunk/boinc/; revision=17333
This commit is contained in:
parent
16ca7cd359
commit
7001c6f7c5
|
@ -1870,3 +1870,10 @@ David 20 Feb 2009
|
||||||
lib/
|
lib/
|
||||||
coproc.h
|
coproc.h
|
||||||
boinc_fcgi.cpp,h
|
boinc_fcgi.cpp,h
|
||||||
|
|
||||||
|
David 21 Feb 2009
|
||||||
|
- client: tweak the LTD calculation so that the largest debt
|
||||||
|
always tends towards zero
|
||||||
|
|
||||||
|
client/
|
||||||
|
work_fetch.cpp
|
||||||
|
|
|
@ -527,12 +527,19 @@ void RSC_WORK_FETCH::update_debts() {
|
||||||
// also, if all the debts are large negative we need to gradually
|
// also, if all the debts are large negative we need to gradually
|
||||||
// shift them towards zero.
|
// shift them towards zero.
|
||||||
// To do this, we add an offset as follows:
|
// To do this, we add an offset as follows:
|
||||||
|
// delta_limit is the largest rate at which any project's debt
|
||||||
|
// could increase or decrease.
|
||||||
|
// If the largest debt is close to zero (relative to delta_limit)
|
||||||
|
// than add an offset that will bring it exactly to zero.
|
||||||
|
// Otherwise add an offset of 2*delta_limit,
|
||||||
|
// which will gradually bring all the debts towards zero
|
||||||
//
|
//
|
||||||
double offset;
|
double offset;
|
||||||
if (-max_debt < secs_this_debt_interval) {
|
double delta_limit = secs_this_debt_interval*ninstances;
|
||||||
|
if (-max_debt < 2*delta_limit) {
|
||||||
offset = -max_debt;
|
offset = -max_debt;
|
||||||
} else {
|
} else {
|
||||||
offset = secs_this_debt_interval;
|
offset = 2*delta_limit;
|
||||||
}
|
}
|
||||||
if (log_flags.debt_debug) {
|
if (log_flags.debt_debug) {
|
||||||
msg_printf(0, MSG_INFO, "[debt] %s debt: adding offset %.2f",
|
msg_printf(0, MSG_INFO, "[debt] %s debt: adding offset %.2f",
|
||||||
|
|
Loading…
Reference in New Issue