Skip to content

Instantly share code, notes, and snippets.

git clone https://github.com/kellabyte/Haywire.git
cd Haywire
./build.sh -c release
cd benchmark
../bin/wrk/wrk --script ./pipelined_get.lua --latency -d 10s -t 16 -c 32 http://127.0.0.1:8000 -- 64
../bin/wrk/wrk --script ./pipelined_get.lua --latency -d 10s -t 16 -c 32 http://127.0.0.1:8001 -- 64
Ubuntu 14.04.1 LTS \n \l
/boot/grub$ dpkg -l | grep linux-image
ii linux-image-3.13.0-34-generic 3.13.0-34.60 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii linux-image-3.14.5-031405-generic 3.14.5-031405.201405311735 amd64 Linux kernel image for version 3.14.5 on 64 bit x86 SMP
ii linux-image-3.16.0-031600-lowlatency 3.16.0-031600.201408031935 amd64 Linux kernel image for version 3.16.0 on 64 bit x86 SMP
rc linux-image-3.8.0-35-generic 3.8.0-35.50~precise1 amd64 Linux kernel image for version 3.8.0 on 64 bit x86 SMP
ii linux-image-extra-3.13.0-34-generic 3.13.0-34.60 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii linux-image-generic 3.13.0.34.40 amd64 Generic Linux kernel image
ii linux-image-generic-lts-raring 3.13.0.43.50 amd64
#pragma comment (lib, "libuv.lib")
#pragma comment (lib, "ws2_32.lib")
#pragma comment(lib, "psapi.lib")
#pragma comment(lib, "Iphlpapi.lib")
#ifdef PLATFORM_POSIX
#include <signal.h>
#endif // PLATFORM_POSIX
#include <stdio.h>
haywire_hello_world: lib/libuv/src/unix/stream.c:1459: uv_read_start: Assertion `((stream)->io_watcher.fd) >= 0' failed.
Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffff65f2700 (LWP 6445)]
0x00007ffff762b425 in __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x00007ffff762b425 in __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x00007ffff762eb8b in __GI_abort () at abort.c:91
#2 0x00007ffff76240ee in __assert_fail_base (fmt=<optimized out>, assertion=0x428368 "((stream)->io_watcher.fd) >= 0",
./wrk --script ./get.lua --latency -d 30s -t 8 -c 32 -R 30000 http://server:8000 -- 64
Running 30s test @ http://server:8000
8 threads and 32 connections
Thread calibration: mean lat.: 776.155ms, rate sampling interval: 2844ms
Thread calibration: mean lat.: 2560.296ms, rate sampling interval: 9338ms
Thread calibration: mean lat.: 1820.471ms, rate sampling interval: 6823ms
Thread calibration: mean lat.: 467.598ms, rate sampling interval: 1831ms
Thread calibration: mean lat.: 2186.486ms, rate sampling interval: 8626ms
Thread calibration: mean lat.: 2698.650ms, rate sampling interval: 9633ms
Thread calibration: mean lat.: 707.204ms, rate sampling interval: 2703ms

Hardware setup

Client and servers are run on independent machines. Each one has the following.

OS: Ubuntu
Kernel: 3.14.5-031405
RAM: 24GB
CPU: 2 sockets, each socket has a quad core 2.5ghz processor.

Processor topology: https://gist.github.com/kellabyte/8546939

/share/git/hellcat$ ./compile_make.sh
mkdir: cannot create directory âbuildâ: File exists
-- Configuring done
-- Generating done
-- Build files have been written to: /share/git/hellcat/build
/usr/bin/cmake -H/share/git/hellcat -B/share/git/hellcat/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /share/git/hellcat/build/CMakeFiles /share/git/hellcat/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory `/share/git/hellcat/build'
make -f CMakeFiles/hellcat.dir/build.make CMakeFiles/hellcat.dir/depend
counter = 0
arguments = {}
init = function(args)
wrk.init(args)
arguments = args
end
request = function()
pipeline_length = tonumber(arguments[1]) or 1
#!/bin/bash
function run {
NAME=$1
BENCHMARK=$2
RECORDS=$3
VALUE_SIZE=$4
CACHE_SIZE=$5
REUSE_DB=$6
BENCHMARK_NAME=${NAME}_${BENCHMARK}

#Setup

  • Benchmark client: Linux, gigabit LAN, running Wrk benchmark tool.
  • Haywire server: Windows 7, Intel Core i7 930. Haywire running in Release mode.

Haywire is running in single threaded mode (using a IOCP pool for IO) with Haywire event-loop fan-out disabled (broken right now). So this means Haywire won't use all the available cores yet.

#Native results

  • CPU: Peak 5%
  • RAM: 2.5MB