0

I run a tor relay on a Raspberry Pi, with ramdisk e.g. used for /var/lib/tor and some other folders that see lots of data written, so that the SD card does not see too many writes.

No the folder /var/lib/tor sees more and more data stored, until the ramdisk is full and tor stops working.

My tor version is 0.4.2.7, I've recenty upgraded from an older version (based on debian stretch). I've not seen this problem before the upgrade.

Is it possible to avoid that Tor uses so much space? Here are the biggest files and folders:

/var/lib/tor/diff-cache 75M
/var/lib/tor/cached-descriptors 60M
/var/lib/tor/cached-descriptors.new 27M
/var/lib/tor/keys 11M

Update (2020-04-21):

So my settings are now:

DirPort 9030 # unchanged
DirCache 0 # new

I received once the log message:

[warn] DirCache is disabled and we are configured as a relay. We will not become a Guard

The V2DIR flag for my relay on Tor Metrics is gone now.

I'll wait how the folder /var/lib/tor fills up and report the results here.

Update (2020-04-22):

The memory usage in folder /var/lib/tor seems to be stable at 75M (for two days now), so tor keeps running without running out of space.

1

If you go to https://metrics.torproject.org/rs.html and search for your relay, does it have the "V2Dir" flag? If so, your relay is acting as a directory cache. In this case you should set DirCache 0 in your torrc config to prevent your relay from caching extra directory documents that aren't needed for your relay to run.

| improve this answer | |
  • indeed, it does and always did so in the past. So acc. to this thread I should just remove the DirPort line from my torrc? – radix Apr 20 at 13:35
  • @radix Your relay will still be used as a directory cache even if you don't set a DirPort since clients can build circuits to your relay and download directory documents over these circuits. – Steve Apr 20 at 15:09
  • sorry, my edit landed at first in your answer rather then in my quesion...now it seems I can't undo the change in your question. – radix Apr 21 at 13:26
  • @radix If it still ends up using too much storage leave a comment here so I see it and I'll try to think of other things you could change. But disabling the cache should save a lot of space. – Steve Apr 21 at 22:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.