Opened 18 months ago

Last modified 18 months ago

#2702 infoneeded_new defect

Minimize router stalls

Reported by: jogger Owned by:
Priority: major Milestone: undecided
Component: router/general Version: 0.9.45
Keywords: Cc:
Parent Tickets: Sensitive: no


I discovered inbound router stalls of up to more than 3 seconds caused by a lock somewhere below TransportImpl?.messageReceived().

The most contended lock there is the one used by ProfileManagerImpl?.getProfile() from ProfileManagerImpl?.tunnelDataPushed().

Quick reduction of this problem might be if ProfileOrganizer?.getProfileNonblocking() would be tried first before using ProfileOrganizer?.getProfile().

Also one item caches in front of tunnelDataPushed(), ProfileManagerImpl?.getProfile() and ProfileManagerImpl?.getProfileNonblocking() could be helpful.


Change History (1)

comment:1 Changed 18 months ago by zzz

Status: newinfoneeded_new

The stall is probably during profile reorganization, not a lock contention issue. The lock in question is a ReentrantReadWriteLock?. None of the suggestions in OP would help during reorg (or outside of reorg). You can check your stats for peer.profileReorgTime, mine are about 7 ms avg, 32 ms max in 60 minutes. 3 seconds sounds insane but I know you test on slow arm machines.

Caching the profiles would also defeat the locking and possibly cause problems during reorg.

I don't see anything that can be done here. Reorg locks everything up, briefly, by design.

Note: See TracTickets for help on using tickets.