[tor-relays] AvoidDiskWrites
Roger Dingledine
arma at torproject.org
Sun Aug 25 11:45:27 UTC 2019
On Sat, Aug 24, 2019 at 06:36:20AM +0200, Michael Gerstacker wrote:
> I would like to understand what Tor is NOT writing to disk anymore if set
> to 1 or what Tor IS writing to disk if set to 0 and if changing that have
> any effect for Tor users.
> As a relay operator i couldnt really see any difference enabled or not.
It doesn't make Tor write different things to disk. Rather, it controls
how often Tor checkpoints its files to disk.
For example, your 'state' file (in your DataDirectory) is where Tor keeps
track of some of its local statistics and configuration, like how many
bytes it has spent from your AccountingMax, and it writes that file to
disk periodically in case something goes wrong (e.g. the computer turns
off suddenly).
Tor doesn't write the file immediately after a change, though, because
often changes come in batches, so it waits a little while before writing
it. When AvoidDiskWrites is set, it waits longer. So the same files get
written to disk eventually, but there's a higher risk of losing some
changes if something goes wrong before it gets around to writing out
the file.
As for what files Tor writes, we tried to cover that in the "FILES"
section at the end of the Tor man page ("man tor"). That documentation
might be out of date though, so if you notice anything else, please do
file a ticket.
And as a last note, I think it's been a long time since anybody tuned
AvoidDiskWrites to have actually reasonable parameters. I wrote it long
ago as a potential feature that somebody might find useful, and I just
picked some numbers that seemed plausible back in 2007.
--Roger
More information about the tor-relays
mailing list