Middle Relay Only

Is there a way of configuring the torrc so that the relay can be used just as a middle relay and not a guard or an exit?

Why do you want to run a middle only relay?

Hi Gus,

I am currently running two instances, they currently both run as guards, but what I have noticed is that as soon as a relay gets a guard flag that the number of circuit requests and onion skins gets dropped. I would like the ability to only run one guard, with my other instance to run just as a middle node - as this would reduce the demand on the system resources - and therefore allow me to manage the stability of my host(s).

Increased resource usage is not a property of guard.
It is just guards are more DDoSed nowadays.

You may try to limit resource usage of guard like this:

NumCPUs 1
MaxMemInQueues 1 GB

Also it is possible in Windows to force process to use single core (NumCPUs 1 actually means limit to 3 cores). Maybe something similar is possible for other OSes too.

1 Like

I thought the NumCPUs just created threads and had no relation to actual physical CPUs?

See here for one explanation of this: [tor-relays] preventing DDoS is more than just network filtering

I think that CPUs there may be for historical reasons.
It controls amount of threads and consequentially amount of used CPU cores.

If relay operator want to free some cores for other tasks, this option may be useful.

jim via Tor Project Forum:

Hi Gus,

I am currently running two instances, they currently both run as guards, but what I have noticed is that as soon as a relay gets a guard flag that the number of circuit requests and onion skins gets dropped. I would like the ability to only run one guard, with my other instance to run just as a middle node - as this would reduce the demand on the system resources - and therefore allow me to manage the stability of my host(s).

That drop in circuit requests (and onion skins) is probably expected.
See the blog post about the lifecycle of a relay,
The lifecycle of a new relay | The Tor Project, in particular
phase 3

1 Like

Hey GeKo - thanks for your response.

I am aware of the life cycle of a relay paper, both my relays are known to the authorities for longer than 120 days. Please note that what I am observing isn’t a ‘drop in traffic’ - it is a drop in onion skins, as in the the relays are overloaded due to the ddos.

1 Like

you can become a middle only relay by setting

DirCache 0

in your torrc.

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.