All Projects → jonhoo → Volley

jonhoo / Volley

Licence: mit
Volley is a benchmarking tool for measuring the performance of server networking stacks.

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Volley

language-benchmarks
A simple benchmark system for compiled and interpreted languages.
Stars: ✭ 21 (-82.35%)
Mutual labels:  benchmark, comparison
Benchmarks
Comparison tools
Stars: ✭ 139 (+16.81%)
Mutual labels:  comparison, benchmark
Gl vs vk
Comparison of OpenGL and Vulkan API in terms of performance.
Stars: ✭ 65 (-45.38%)
Mutual labels:  comparison, benchmark
Are We Fast Yet
Are We Fast Yet? Comparing Language Implementations with Objects, Closures, and Arrays
Stars: ✭ 161 (+35.29%)
Mutual labels:  comparison, benchmark
hood
The plugin to manage benchmarks on your CI
Stars: ✭ 17 (-85.71%)
Mutual labels:  benchmark, comparison
javascript-serialization-benchmark
Comparison and benchmark of JavaScript serialization libraries (Protocol Buffer, Avro, BSON, etc.)
Stars: ✭ 54 (-54.62%)
Mutual labels:  benchmark, comparison
Php Arrays In Memory Comparison
How to store 11kk items in memory? Comparison of methods: array vs object vs SplFixedArray vs pack vs swoole_table vs swoole_pack vs redis vs memsql vs node.js arrays in php7
Stars: ✭ 83 (-30.25%)
Mutual labels:  comparison, benchmark
React Native Tcp Socket
React Native TCP socket API for Android, iOS & macOS with client SSL/TLS support
Stars: ✭ 112 (-5.88%)
Mutual labels:  network
Fi6s
IPv6 network scanner designed to be fast
Stars: ✭ 116 (-2.52%)
Mutual labels:  network
Pandiff
Prose diffs for any document format supported by Pandoc
Stars: ✭ 110 (-7.56%)
Mutual labels:  comparison
Autobahn Java
WebSocket & WAMP in Java for Android and Java 8
Stars: ✭ 1,467 (+1132.77%)
Mutual labels:  network
Terraform Provider Zerotier
Create, modify and destroy ZeroTier networks and members through Terraform.
Stars: ✭ 113 (-5.04%)
Mutual labels:  network
Benchmarks
Benchmark of open source, embedded, memory-mapped, key-value stores available from Java (JMH)
Stars: ✭ 116 (-2.52%)
Mutual labels:  benchmark
Interview Problem Summary
🎤 Prepare for the interviews and sum up the most popular interview problems for front-end(HTML/CSS/Javascript), Web development, full-stack. Also did some typical coding practice questions, such as UI caculator
Stars: ✭ 112 (-5.88%)
Mutual labels:  network
Ddn
DDN, Data Delivery Network, a next generation blockchain system
Stars: ✭ 118 (-0.84%)
Mutual labels:  network
Meta Blocks
A modular toolbox for meta-learning research with a focus on speed and reproducibility.
Stars: ✭ 110 (-7.56%)
Mutual labels:  benchmark
Dripcap
☕️ Caffeinated Packet Analyzer
Stars: ✭ 1,510 (+1168.91%)
Mutual labels:  network
Cpp Bredis
Boost::ASIO low-level redis client (connector)
Stars: ✭ 117 (-1.68%)
Mutual labels:  network
Justniffer
Justniffer Just A Network TCP Packet Sniffer .Justniffer is a network protocol analyzer that captures network traffic and produces logs in a customized way, can emulate Apache web server log files, track response times and extract all "intercepted" files from the HTTP traffic
Stars: ✭ 115 (-3.36%)
Mutual labels:  network
Pglib Opf
Benchmarks for the Optimal Power Flow Problem
Stars: ✭ 114 (-4.2%)
Mutual labels:  benchmark

Volley

Volley is a benchmarking tool for measuring the performance (latency in particular) of server networking stacks. It can be used to determine the performance of the lower levels of the stack (i.e. the kernel), of the server application's programming language abstractions for sockets, or of the libraries and code running within the application.

Volley spawns a configurable number of concurrent clients that all connect to the server, and then performs ping-pong-like single-word operations with the server to gather statistics. It will continue doing so for as many iterations as it takes to produce statistically relevant results.

Goals

Volley can be used to benchmark many things, but I believe there are two main categories of servers that are of interest. In particular, I envision that there will be at least two implementations for every language represented in Volley: one that is idiomatic, and one that is optimized. Comparing the idiomatic solutions' performance is interesting in and of itself, and comparing the optimized solutions might yield insights into how well-suited a particular language is for doing high-performance networking.

I say at least two, because there might be other interesting designs to explore. For example, does the conventional wisdom that having a worker pool improves performance actually still hold? What is the performance difference between a forking and a threaded server? What is the performance difference between asynchronous and synchronous I/O?

Preliminary results

Running the volley benchmarks on an 80-core machine running Linux 3.16 with 40, 80 and 200 clients distributed across 40 cores yields the results given in the graph below. Error bars denote the 99% confidence interval. The benchmark machine has four NUMA nodes, each with 10 cores.

performance plot

To reproduce, run:

benchmark/ $ experiment -r $(PWD)/..
benchmark/ $ grep us 'out/*/run-1/stdout.log' | sed '[email protected]/run-[^/]*/[email protected]@' | tr '/:-' '\t' | awk '{printf $2; for (i=3;i<NF-4;i++){printf "-"$i} for (i=NF-4;i<=NF;i++){printf " "$i} print ""}'

And plot using the R script in benchmark/plot.R. Experiment can be found here.

Contributing servers

Please submit PRs adding a directory to servers/. The name of the directory should be indicative of what server is being tested. The directory should contain a Makefile that has (at least) two targets:

  • a target with the same name as the directory. this rule should produce an executable binary with that name in the current directory.
  • a clean rule, which is called whenever the top-level clean target is invoked.

The binary accepts a single, mandatory flag, -p, which names a TCP port. The server should listen on this port for incoming requests. For every established connection, the server behaviour should be as follows:

  1. read 4 bytes from the connection
  2. parse the 4 bytes into a 32 bit integer using network byte order
  3. if the integer is zero, the server should terminate
  4. add one to the integer, wrapping around if necessary
  5. write the integer as 4 bytes in network byte order to the connection
  6. go to step 1.

If a connection is closed, the server should continue waiting for new connections. If the server receives a SIGTERM, it should terminate at its earliest convenience (i.e. it should not block indefinitely waiting for new connctions).

To verify that your server works correctly, run the follwoing commands:

volley/ $ make
volley/ $ ./benchmark/bench.sh 1 1 1 target/servers/<your-server>

This should output something akin to:

numactl -C +0-0 /home/.../volley/target/servers/<server> -p 2222
numactl -C 3-3 /home/.../volley/target/<server> -p 2222 -c 1
priming with 1000000 iterations across 1 clients
iteration complete: mean is 9us, stddev is 1.25us
9.04us

You may also see the error:

./benchmark/bench.sh: line 47: kill: (12345) - No such process

This can safely be ignored, and is an artefact of the fact that the server may terminate when it receives a 0 challenge.

Server improvements

If you believe an already implemented server could be improved (either syntactically or semantically), please file an issue detailing the problem, and if possible, submit a PR giving a proposed solution.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].