Skip to content

Instantly share code, notes, and snippets.

Running 10s test @ http://skynet1:8080
  24 threads and 24 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   292.17us   91.68us  16.32ms   98.52%
    Req/Sec     3.44k   204.55     4.89k    58.86%
  Latency Distribution
     50%  285.00us
     75%  323.00us
     90%  347.00us

99% 389.00us

Plaintext 8 threads

Connections: 8		Haywire		Requests/sec:  57334.75
Connections: 8		Go		    Requests/sec:  42901.57
-------------------------------------------------------
Connections: 16		Haywire		Requests/sec:  71460.01
Connections: 16		Go		    Requests/sec:  71891.07
-------------------------------------------------------
Connections: 32		Haywire		Requests/sec:  78421.15
Connections: 32		Go		    Requests/sec:  89202.96

Go 1.2 JSON Serialization

This test is run on Azure so it is more comparable to the EC2 results on Techempower from here:
http://www.techempower.com/benchmarks/#section=data-r8&hw=ec2&test=json

Running 15s test @ http://server:8000/json
  8 threads and 8 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     2.99ms    5.74ms  24.37ms   87.76%

Req/Sec 0.86k 448.25 2.00k 69.91%

OSX i7-3720QM CPU @ 2.60GHz go1.2 darwin/amd64

Performance doesn't increase with GOMAXPROCS it gets worse on OSX!

GOMAXPROCS=1
./websocket_client 1 100000
Sent 400000 in 2.389414969s for a rate of 167404/second

GOMAXPROCS=2
./websocket_client 2 100000

Sent 400000 in 6.219798526s for a rate of 64310/second <-- Lost 100K msgs/second!

package main
import (
"github.com/alecthomas/gozmq"
"fmt"
)
type ClientAgent interface {
ListenAndServe()
Close()

Index using 31.1 bits per integer
Index decoded integers at 775,401,965/sec in 645ms
Compressed bitmap sets at 680,639,707/sec in 735ms
Compressed bitmap using 536,558,060 bytes for 471,997,769 bits set
471,997,769 actual records

Index using 31.1 bits per integer
Index decoded integers at 569,875,343/sec in 877ms
Compressed bitmap sets at 814,863,270/sec in 614ms
Compressed bitmap using 536,558,364 bytes for 472,003,763 bits set

@kellabyte
kellabyte / dstat_csv_output.txt
Last active December 28, 2015 08:09
dstat csv output
dstat -tcmrd --disk-util -ny --output metrics.csv
"system","total cpu usage",,,,,,"memory usage",,,,"io/total",,"dsk/total",,"sda","sdb","sdc","net/total",,"system",
"date/time","usr","sys","idl","wai","hiq","siq","used","buff","cach","free","read","writ","read","writ","util","util","util","recv","send","int","csw"
13-11 15:39:48,14.670,0.850,51.739,32.718,0.0,0.022,5024739328.0,21512192.0,11012661248.0,804286464.0,152.400,3.885,13525800.545,36477.273,2.973,60.063,0.008,0.0,0.0,659.300,621.473
13-11 15:39:49,0.0,0.0,100.0,0.0,0.0,0.0,5024735232.0,21512192.0,11012665344.0,804286464.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1194.0,2830.0,162.0,239.0
13-11 15:39:50,0.500,0.0,99.500,0.0,0.0,0.0,5024735232.0,21512192.0,11012665344.0,804286464.0,0.0,6.0,0.0,24576.0,0.0,0.0,0.0,864.0,1530.0,145.0,228.0
13-11 15:39:51,0.500,0.0,99.500,0.0,0.0,0.0,5024735232.0,21512192.0,11012665344.0,804286464.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,760.0,1513.0,151.0,218.0
runtime.mach_semaphore_wait()
/usr/local/go/src/pkg/runtime/sys_darwin_amd64.s:395 +0xb
runtime.semasleep(0xffffffffffffffff)
/usr/local/go/src/pkg/runtime/os_darwin.c:414 +0xa1
runtime.notesleep(0x4697130)
/usr/local/go/src/pkg/runtime/lock_sema.c:164 +0xc7
stopm()
/usr/local/go/src/pkg/runtime/proc.c:927 +0xe1
findrunnable()
/usr/local/go/src/pkg/runtime/proc.c:1232 +0x42d
{
"type": "tx",
"ops": [
{
"op": "set",
"ks": "users",
"k": "1234",
"v": "asmith"
},
{
package libdazzle
import (
"fmt"
"net/http"
"strconv"
"time"
)
type HttpServer struct {