Browse Source

GL, update to next version (#4950)

* [ci fw-only Java/greenlightning]

swap versions

* [ci fw-only Java/greenlightning]

go back to simple file

* [ci fw-only Java/greenlightning]

update version to add loging and track issue

* [ci fw-only Java/greenlightning]

use old update design

bump version number

* [ci fw-only Java/greenlightning]

reduce poll rate for greater volume

* [ci fw-only Java/greenlightning]

update comment

* [ci fw-only Java/greenlightning]

update for larger pipes

* [ci fw-only Java/greenlightning]

update memory limit

update to next version

better request read
Nathan Tippy 6 years ago
parent
commit
d317049bc1

+ 1 - 1
frameworks/Java/greenlightning/greenlightning.dockerfile

@@ -16,4 +16,4 @@ COPY --from=maven /greenlightning/target/greenlightning-test.jar app.jar
 #records to our log all the known network settings on the host connection 
 #CMD sysctl -a && java -server -Xmx26g -XX:+UseNUMA -jar app.jar
 
-CMD java -server -Xmx26g -XX:+UseNUMA -jar app.jar
+CMD java -server -Xmx29g -XX:+UseNUMA -jar app.jar

+ 1 - 1
frameworks/Java/greenlightning/pom.xml

@@ -4,7 +4,7 @@
 
 	<groupId>com.javanut.gl.benchmark</groupId>
 	<artifactId>benchmark-test</artifactId>
-	<version>1.1.3</version> 
+	<version>1.1.7</version> 
 
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

+ 24 - 13
frameworks/Java/greenlightning/src/main/java/com/javanut/gl/benchmark/FrameworkTest.java

@@ -6,6 +6,7 @@ import com.javanut.gl.api.GreenApp;
 import com.javanut.gl.api.GreenCommandChannel;
 import com.javanut.gl.api.GreenFramework;
 import com.javanut.gl.api.GreenRuntime;
+import com.javanut.pronghorn.network.ServerSocketWriterStage;
 
 import io.reactiverse.pgclient.PgClient;
 import io.reactiverse.pgclient.PgPool;
@@ -19,7 +20,7 @@ public class FrameworkTest implements GreenApp {
 	private int bindPort;
     private String host;
     private int concurrentWritesPerChannel;
-    private int queueLengthOfPendingRequests;
+  
     private int telemetryPort;//for monitoring
     private int minMemoryOfInputPipes;
     private int dbCallMaxResponseSize;
@@ -49,6 +50,13 @@ public class FrameworkTest implements GreenApp {
 	//TODO: add utility to compute this based on need.
 	static final int c = 592; // to reach 16K simultaneous calls
 
+	private final long defaultRate = Long.parseLong(System.getProperty("xx.rate", "100000")); 
+	
+	static {
+		ServerSocketWriterStage.BASE_ADJUST = Float.parseFloat(System.getProperty("xx.ratio", "1"));
+		ServerSocketWriterStage.HARD_LIMIT_NS = Long.parseLong(System.getProperty("xx.limitns", "100000"));		
+	}
+	
     public FrameworkTest() {
     	    	
     	// use this in commit messages to narrow travis testing to just this project
@@ -57,10 +65,9 @@ public class FrameworkTest implements GreenApp {
     	
     	//this server works best with  -XX:+UseNUMA    	
     	this(System.getProperty("host","0.0.0.0"), 
-    		 8080,    	//default port for test 
-    		 c,         //pipes per track
-    		 c*16,      //(router to module) pipeline of 16 used for plain text test    		 
-    		 1<<15,     //default total size of network buffer used by blocks     		 
+    		 Integer.parseInt(System.getProperty("port","8080")),    	//default port for test 
+    		 c,         //pipes per track    			 
+    		 1<<10,     // default total size of network buffer used by blocks  
     		 Integer.parseInt(System.getProperty("telemetry.port", "-1")),
     		 "tfb-database", // jdbc:postgresql://tfb-database:5432/hello_world
     		 "hello_world",
@@ -68,11 +75,15 @@ public class FrameworkTest implements GreenApp {
     		 "benchmarkdbpass",
     		 System.getProperty("custom.payload", "Hello, World!")    		 
     		 );
+    	   	
+    	System.out.println("xx.rate "+defaultRate+"  xx.ratio "+ServerSocketWriterStage.BASE_ADJUST+" xx.limitns "+ServerSocketWriterStage.HARD_LIMIT_NS);
+		
+		
     }   
         
     public FrameworkTest(String host, int port, 
     		             int concurrentWritesPerChannel, 
-    		             int queueLengthOfPendingRequests, 
+    		            
     		             int minMemoryOfInputPipes,
     		             int telemetryPort,
     		             String dbHost,
@@ -89,19 +100,19 @@ public class FrameworkTest implements GreenApp {
     	this.bindPort = port;
     	this.host = host;
     	this.concurrentWritesPerChannel = concurrentWritesPerChannel;
-    	this.queueLengthOfPendingRequests = queueLengthOfPendingRequests;
+
     	this.minMemoryOfInputPipes = minMemoryOfInputPipes;
     	this.telemetryPort = telemetryPort;
     	this.pipelineBits = 15;//max concurrent in flight database requests 1<<pipelineBits
     	            
     	this.dbCallMaxResponseCount = c;
-    	this.jsonMaxResponseCount = c*32;
+    	this.jsonMaxResponseCount = c*16;
     	
     	this.dbCallMaxResponseSize = 20_000; //for 500 mult db call in JSON format
     	this.jsonMaxResponseSize = 1<<8;
 
-    	this.maxQueueOut = 8*30;   	
-    	this.maxConnectionBits = 14; //16K connections, for test plus overhead
+    	this.maxQueueOut = 8*20;   	
+    	this.maxConnectionBits = 15;//16K connections, for test plus overhead MUST be 32K
     	
     	this.maxRequestSize = 1<<9;
     	    	
@@ -159,7 +170,7 @@ public class FrameworkTest implements GreenApp {
 	@Override
     public void declareConfiguration(GreenFramework framework) {
 		
-		framework.setDefaultRate(100_000L);		
+		framework.setDefaultRate(defaultRate);
 	
 		//for 14 cores this is expected to use less than 16G, must use next largest prime to ensure smaller groups are not multiples.
 		framework.useHTTP1xServer(bindPort, this::parallelBehavior) //standard auto-scale
@@ -173,10 +184,10 @@ public class FrameworkTest implements GreenApp {
     			 .setConcurrentChannelsPerEncryptUnit(concurrentWritesPerChannel/25)  ///80) ///16) // /8)//4)
     			 //TODO: we need smaller count of connections but MORE writers.
     			 
-    			 .disableEPoll() //provides advantage in JSON test....
+    			 .disableEPoll() //provides advantage in JSON test.... 
  						 
-    			 .setMaxQueueIn(queueLengthOfPendingRequests)
     			 .setMaxRequestSize(maxRequestSize)
+    			 .setMaxQueueIn(c*16)
     	
     			 .setMinimumInputPipeMemory(minMemoryOfInputPipes)
     			 .setMaxQueueOut(maxQueueOut)

+ 0 - 3
frameworks/Java/greenlightning/src/main/java/com/javanut/gl/benchmark/ProcessUpdate.java

@@ -14,9 +14,6 @@ import com.javanut.pronghorn.pipe.ObjectPipe;
 import io.reactiverse.pgclient.PgIterator;
 import io.reactiverse.pgclient.Tuple;
 
-//this is rolled back to simple solution which has good peformance
-//seems like we could do better but each attempt has not shown any improvement.
-
 public class ProcessUpdate {
 	
 	private transient ObjectPipe<ResultObject> DBUpdateInFlight;