Skip to content

Commit 9c864fb

Browse files
Artem LabazinArtem Labazin
authored andcommitted
Update benchmark results
1 parent 1550d92 commit 9c864fb

File tree

3 files changed

+46
-106
lines changed

3 files changed

+46
-106
lines changed

benchmark/README.md

Lines changed: 46 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,33 +53,49 @@ H/W path Device Class Description
5353

5454
## The results
5555

56-
| Benchmark | Mode | Cnt | Score | Error | Units |
57-
|----------------------------------------------------------------------------------------------------------------|-------|-----|------------:|------------:|-------|
58-
| [EnconBenchmark.mailbox2mailbox](./src/main/java/io/appulse/encon/benchmark/EnconBenchmark.java#L103) | thrpt | 25 | 4562837.232 | ± 48730.020 | ops/s |
59-
| [EnconBenchmark.node2node](./src/main/java/io/appulse/encon/benchmark/EnconBenchmark.java#L177) | thrpt | 25 | 13744.084 | ± 160.906 | ops/s |
60-
| [EnconBenchmark.oneDirection](./src/main/java/io/appulse/encon/benchmark/EnconBenchmark.java#L167) | thrpt | 25 | 27665.670 | ± 230.607 | ops/s |
61-
| [JInterfaceBenchmark.mailbox2mailbox](./src/main/java/io/appulse/encon/benchmark/JInterfaceBenchmark.java#L99) | thrpt | 25 | 4345167.985 | ± 22392.570 | ops/s |
62-
| [JInterfaceBenchmark.node2node](./src/main/java/io/appulse/encon/benchmark/JInterfaceBenchmark.java#L175) | thrpt | 25 | 13850.978 | ± 126.660 | ops/s |
63-
| [JInterfaceBenchmark.oneDirection](./src/main/java/io/appulse/encon/benchmark/JInterfaceBenchmark.java#L165) | thrpt | 25 | 27590.545 | ± 253.874 | ops/s |
56+
### Multi client tests
57+
58+
The installation consist of a server node at separate thread, which echoes the messages and **N**-threads-clients, which pitch the messages and receive it back.
59+
60+
| implementation | clients | score | error | units |
61+
|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------:|------------:|------------:|:------|
62+
| [encon](https://github.com/appulse-projects/encon-java/blob/master/benchmark/src/main/java/io/appulse/encon/benchmark/Encon_Node2NodeBenchmarks.java#L130) | 1 | 11679.266 | 414.090 | ops/s |
63+
| [jinterface](https://github.com/appulse-projects/encon-java/blob/master/benchmark/src/main/java/io/appulse/encon/benchmark/JInterface_Node2NodeBenchmarks.java#L109) | 1 | 11862.914 | 385.573 | ops/s |
64+
| [encon](https://github.com/appulse-projects/encon-java/blob/master/benchmark/src/main/java/io/appulse/encon/benchmark/Encon_Node2NodeBenchmarks.java#L138) | 2 | 22337.500 | 918.292 | ops/s |
65+
| [jinterface](https://github.com/appulse-projects/encon-java/blob/master/benchmark/src/main/java/io/appulse/encon/benchmark/JInterface_Node2NodeBenchmarks.java#L117) | 2 | 18217.878 | 861.270 | ops/s |
66+
| [encon](https://github.com/appulse-projects/encon-java/blob/master/benchmark/src/main/java/io/appulse/encon/benchmark/Encon_Node2NodeBenchmarks.java#L146) | 4 | 36001.870 | 2033.472 | ops/s |
67+
| [jinterface](https://github.com/appulse-projects/encon-java/blob/master/benchmark/src/main/java/io/appulse/encon/benchmark/JInterface_Node2NodeBenchmarks.java#L125) | 4 | 23202.485 | 1295.186 | ops/s |
68+
| [encon](https://github.com/appulse-projects/encon-java/blob/master/benchmark/src/main/java/io/appulse/encon/benchmark/Encon_Node2NodeBenchmarks.java#L154) | 8 | 44742.858 | 1865.853 | ops/s |
69+
| [jinterface](https://github.com/appulse-projects/encon-java/blob/master/benchmark/src/main/java/io/appulse/encon/benchmark/JInterface_Node2NodeBenchmarks.java#L133) | 8 | 23495.184 | 671.766 | ops/s |
70+
71+
### Mailbox to mailbox
72+
73+
In this test we have only one node and two mailboxes which send the message to each other.
74+
75+
| implementation | score | error | units |
76+
|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------|------------:|------------:|:------|
77+
| [encon](https://github.com/appulse-projects/encon-java/blob/master/benchmark/src/main/java/io/appulse/encon/benchmark/Encon_SimpleBenchmarks.java#L57) | 4080746.356 | 79809.419 | ops/s |
78+
| [jinterface](https://github.com/appulse-projects/encon-java/blob/master/benchmark/src/main/java/io/appulse/encon/benchmark/JInterface_SimpleBenchmarks.java#L51) | 4885380.490 | 61920.971 | ops/s |
79+
6480

6581
## How to setup the environment
6682

6783
1. Add Java repository:
6884

6985
```bash
70-
$> sudo add-apt-repository ppa:webupd8team/java
86+
$> sudo add-apt-repository --yes ppa:webupd8team/java
7187
```
7288

7389
2. Update and upgrade the distro:
7490

7591
```bash
76-
$> sudo apt-get update && sudo apt-get upgrade
92+
$> sudo apt-get update --yes && sudo apt-get upgrade --yes
7793
```
7894

7995
3. Install `Git`, `Java 8` and `Maven`:
8096

8197
```bash
82-
$> sudo apt-get install -y oracle-java8-installer git maven
98+
$> sudo apt-get install --yes oracle-java8-installer git maven
8399
```
84100

85101
4. Clone the repo:
@@ -114,3 +130,22 @@ $> mvn clean package \
114130
```bash
115131
$> nohup java -Xms1G -Xmx2G -jar benchmark/target/benchmarks.jar > job.logs 2>&1 &
116132
```
133+
134+
### One-liner
135+
136+
```bash
137+
$> sudo add-apt-repository --yes ppa:webupd8team/java && \
138+
sudo apt-get update --yes && sudo apt-get upgrade --yes && \
139+
sudo apt-get install --yes oracle-java8-installer git maven && \
140+
git clone https://github.com/appulse-projects/encon-java.git && \
141+
cd encon-java && \
142+
mvn clean package \
143+
-DskipTests \
144+
-Dgpg.skip \
145+
-Dfindbugs.skip=true \
146+
-Dpmd.skip=true \
147+
-Dcheckstyle.skip \
148+
-Dmaven.test.skip=true \
149+
-pl benchmark -am && \
150+
nohup java -Xms1G -Xmx2G -jar benchmark/target/benchmarks.jar > job.logs 2>&1 &
151+
```

benchmark/src/main/java/io/appulse/encon/benchmark/Encon_SimpleBenchmarks.java

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,6 @@ public void mailbox2mailboxAndBack (Mailbox2MailboxAndBackState state, Blackhole
6161
blackHole.consume(state.mailbox1.receive());
6262
}
6363

64-
@Benchmark
65-
public void oneDirectionSend (OneDirectionSendState state, Blackhole blackHole) {
66-
state.clientMailbox.send(state.serverMailboxPid, state.data);
67-
blackHole.consume(state.serverMailbox.receive());
68-
}
69-
7064
@State(Benchmark)
7165
public static class Mailbox2MailboxAndBackState {
7266

@@ -112,50 +106,4 @@ public void tearDown () {
112106
node.close();
113107
}
114108
}
115-
116-
@State(Benchmark)
117-
public static class OneDirectionSendState {
118-
119-
Node serverNode;
120-
121-
Mailbox serverMailbox;
122-
123-
ErlangPid serverMailboxPid;
124-
125-
Node clientNode;
126-
127-
Mailbox clientMailbox;
128-
129-
ErlangTerm data;
130-
131-
@Setup(Trial)
132-
public void setup () throws Exception {
133-
NodeConfig config = NodeConfig.builder()
134-
.shortName(TRUE)
135-
.server(ServerConfig.builder()
136-
.bossThreads(1)
137-
.workerThreads(1)
138-
.build()
139-
)
140-
.build();
141-
142-
serverNode = Nodes.singleNode("node-server-" + System.nanoTime(), config);
143-
serverMailbox = serverNode.mailbox().build();
144-
serverMailboxPid = serverMailbox.getPid();
145-
146-
clientNode = Nodes.singleNode("node-client-" + System.nanoTime(), config);
147-
clientMailbox = clientNode.mailbox().build();
148-
149-
data = binary(new byte[] { 1, 2, 3, 4, 5 });
150-
}
151-
152-
@TearDown(Trial)
153-
public void tearDown () {
154-
clientMailbox.close();
155-
clientNode.close();
156-
157-
serverMailbox.close();
158-
serverNode.close();
159-
}
160-
}
161109
}

benchmark/src/main/java/io/appulse/encon/benchmark/JInterface_SimpleBenchmarks.java

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,6 @@ public void mailbox2mailboxAndBack (Mailbox2MailboxAndBackState state, Blackhole
5555
blackHole.consume(state.mailbox1.receive());
5656
}
5757

58-
@Benchmark
59-
public void oneDirectionSend (OneDirectionSendState state, Blackhole blackHole) throws Exception {
60-
state.clientMailbox.send(state.serverMailboxPid, state.data);
61-
blackHole.consume(state.serverMailbox.receive());
62-
}
63-
6458
@State(Benchmark)
6559
public static class Mailbox2MailboxAndBackState {
6660

@@ -97,41 +91,4 @@ public void tearDown () {
9791
node.close();
9892
}
9993
}
100-
101-
@State(Benchmark)
102-
public static class OneDirectionSendState {
103-
104-
OtpNode serverNode;
105-
106-
OtpMbox serverMailbox;
107-
108-
OtpErlangPid serverMailboxPid;
109-
110-
OtpNode clientNode;
111-
112-
OtpMbox clientMailbox;
113-
114-
OtpErlangObject data;
115-
116-
@Setup(Trial)
117-
public void setup () throws Exception {
118-
serverNode = new OtpNode("node-server-" + System.nanoTime() + "@localhost");
119-
serverMailbox = serverNode.createMbox();
120-
serverMailboxPid = serverMailbox.self();
121-
122-
clientNode = new OtpNode("node-client-" + System.nanoTime() + "@localhost");
123-
clientMailbox = clientNode.createMbox();
124-
125-
data = new OtpErlangBinary(new byte[] { 1, 2, 3, 4, 5 });
126-
}
127-
128-
@TearDown(Trial)
129-
public void tearDown () {
130-
clientMailbox.close();
131-
clientNode.close();
132-
133-
serverMailbox.close();
134-
serverNode.close();
135-
}
136-
}
13794
}

0 commit comments

Comments
 (0)