# Middle Relay Only

**URL:** https://forum.torproject.org/t/middle-relay-only/5724
**Category:** Relay Operator
**Created:** [November 29, 2022, 12:20pm UTC](https://forum.torproject.org/t/middle-relay-only/5724 "2022-11-29T12:20:01Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![cybermonkee](https://forum.torproject.org/letter_avatar_proxy/v4/letter/c/ad7895/32.png) [@cybermonkee](https://forum.torproject.org/u/cybermonkee)
#### Post date: [November 29, 2022, 12:20pm UTC](https://forum.torproject.org/t/middle-relay-only/5724/1 "2022-11-29T12:20:01Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![gus](https://forum.torproject.org/user_avatar/forum.torproject.org/gus/32/16_2.png) [@gus](https://forum.torproject.org/u/gus)
#### Post date: [November 29, 2022, 12:54pm UTC](https://forum.torproject.org/t/middle-relay-only/5724/2 "2022-11-29T12:54:08Z")

</div>

Why do you want to run a middle only relay?

---

<div class="post-metadata">

### Author: ![cybermonkee](https://forum.torproject.org/letter_avatar_proxy/v4/letter/c/ad7895/32.png) [@cybermonkee](https://forum.torproject.org/u/cybermonkee)
#### Post date: [November 29, 2022, 3:19pm UTC](https://forum.torproject.org/t/middle-relay-only/5724/3 "2022-11-29T15:19:22Z")

</div>

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).

---

<div class="post-metadata">

### Author: ![Vort](https://forum.torproject.org/user_avatar/forum.torproject.org/vort/32/63_2.png) [@Vort](https://forum.torproject.org/u/Vort)
#### Post date: [November 29, 2022, 3:30pm UTC](https://forum.torproject.org/t/middle-relay-only/5724/4 "2022-11-29T15:30:08Z")

</div>

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:

```auto
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.

---

<div class="post-metadata">

### Author: ![cybermonkee](https://forum.torproject.org/letter_avatar_proxy/v4/letter/c/ad7895/32.png) [@cybermonkee](https://forum.torproject.org/u/cybermonkee)
#### Post date: [November 29, 2022, 3:51pm UTC](https://forum.torproject.org/t/middle-relay-only/5724/5 "2022-11-29T15:51:33Z")

</div>

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

---

<div class="post-metadata">

### Author: ![cybermonkee](https://forum.torproject.org/letter_avatar_proxy/v4/letter/c/ad7895/32.png) [@cybermonkee](https://forum.torproject.org/u/cybermonkee)
#### Post date: [November 29, 2022, 3:55pm UTC](https://forum.torproject.org/t/middle-relay-only/5724/6 "2022-11-29T15:55:08Z")

</div>

See here for one explanation of this: [[tor-relays] preventing DDoS is more than just network filtering](https://forum.torproject.org/t/tor-relays-preventing-ddos-is-more-than-just-network-filtering/5456)

---

<div class="post-metadata">

### Author: ![Vort](https://forum.torproject.org/user_avatar/forum.torproject.org/vort/32/63_2.png) [@Vort](https://forum.torproject.org/u/Vort)
#### Post date: [November 29, 2022, 4:01pm UTC](https://forum.torproject.org/t/middle-relay-only/5724/7 "2022-11-29T16:01:51Z")

</div>

> [@cybermonkee](#):
>
> I thought the NumCPUs just created threads and had no relation to actual physical CPUs?

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.

---

<div class="post-metadata">

### Author: ![GeKo](https://forum.torproject.org/user_avatar/forum.torproject.org/geko/32/4372_2.png) [@GeKo](https://forum.torproject.org/u/GeKo)
#### Post date: [November 30, 2022, 10:13am UTC](https://forum.torproject.org/t/middle-relay-only/5724/8 "2022-11-30T10:13:13Z")

</div>

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](https://blog.torproject.org/blog/lifecycle-of-a-new-relay), in particular  
phase 3

---

<div class="post-metadata">

### Author: ![cybermonkee](https://forum.torproject.org/letter_avatar_proxy/v4/letter/c/ad7895/32.png) [@cybermonkee](https://forum.torproject.org/u/cybermonkee)
#### Post date: [November 30, 2022, 1:08pm UTC](https://forum.torproject.org/t/middle-relay-only/5724/9 "2022-11-30T13:08:00Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![adn](https://forum.torproject.org/letter_avatar_proxy/v4/letter/a/ce7236/32.png) [@adn](https://forum.torproject.org/u/adn)
#### Post date: [November 30, 2022, 10:19pm UTC](https://forum.torproject.org/t/middle-relay-only/5724/10 "2022-11-30T22:19:57Z")

</div>

you can become a middle only relay by setting

DirCache 0

in your torrc.

---

<div class="post-metadata">

### Author: ![system](https://forum.torproject.org/uploads/default/original/2X/d/d3424bed34f4ec18b2e99178c2801ba6dfb655d6.png) [@system](https://forum.torproject.org/u/system)
#### Post date: [December 1, 2022, 10:20am UTC](https://forum.torproject.org/t/middle-relay-only/5724/11 "2022-12-01T10:20:11Z")

</div>

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