Giter VIP home page Giter VIP logo

mqtt-benchmarks's Introduction

mqtt benchmarks

Compare MQTT client performance for Go, Java and Python.

Summary

Implementations

Lang/Runtime MQTT Library Counting method
Golang 1.11.4 Paho MQTT Golang v1.1.1 Channel
OpenJDK 11.0.1 Paho MQTT Java v1.2.0 CountDownLatch
Python 3.6.5 Paho MQTT Python v1.4.0 GIL

Measurement method

/usr/bin/time -lp <command> <n>

Using real as time and maximum resident set size as memory usage.

Result

Memory usage (Unit: Bytes):

Volume Golang Java 11 Python 3
1 8466432 69382144 12337152
10 8396800 69713920 12210176
100 8548352 68845568 12349440
1000 9494528 70881280 12242944
10000 12722176 94748672 12500992
100000 13000704 145399808 12267520

Time spent (Unit: Seconds):

Volume Golang Java 11 Python 3
1 0.02 0.75 0.26
10 0.02 0.77 0.26
100 0.03 0.82 0.35
1000 0.20 1.05 1.90
10000 1.68 2.20 17.89
100000 17.01 17.08 178.13

Programming

Prerequisites

  • Golang 1.11 or higher
  • JDK 11 or higher
  • Python 3.5 or higher
  • Python PIP via pip3 command
  • GNU Make
  • /usr/bin/time (not a bash built-in)

Run

Build binary / JAR:

./bench.sh build

Run loader:

./bench.sh loader

Run implementations (volume=100):

./bench.sh g 100
./bench.sh j 100
./bench.sh p 100

mqtt-benchmarks's People

Contributors

mikan avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.