Opened 7 years ago

Closed 7 years ago

#5823 closed enhancement (implemented)

Remove dirreq-v2-* and dirreq-v?-share statistics

Reported by: karsten Owned by: karsten
Priority: Low Milestone: Tor: 0.2.4.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: easy tor-relay
Cc: nickm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


The v2 directory protocol is (almost?) dead, and we stopped using dirreq-v?-share lines, because they were highly inaccurate. Should we stop including these lines in extra-info descriptors? If so, I can prepare a patch.

Child Tickets

Change History (11)

comment:1 Changed 7 years ago by nickm

That would be fine by me.

comment:2 Changed 7 years ago by arma

Fine by me also. (We should be extra sure we never want dirreq-v3-share though.)

comment:3 Changed 7 years ago by karsten

Keywords: easy added
Owner: set to karsten
Priority: normalminor
Status: newassigned

Hmm, I'm not extra super sure we never want to use dirreq-v3-share lines ever. Maybe we should only remove dirreq-v2-* lines then.

Will prepare a patch once there's an 0.2.4.x branch.

comment:4 Changed 7 years ago by karsten

Damian found a relay that reports a share of over 100%:

extra-info siltornado 995D0FE5A89563D79A383CCC2444D0E26C6BE625
published 2012-06-24 19:30:31
dirreq-v2-share 159.81%
dirreq-v3-share 159.81%

Rather than hunting down that bug, I'd rather want to kill dirreq-v?-share lines entirely. Now they're not only highly inaccurate but also buggy. If we ever want to calculate the share of directory requests that a relay should receive in theory, we can use the consensus just like the relay does.

comment:5 Changed 7 years ago by nickm

Keywords: tor-relay added

comment:6 Changed 7 years ago by nickm

Component: Tor RelayTor

comment:7 Changed 7 years ago by nickm

Status: assignedneeds_review

karsten -- will anything break if we remove these now? See branch "bug5823".

comment:8 in reply to:  7 Changed 7 years ago by karsten

Replying to nickm:

karsten -- will anything break if we remove these now? See branch "bug5823".

Looks sane.

Should we also remove dirreq-v2-* lines as discussed above? Please see my bug5823 branch. If you're fine with merging this, I'll test-run it somewhere for 24+ hours to make sure it doesn't explode.

comment:9 Changed 7 years ago by nickm

Yes, please test that out and let me know when it looks ok.

comment:10 Changed 7 years ago by karsten

Here's the stats/dirreq-stats file from my test relay written 24 hours after the relay was started:

dirreq-stats-end 2013-01-19 07:28:27 (86400 s)
dirreq-v3-ips it=16,us=16,br=8,ca=8,cz=8,de=8,eg=8,es=8,fr=8,gb=8,ie=8,il=8,ir=8,ng=8,nl=8,ru=8,sa=8,sd=8,sg=8,si=8,sy=8,tg=8,th=8,tr=8
dirreq-v3-reqs it=16,us=16,br=8,ca=8,cz=8,de=8,eg=8,es=8,fr=8,gb=8,ie=8,il=8,ir=8,ng=8,nl=8,ru=8,sa=8,sd=8,sg=8,si=8,sy=8,tg=8,th=8,tr=8
dirreq-v3-resp ok=64,not-enough-sigs=0,unavailable=0,not-found=0,not-modified=16,busy=0
dirreq-v3-direct-dl complete=0,timeout=0,running=0
dirreq-v3-tunneled-dl complete=60,timeout=4,running=0,min=2176,d1=20257,d2=31323,q1=39711,d3=45486,d4=62359,md=71595,d6=73982,d7=76214,q3=77018,d8=78153,d9=78977,max=81316

Everything looks good there. That relay didn't publish a new extra-info descriptor with these statistics, but I don't see how that should fail. The relay was still running 30 hours after I started it, and now I shut it down. Should be safe to merge my bug5823 branch. Thanks!

comment:11 Changed 7 years ago by nickm

Resolution: implemented
Status: needs_reviewclosed

Excellent; merging.

Note: See TracTickets for help on using tickets.