Browse Source

[Minor] Jitter backpressure

pull/4939/head
Vsevolod Stakhov 1 week ago
parent
commit
26ac157abc
No account linked to committer's email address
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      src/plugins/fuzzy_check.c

+ 2
- 0
src/plugins/fuzzy_check.c View File

@@ -2681,6 +2681,7 @@ fuzzy_check_timer_callback(int fd, short what, void *arg)
double backpressure_time = MAX(session->rule->io_timeout * 0.1, 0.1) * session->retransmits;
/* Do not make delay more than 500ms for performance considerations */
backpressure_time = MIN(backpressure_time, 0.5);
backpressure_time = rspamd_time_jitter(backpressure_time * 0.5, 0.0);
/* Inverse to distinguish */
msg_debug_fuzzy_check("backpressure for %.2f milliseconds (server=%s), retransmits: %d;",
backpressure_time * 1000,
@@ -2868,6 +2869,7 @@ fuzzy_controller_timer_callback(int fd, short what, void *arg)
double backpressure_time = MAX(session->rule->io_timeout * 0.1, 0.1) * session->retransmits;
/* Do not make delay more than 500ms for performance considerations */
backpressure_time = MIN(backpressure_time, 0.5);
backpressure_time = rspamd_time_jitter(backpressure_time * 0.5, 0.0);
/* Inverse to distinguish */
msg_debug_fuzzy_check("backpressure for %.2f milliseconds (server=%s), retransmits: %d;",
backpressure_time * 1000,

Loading…
Cancel
Save