Skip to content

Instantly share code, notes, and snippets.

@derekcollison
Created December 3, 2015 18:03
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save derekcollison/4616831fc476e5f2117e to your computer and use it in GitHub Desktop.
Save derekcollison/4616831fc476e5f2117e to your computer and use it in GitHub Desktop.
NATS Performance with 16 publishers
~/Development/go/src/github.com/nats-io/nats/examples> ./nats-bench -np 16 -n 100000 foo ok
Starting benchmark
msgs=16X100000, pubs=16, subs=0
################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
NATS throughput is 14403770 msgs/sec
@derekcollison
Copy link
Author

What a great update. Updated to go1.10 and run on a 10-core iMac Pro. >72Million per sec!

~/Development/go/src/github.com/nats-io/go-nats/examples> ./nats-bench -np 16 -n 100000000 -ms 2 foo
Starting benchmark [msgs=100000000, msgsize=2, pubs=16, subs=0]
Pub stats: 72,691,889 msgs/sec ~ 138.65 MB/sec
 [1] 4,711,691 msgs/sec ~ 8.99 MB/sec (6250000 msgs)
 [2] 4,691,505 msgs/sec ~ 8.95 MB/sec (6250000 msgs)
 [3] 4,653,836 msgs/sec ~ 8.88 MB/sec (6250000 msgs)
 [4] 4,651,900 msgs/sec ~ 8.87 MB/sec (6250000 msgs)
 [5] 4,630,602 msgs/sec ~ 8.83 MB/sec (6250000 msgs)
 [6] 4,623,658 msgs/sec ~ 8.82 MB/sec (6250000 msgs)
 [7] 4,616,956 msgs/sec ~ 8.81 MB/sec (6250000 msgs)
 [8] 4,604,985 msgs/sec ~ 8.78 MB/sec (6250000 msgs)
 [9] 4,591,809 msgs/sec ~ 8.76 MB/sec (6250000 msgs)
 [10] 4,580,822 msgs/sec ~ 8.74 MB/sec (6250000 msgs)
 [11] 4,579,599 msgs/sec ~ 8.73 MB/sec (6250000 msgs)
 [12] 4,576,858 msgs/sec ~ 8.73 MB/sec (6250000 msgs)
 [13] 4,592,062 msgs/sec ~ 8.76 MB/sec (6250000 msgs)
 [14] 4,579,452 msgs/sec ~ 8.73 MB/sec (6250000 msgs)
 [15] 4,551,799 msgs/sec ~ 8.68 MB/sec (6250000 msgs)
 [16] 4,544,914 msgs/sec ~ 8.67 MB/sec (6250000 msgs)
 min 4,544,914 | avg 4,611,403 | max 4,711,691 | stddev 45,687 msgs

@swdee
Copy link

swdee commented Apr 30, 2018

Not really, the first output uses default message size of 128 bytes and the later your using message size 2 bytes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment