You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by sw...@apache.org on 2016/07/18 18:12:39 UTC

[03/13] git commit: updated refs/heads/master to 54039f9

CLOUDSTACK-9348: Reduce Nio selector wait time

This reduced the Nio loop selector wait time, this way the selector will
check frequently (as much as 100ms per iteration) and handle any pending
connection/tasks. This would make reconnections very quick at the expense of
some CPU usage.

Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0381b7ea
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0381b7ea
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0381b7ea

Branch: refs/heads/master
Commit: 0381b7ea185ef753873594216a67b8d376e3d658
Parents: e4ba640
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Fri Jul 1 14:32:58 2016 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Fri Jul 1 14:34:48 2016 +0530

----------------------------------------------------------------------
 utils/src/main/java/com/cloud/utils/nio/NioConnection.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0381b7ea/utils/src/main/java/com/cloud/utils/nio/NioConnection.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/com/cloud/utils/nio/NioConnection.java b/utils/src/main/java/com/cloud/utils/nio/NioConnection.java
index 9d755d6..630b2dd 100644
--- a/utils/src/main/java/com/cloud/utils/nio/NioConnection.java
+++ b/utils/src/main/java/com/cloud/utils/nio/NioConnection.java
@@ -125,7 +125,7 @@ public abstract class NioConnection implements Callable<Boolean> {
     public Boolean call() throws NioConnectionException {
         while (_isRunning) {
             try {
-                _selector.select(1000);
+                _selector.select(100);
 
                 // Someone is ready for I/O, get the ready keys
                 final Set<SelectionKey> readyKeys = _selector.selectedKeys();