[tor-relays] Does Tor itself estimate how it can run as quota-utilizing as possible?

trinity pointard trinity.pointard at gmail.com
Sun Oct 1 18:16:02 UTC 2023


Hi,

When using AccountingMax, tor tries to guess how long in will take for
it to use its quotas, and will decide deliberately to hibernate for
some time at the start of the period. It does that so not every relay
is working at its max capacity on the first of the month, and only the
unmetered ones are left at the end of the month.
What it does isn't always perfect, it can end up wasting some
bandwidth if the relay starts too late to use its quota, or cause too
many relays to be out of quota before the end of the month, so that
there is less capacity at the end than at the start, but it works well
enough.
Also your relay didn't learn from your behavior, this is something
every relay with AccountingMax does if it managed to use its full
quota before. It's very nice of you to think of that and try to make
your relay the most useful possible over time, but sadly it wasn't
worth the trouble.

Regards,
trinity-1866a

On Sun, 1 Oct 2023 at 19:54, telekobold <torproject-ml at telekobold.de> wrote:
>
> Hello together,
>
> today I apparently discovered an interesting feature of Tor I wasn't
> aware of:
>
> I'm running two relays at a large provider's data center having
> 20TB/month free outgoing traffic for each relay. However, this quota is
> often exhausted before the end of a month. In order to provide the Tor
> project with some bandwidth all the time, I configured "AccountingMax 20
> TB" and "AccountingStart month 1 00:00" and, for the last few months, I
> used to switch off one of the relays on the first of a month and turn it
> on again a few days after the beginning of the month, so that one of the
> two relays is running all the time. I also connected the two relays
> using the "MyFamily" flag.
>
> Until last month, each of the relays simply continued to run after the
> end of the month. Today, however, I wondered why one of the relays shut
> itself down apparently which did not change after a restart. A look into
> /var/log/tor/notices.log provided the following entries:
>
> Oct 01 16:58:29.000 [notice] Configured hibernation.  This interval
> began at 2023-10-01 00:00:00; the scheduled wake-up time is 2023-10-05
> 06:06:25; we expect to exhaust our quota for this interval around
> 2023-10-29 04:23:25; the next interval begins at 2023-11-01 00:00:00
> (all times local)
> [...]
> Oct 01 16:58:49.000 [notice] Commencing hibernation. We will wake up at
> 2023-10-05 06:06:25 local time.
> Oct 01 16:58:49.000 [notice] Going dormant. Blowing away remaining
> connections.
>
> So apparently Tor learned from my behavior and calculated itself when to
> turn itself off and on again in order to use as much quota as possible
> based on the bandwidth used and/or some other metrics so I don't have to
> do this manually in future?
>
> Kind regards
> telekobold
> _______________________________________________
> tor-relays mailing list
> tor-relays at lists.torproject.org
> https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays


More information about the tor-relays mailing list