Comments (1)
Six Second Replication
All tests were run with the same fixtures consisting of 100,000 messages from 20 unique authors. Two identities were chosen: one is labelled as server
and the other as peer
. The alloffsets server
netsim command was used to ensure the server
starts with all 100000 messages. The peer
was connected to the server
and we measured how many messages were replicated from server
to peer
in 6 seconds. A mutual follow was established before connecting the peer
to the server
(hence the 10249 message count for peer
in the test output).
Each test was run three times and averages were calculated for run time and message counts. Replication rate is calculated as (the total peer
messages minus 10249) divided by the run time.
Summary
All values are calculated as an average across three test runs for each implementation.
server | peer | messages | time | messages / second | relative performance |
---|---|---|---|---|---|
go | go | 59754 | 6.513 | 9175 | 2.1x |
js (db2) | js (db2) | 42161 | 6.521 | 6465 | 1.5x |
js | js | 28394 | 6.545 | 4338 | 1.0x |
Go - Go
Sample output from a single test run:
Note: go-sbot
was run without the -enable-ebt
flag in this test.
# Total time: 32.75269056s
# Active time: 2.25269056s
# Puppet count: 2
# Puppet Total time Active time # messages
# server 34.151s 3.651s 100002
# peer 18.749s 249ms 69727
#
# Started timers & final elapsed time
# Label Time
# run 6.512s
JS - JS (db2)
Sample output from a single test run:
# Total time: 46.21878452s
# Active time: 25.71878452s
# Puppet count: 2
# Puppet Total time Active time # messages
# server 58.721s 38.221s 100001
# peer 19.376s 876ms 55613
#
# Started timers & final elapsed time
# Label Time
# run 6.529s
JS - JS
Sample output from a single test run:
# Total time: 57.427148477s
# Active time: 26.927148477s
# Puppet count: 2
# Puppet Total time Active time # messages
# server 1m11.849s 41.349s 100002
# peer 20.62s 2.12s 38779
#
# Started timers & final elapsed time
# Label Time
# run 6.514s
Test Script
The only changes to this script between runs are the start server go-sbot
and start peer go-sbot
commands; go-sbot
is substituted for ssb-server
or ssb-server-db1
when required.
comment [ six second sync two js db2 ssb servers 100k msgs ]
comment [ configuring peer ]
enter peer
hops peer 3
load peer @sWJqvI4hdv96aRMk1pQOJo1frXRFr7oBB5/r/jBMcxw=.ed25519
comment [ configuring server ]
enter server
hops server 3
load server @NZpjhmgTaHOHFZI6G6dIuWwa3UqwSpfRpMbY5ue6vAI=.ed25519
alloffsets server
start server ssb-server
start peer ssb-server
follow server peer
follow peer server
wait 10000
timerstart run
connect peer server
wait 6000
timerstop run
from netsim-cookbook.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netsim-cookbook.