Opened 4 years ago

Last modified 4 years ago

#2056 open task

Investigate the Thread.sleep(5) in I2PTunnelRunner

Reported by: Zlatin Balevsky Owned by: Zlatin Balevsky
Priority: minor Milestone: undecided
Component: apps/i2ptunnel Version: 0.9.31
Keywords: performance Cc:
Parent Tickets: Sensitive: no


There is a call to Thread.sleep(5) in !I2PTunnelRunner.StreamForwarder that looks hackish. It might be impacting upload performance negatively. Need to investigate why it was added, is it still necessary, and does it impact performance in statistically significant way.


Change History (2)

comment:1 Changed 4 years ago by zzz

It's for batching. Previously 100, reduced in 2015-04-26 7d5782ffc3803a309b33bc7457a29ae284f8d0a0

Of course (as with any batching strategy, there are several places in the router itself) it impacts latency performance, the benefit is bandwidth performance. The change above from 100 to 5 was primarily to benefit "loopback" but I'm sure it helped network latency also.

Notwithstanding all that, it is hackish and may be a bad idea, even at 5.

comment:2 Changed 4 years ago by str4d

Keywords: performance added
Status: newopen
Note: See TracTickets for help on using tickets.