[ https://issues.apache.org/jira/browse/TS-4612?focusedWorklogId=29614&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29614 ]
ASF GitHub Bot logged work on TS-4612: -------------------------------------- Author: ASF GitHub Bot Created on: 23/Sep/16 16:38 Start Date: 23/Sep/16 16:38 Worklog Time Spent: 10m Work Description: Github user oknet commented on the issue: https://github.com/apache/trafficserver/pull/771 @jpeach @bryancall add comments and details in commit message ``` Load the NetVCs from open_list to cop_list before next InactivityCop runs. NetHandler will remove NetVC from cop_list if it is triggered. As the NetHandler runs, the number of NetVCs in the cop_list is decreasing. Lots of NetVCs will be removed from cop_list because the NetHandler runs 100 times maximum between InactivityCop runs. Therefore we don't have to check all the NetVCs as much as open_list. ``` Issue Time Tracking ------------------- Worklog Id: (was: 29614) Time Spent: 4h 40m (was: 4.5h) > Proposal: InactivityCop Optimize > -------------------------------- > > Key: TS-4612 > URL: https://issues.apache.org/jira/browse/TS-4612 > Project: Traffic Server > Issue Type: Bug > Components: Core, Network > Reporter: Oknet Xu > Fix For: sometime > > Time Spent: 4h 40m > Remaining Estimate: 0h > > By review the processing of InactivityCop::check_inactivity(): > 1. get all local vc from open_list > 2. put them into cop_list > 3. check every vc in cop_list if it is already timeouted > 4. callback vc->handleEvent to close vc if it is timeout > InactivityCop and NetHandler share one mutex. > InactivityCop runs every second, NetHandler runs every 10ms, that means > Nethandler runs 100 times until next InactivityCop runs. > if one vc has read/write in a Nethandler call, it is won't be timeout in the > next InactivityCop run. > Thus, if the vc has read/write in Nethandler, we move it out of cop-list then > the InactivityCop runs would get better performace. -- This message was sent by Atlassian JIRA (v6.3.4#6332)