Set max number of copycat transport server threads to 4
Change-Id: I20c662fdfcabd86b547c7b699b5f97ce3d912a41
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -64,7 +64,7 @@ public class CopycatTransportServer implements Server { | ... | @@ -64,7 +64,7 @@ public class CopycatTransportServer implements Server { |
64 | this.messagingService = checkNotNull(messagingService); | 64 | this.messagingService = checkNotNull(messagingService); |
65 | this.protocolMessageSubject = String.format("onos-copycat-server-%s", partitionId); | 65 | this.protocolMessageSubject = String.format("onos-copycat-server-%s", partitionId); |
66 | this.newConnectionMessageSubject = String.format("onos-copycat-server-connection-%s", partitionId); | 66 | this.newConnectionMessageSubject = String.format("onos-copycat-server-connection-%s", partitionId); |
67 | - this.executorService = Executors.newScheduledThreadPool(Runtime.getRuntime().availableProcessors(), | 67 | + this.executorService = Executors.newScheduledThreadPool(Math.min(4, Runtime.getRuntime().availableProcessors()), |
68 | new CatalystThreadFactory("copycat-server-p" + partitionId + "-%d")); | 68 | new CatalystThreadFactory("copycat-server-p" + partitionId + "-%d")); |
69 | } | 69 | } |
70 | 70 | ... | ... |
-
Please register or login to post a comment