Browse Source

Start a couple of extra async io threads

And if using fewer than 4 nodes, give them 4 cores each so that they can
decrypt the large messages (with 2^20 users) without backing up the TCP
window to closing
Ian Goldberg 1 year ago
parent
commit
c1069ecd2f
2 changed files with 12 additions and 4 deletions
  1. 7 4
      App/teems.cpp
  2. 5 0
      gen_manifest.py

+ 7 - 4
App/teems.cpp

@@ -287,11 +287,14 @@ int main(int argc, char **argv)
         }
         }
     });
     });
 
 
-    // Start another thread; one will perform the work and the other
-    // will execute the async_write handlers
-    boost::thread t([&]{io_context.run();});
+    // Start threads to handle the async io handlers
+    boost::thread t0([&]{io_context.run();});
+    boost::thread t1([&]{io_context.run();});
+    boost::thread t2([&]{io_context.run();});
     io_context.run();
     io_context.run();
-    t.join();
+    t0.join();
+    t1.join();
+    t2.join();
 
 
     // All done
     // All done
     ecall_close();
     ecall_close();

+ 5 - 0
gen_manifest.py

@@ -59,6 +59,11 @@ def generate_manifest(N, M, T, B, PRIVATE_ROUTE = True, priv_out=1, priv_in=1, p
     numa_limit = 36
     numa_limit = 36
     numa_start = numa_base
     numa_start = numa_base
 
 
+    # For small numbers of servers, use extra cores to handle
+    # communication (but not computation)
+    if M < 4 and T < 4:
+        T = 4
+
     for s in range(1, M+1):
     for s in range(1, M+1):
         numa_end = numa_start + T -1
         numa_end = numa_start + T -1
         if(numa_start < numa_limit and numa_end > numa_limit):
         if(numa_start < numa_limit and numa_end > numa_limit):