General help needed

Background To My Questions:

I recently set up a Tor middle relay on a VPS with 1 GB of RAM, expecting it to be sufficient. However, the relay is using up all available resources, causing performance issues. Tweaking the bandwidth parameters slightly reduced resource usage, but I’m still facing limitations. By not removing SSH and installing a firewall(ufw) with Fail2ban greatly reduced the security footprint.

My Initial Questions:

  1. VPS Requirements for a Middle Relay:

    • What are the recommended hardware specs (CPU, RAM, disk space) for running a stable middle relay?
    • Is there a way to optimize the relay to perform better on a system with only 1 GB of RAM?
  2. Middle Relay vs. Snowflake Proxy:

    • Given the ongoing resource constraints, would it be more beneficial to switch from running a middle relay to running a Snowflake proxy instead?
    • What are the pros and cons of each in terms of impact on the Tor network and resource consumption?

Should I attempt to contributes to censorship circumvention efforts with a lower resource requirement, by having a few standalone proxies, or would efforts be better driven by seeking to help the main network by running a well powered dedicated relay?

1 Like

Bandwidth shaping is one strategy, but it seems you did that already.

Yes.

Here is a resource for understanding the various types of relays, including pluggable transports:

Up to you and your available resources.

5 Likes

Thank you will treat this as law for now, thanks for all this

1 Like

Fulfillment of Criteria for Tor Relays with Snowflake Proxies and Performance Inquiry

Dear Tor Project Team,

I am pleased to inform you that I have successfully met the criteria for maintaining three Tor relays with Snowflake proxies on each. The details of my setup are as follows:

Guard/Middle Relay Specifications:

  • Able to handle at least 7000 concurrent connections.
  • Providing at least 10 Mbit/s (16 Mbit/s recommended) of upstream and downstream bandwidth.
  • Donating over 100 GByte of traffic per month (exceeding the ideal target of 2 TB).
  • Equipped with at least 1 GB of RAM for a bandwidth capacity exceeding 40 Mbps.
  • Configured with a consistent IPv4 address, remaining stable for at least 3 hours.
  • Offering over 200 MB of disk storage.
  • Ensuring an uptime that ideally spans 24/7, and certainly exceeding the minimum 2 hours daily requirement.

Report on Tor Relay Performance and Inquiry on High Memory Usage

I am writing to provide a report on the performance of my three Tor relays, each equipped with Snowflake proxies, and to seek your advice regarding a high memory usage issue on one of the relays.

Performance Report

Relay 1:

  • Server Specifications:
    • CPU: E5-2650 2.3 GHz
    • RAM: 3.00 GB
    • Memory Usage: 3%
    • Swap Usage: 5.1%
    • Bandwidth Usage:
      • Incoming: Avg 7.00 kBit/s
      • Outgoing: Avg 7.00 kBit/s
      • Total Traffic: 93.79 MByte

Relay 2:

  • Server Specifications:
    • CPU: E5-2650 2.3 GHz
    • RAM: 3.00 GB
    • Memory Usage: 7%
    • Swap Usage: 5.0%
    • Bandwidth Usage:
      • Incoming: Avg 7.34 KBit/s
      • Outgoing: Avg 7.34 KBit/s
      • Total Traffic: 86.84 MByte

Relay 3:

  • Server Specifications:
    • CPU: Ryzen 2.6 GHz
    • RAM: 1.91 GB
    • Memory Usage: 55%
    • Swap Usage: >85%
    • Bandwidth Usage:
      • Incoming: Avg 5 MBit/s
      • Outgoing: Avg 5 MBit/s
      • Total Traffic: 137.64 GByte

Inquiry on High Memory Usage

Relay 1 and Relay 2 are experiencing lower memory usage (3% and 7%, respectively) with significant swap usage (5.1% and 5.0%). In contrast, Relay 3 is operating at high usage at 55% memory usage with no swap usage.

Given the discrepancy in memory usage across these relays, I am concerned about the potential for overloading and inefficiencies. Could you advise on whether adjusting the bandwidth allocation for the relays with high RAM usage might help mitigate this issue? Additionally, are there any other optimizations or configurations you would recommend to address this high memory usage and swap activity?

Could you advise if I should consider lowering the bandwidth allocation on the relay experiencing high RAM usage to mitigate this issue?

I am committed to supporting the Tor network and am grateful for the opportunity to maintain these relays. Thank you for providing the necessary code and guidance to enable this contribution.

Looking forward to your expert advice.

Best regards,

I Will Make It With Tor

2 Likes

Maybe, but consider making a bridge instead. A bridge is better than a Snowflake proxy. And bridges get less load than middle relays, so consider trying that.

It’s a hard question, akin to “should I donate to cancer research or to homeless shelters”. Censorship and anonymity are different issues, with different prevalence among different countries.

1 Like

It could, but you do not need to unless the relay experiences stability issues.

No, other than increasing the available hardware resources.

Sure, see my first answer in this post.

MaxMemInQueues might help a bit with high memory usage. Keep in mind this options doesn’t limit the memory tor uses in total, just what’s used for queues (which is often a good portion of what tor uses)

2 Likes