[
https://issues.apache.org/jira/browse/TS-4612?focusedWorklogId=25679&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-25679
]
ASF GitHub Bot logged work on TS-4612:
--------------------------------------
Author: ASF GitHub Bot
Created on: 19/Jul/16 08:48
Start Date: 19/Jul/16 08:48
Worklog Time Spent: 10m
Work Description: Github user oknet commented on a diff in the pull
request:
https://github.com/apache/trafficserver/pull/771#discussion_r71296490
--- Diff: iocore/net/UnixNet.cc ---
@@ -465,6 +433,9 @@ NetHandler::mainNetEvent(int event, Event *e)
epd = (EventIO *)get_ev_data(pd, x);
if (epd->type == EVENTIO_READWRITE_VC) {
vc = epd->data.vc;
+ if (cop_list.in(vc)) {
+ cop_list.remove(vc);
+ }
--- End diff --
Step 1. put all vc in open_list into cop_list.
Step 2. remove vc from cop_list if it has READ/WRITE event. (running 100
times)
Step 3. call check_inactivity() to processing cop_list.
Step 4. go to step 1.
Issue Time Tracking
-------------------
Worklog Id: (was: 25679)
Time Spent: 0.5h (was: 20m)
> 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: 0.5h
> 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)