A high throughput
java
executor service
The figure shows the throuput of the vmlens executor service compared to the standard JDK executor service for different threads on JDK 8.
The tradeoff is that latency is much higher than that of the standard JDK executor service.
The figure shows the latency of the vmlens executor service compared to the standard JDK executor service for different threads on JDK 8. All benchmarks were run with jmh on an intel i5 4core CPU. The source of the benchmark can be downloaded here.
Use
To use the executor service simply create it with the static newHighThroughputExecutorService method. The method parameter specifies how many threads process the tasks in parallel. And then use it the same way as the JDK executor service.
import com.vmlens.executorService.VMLensExecutors;
ExecutorService executorService = VMLensExecutors.newHighThroughputExecutorService(5);
Download
Maven
<dependency>
<groupId>com.vmlens</groupId>
<artifactId>executor-service</artifactId>
<version>1.0.0</version>
</dependency>
License
executor-service is released under the Apache License 2.0
More from vmlens: