#28429 closed defect (implemented)

Make the new "extra dormant" code configurable

Reported by: nickm Owned by: nickm
Priority: Medium Milestone: Tor: 0.4.0.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords:
Cc: nickm Actual Points:
Parent ID: #28335 Points: .5
Reviewer: dgoulet Sponsor: Sponsor8

Description

I think we want at minimum these options:

A way to say how long without activity counts for becoming dormant.

A way to say whether having an open stream with no network traffic on it should keep Tor from becoming dormant.

I think maybe we also want:

A way to say how often to check for becoming dormant.

A way to say that Tor should start out dormant, or should remember dormancy status across invocations?

Child Tickets

Change History (7)

comment:1 in reply to:  description ; Changed 21 months ago by nickm

Replying to nickm:

I think we want at minimum these options:

A way to say how long without activity counts for becoming dormant.

BecomeDormantAfter

Minimum: 10 minutes. Maximum: forever. Default: 24 hours.

A way to say whether having an open stream with no network traffic on it should keep Tor from becoming dormant.

StayAwakeForIdleStreams

Boolean. Default: True.

I think maybe we also want:

A way to say how often to check for becoming dormant.

Maybe not, but if we have this, let's name it "CheckDormantPeriod"

A way to say that Tor should start out dormant

StartInDormantMode

boolean, default false.

or should remember dormancy status across invocations?

Let's have this be a separate ticket if we decide to do it.

comment:2 in reply to:  1 Changed 21 months ago by dgoulet

If we have this concept of a feature that is the "Dormant" feature, I propose a prefix to group those options. The following is more of a brainstorm to get that ball rolling.

Replying to nickm:

Replying to nickm:

I think we want at minimum these options:

A way to say how long without activity counts for becoming dormant.

BecomeDormantAfter

DormantAfter TIME
DormantStateAfter TIME

Minimum: 10 minutes. Maximum: forever. Default: 24 hours.

A way to say whether having an open stream with no network traffic on it should keep Tor from becoming dormant.

StayAwakeForIdleStreams

DormantOffForIdleStreams BOOL
DormantDisabledForIdleStreams BOOL

Boolean. Default: True.

I think maybe we also want:

A way to say how often to check for becoming dormant.

Maybe not, but if we have this, let's name it "CheckDormantPeriod"

DormantCheckPeriod TIME
DormantValidationPeriod TIME

A way to say that Tor should start out dormant

StartInDormantMode

DormantModeOnStart BOOL

boolean, default false.

or should remember dormancy status across invocations?

Let's have this be a separate ticket if we decide to do it.

comment:3 Changed 21 months ago by nickm

Done in e0511fb67f1fda2c041caa31022a1b96fde20c95 on my dormant_v2 branch

I chose DormantClientTimeout and DormantTimeoutDisabledByIdleStreams; I hope they're good.

Not doing the other options yet.

comment:4 Changed 21 months ago by dgoulet

Cc: dgoulet removed
Reviewer: dgoulet
Status: assignedneeds_revision
  • We should put in the minimum in the man page:
+  if (options->DormantClientTimeout < 10*60 && !options->TestingTorNetwork) {
+    REJECT("DormantClientTimeout is too low. It must be at least 10 minutes.");
  • Shouldn't be 24 hours?
+  V(DormantClientTimeout,         INTERVAL, "12 hours"),
  • There is a whole set of new things in that commit that shouldn't be there at all. Seems to be getting out of the dormant state when a client port connection opens? (connection_edge.c). Maybe do an extra commit (or fixup) for this explaining why this is needed in addition to the activity once we accept() a connection also?

comment:5 Changed 21 months ago by nickm

Maybe do an extra commit (or fixup) for this explaining why this is needed in addition to the activity once we accept() a connection also?

It's actually related to this one:

    The DormantTimeoutDisabledByIdleStreams option controls whether open but
    inactive streams count as "client activity".  To implement it, I had to
    make it so that reading or writing on a client stream *always* counts as
    activity.

comment:6 Changed 21 months ago by dgoulet

Status: needs_revisionmerge_ready

lgtm;

We can close once #28335 is merged.

comment:7 Changed 21 months ago by nickm

Resolution: implemented
Status: merge_readyclosed

Merged with parent.

Note: See TracTickets for help on using tickets.