Yuta HIGUCHI
Committed by Gerrit Code Review

Let backend choose number of IO threads by default.

e.g., Netty NIO uses # cores * 2 threads.

Change-Id: I59b125aaae50fb067214d067a06a98d258726a26
...@@ -80,7 +80,7 @@ public class Controller { ...@@ -80,7 +80,7 @@ public class Controller {
80 80
81 // Configuration options 81 // Configuration options
82 protected List<Integer> openFlowPorts = ImmutableList.of(6633, 6653); 82 protected List<Integer> openFlowPorts = ImmutableList.of(6633, 6653);
83 - protected int workerThreads = 16; 83 + protected int workerThreads = 0;
84 84
85 // Start time of the controller 85 // Start time of the controller
86 protected long systemStartTime; 86 protected long systemStartTime;
......
...@@ -88,7 +88,7 @@ import static org.onlab.util.Tools.groupedThreads; ...@@ -88,7 +88,7 @@ import static org.onlab.util.Tools.groupedThreads;
88 public class OpenFlowControllerImpl implements OpenFlowController { 88 public class OpenFlowControllerImpl implements OpenFlowController {
89 private static final String APP_ID = "org.onosproject.openflow-base"; 89 private static final String APP_ID = "org.onosproject.openflow-base";
90 private static final String DEFAULT_OFPORT = "6633,6653"; 90 private static final String DEFAULT_OFPORT = "6633,6653";
91 - private static final int DEFAULT_WORKER_THREADS = 16; 91 + private static final int DEFAULT_WORKER_THREADS = 0;
92 92
93 private static final Logger log = 93 private static final Logger log =
94 LoggerFactory.getLogger(OpenFlowControllerImpl.class); 94 LoggerFactory.getLogger(OpenFlowControllerImpl.class);
...@@ -111,7 +111,7 @@ public class OpenFlowControllerImpl implements OpenFlowController { ...@@ -111,7 +111,7 @@ public class OpenFlowControllerImpl implements OpenFlowController {
111 private String openflowPorts = DEFAULT_OFPORT; 111 private String openflowPorts = DEFAULT_OFPORT;
112 112
113 @Property(name = "workerThreads", intValue = DEFAULT_WORKER_THREADS, 113 @Property(name = "workerThreads", intValue = DEFAULT_WORKER_THREADS,
114 - label = "Number of controller worker threads; default is 16") 114 + label = "Number of controller worker threads")
115 private int workerThreads = DEFAULT_WORKER_THREADS; 115 private int workerThreads = DEFAULT_WORKER_THREADS;
116 116
117 protected ExecutorService executorMsgs = 117 protected ExecutorService executorMsgs =
......