Skip to content

Instantly share code, notes, and snippets.

View martin-g's full-sized avatar
🏠
Working from home

Martin Grigorov martin-g

🏠
Working from home
View GitHub Profile
=========================================================================
Type Ops/sec Hits/sec Misses/sec Latency KB/sec
-------------------------------------------------------------------------
Sets 829.32 --- --- 23.63600 63.87
Gets 8284.10 0.00 8284.10 23.58600 314.61
Waits 0.00 --- --- 0.00000 ---
Totals 9113.42 0.00 8284.10 23.59100 378.48
send=ascii_get,recv=blind_read,conns=40,key_prefix=foobar,pipelines=10,thread=4
send=ascii_set,recv=blind_read,conns=10,key_prefix=foobar,pipelines=4,stop_after=200000,usleep=1000,value_size=10
send=ascii_set,recv=blind_read,conns=100,key_prefix=foobar,value_size=2,value=hi,pipelines=10,thread=4
@martin-g
martin-g / mc-crusher.pl
Last active May 27, 2020 14:14
Perl script that runs mc-crusher with GET/SET config and reads the stats
#!/usr/bin/env perl
# sudo cpan Cache::Memcached
# sudo aptitude install libevent1-dev
# Usage: mc-crusher.pl [timeoutInSecs]. For example: mc-crusher.pl 60
use strict;
use warnings;
@martin-g
martin-g / tomcat-9.x-gc-lock-free.txt
Last active June 5, 2020 12:44
The GC logs while load testing Tomcat Servlet with wrk (wrk -c96 -t8 -d60s host:port). JDK 1.8.0_252, G1GC
[0.003s][info][gc,heap] Heap region size: 2M
[0.003s][info][gc,heap,coops] Heap address: 0x0000000705600000, size: 4010 MB, Compressed Oops mode: Zero based, Oop shift amount: 3
[0.005s][info][gc ] Using G1
[0.034s][info][gc ] Periodic GC disabled
[0.539s][info][gc,start ] GC(0) Pause Young (Normal) (G1 Evacuation Pause)
[0.539s][info][gc,task ] GC(0) Using 6 workers of 8 for evacuation
[0.543s][info][gc,phases ] GC(0) Pre Evacuate Collection Set: 0.1ms
[0.543s][info][gc,phases ] GC(0) Merge Heap Roots: 0.0ms
[0.543s][info][gc,phases ] GC(0) Evacuate Collection Set: 2.6ms
[0.543s][info][gc,phases ] GC(0) Post Evacuate Collection Set: 0.4ms
@martin-g
martin-g / tomcat-9.x-gc-synchronized-stack-queue.txt
Last active June 5, 2020 12:44
The GC logs while load testing Tomcat Servlet with wrk (wrk -c96 -t8 -d60s host:port). JDK 1.8.0_252, G1GC
[0.003s][info][gc,heap] Heap region size: 2M
[0.003s][info][gc,heap,coops] Heap address: 0x0000000705600000, size: 4010 MB, Compressed Oops mode: Zero based, Oop shift amount: 3
[0.005s][info][gc ] Using G1
[0.034s][info][gc ] Periodic GC disabled
[0.536s][info][gc,start ] GC(0) Pause Young (Normal) (G1 Evacuation Pause)
[0.536s][info][gc,task ] GC(0) Using 6 workers of 8 for evacuation
[0.539s][info][gc,phases ] GC(0) Pre Evacuate Collection Set: 0.1ms
[0.539s][info][gc,phases ] GC(0) Merge Heap Roots: 0.1ms
[0.539s][info][gc,phases ] GC(0) Evacuate Collection Set: 2.6ms
[0.540s][info][gc,phases ] GC(0) Post Evacuate Collection Set: 0.4ms
@martin-g
martin-g / Scalac Benchmark aarch64
Created June 24, 2020 08:44
scala/compiler-benchmark> sbt 'set scalaVersion in compilation := "2.13.2"' 'hot -psource=scalap'
[info] Benchmark (corpusPath) (corpusVersion) (extraArgs) (resident) (scalaVersion) (source) Mode Cnt Score Error Units
[info] HotScalacBenchmark.compile ../corpus latest false 2.13.2 scalap sample 240 1364.687 ± 4.602 ms/op
[info] HotScalacBenchmark.compile:compile·p0.00 ../corpus latest false 2.13.2 scalap sample 1306.526 ms/op
[info] HotScalacBenchmark.compile:compile·p0.50 ../corpus latest false 2.13.2 scalap sample 1365.246 ms/op
[info] HotScalacBenchmark.compile:compile·p0.90 ../corpus latest false 2.13.2 scalap sample 1392.509 ms/op
[info] HotScalacBenchmark.compile:compile·p0.95 ../corpus latest false 2.13.2 scalap sample 1400.793 ms/op
[inf
@martin-g
martin-g / Scalac Benchmark x86_64
Created June 24, 2020 08:45
scala/compiler-benchmark> sbt 'set scalaVersion in compilation := "2.13.2"' 'hot -psource=scalap'
[info] Benchmark (corpusPath) (corpusVersion) (extraArgs) (resident) (scalaVersion) (source) Mode Cnt Score Error Units
[info] HotScalacBenchmark.compile ../corpus latest false 2.13.2 scalap sample 418 749.017 ± 2.363 ms/op
[info] HotScalacBenchmark.compile:compile·p0.00 ../corpus latest false 2.13.2 scalap sample 715.129 ms/op
[info] HotScalacBenchmark.compile:compile·p0.50 ../corpus latest false 2.13.2 scalap sample 748.683 ms/op
[info] HotScalacBenchmark.compile:compile·p0.90 ../corpus latest false 2.13.2 scalap sample 765.460 ms/op
[info] HotScalacBenchmark.compile:compile·p0.95 ../corpus latest false 2.13.2 scalap sample 774.898 ms/op
[info] Hot
================================ Sysbench ======================================
sudo apt install sysbench
Summary
==============================================================================================================================
| CPU | MEMORY SEQ | Memory RND | Threads | Mutex | File IO |
| events/sec | writes/sec | writes/sec | # of events | time for 8 events | |
------------------------------------------------------------------------------------------------------------------------------
@martin-g
martin-g / cpu-x86_64.txt
Last active July 9, 2020 11:57
Apache Tomcat performance testing x86_64
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 42 bits physical, 48 bits virtual
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 2
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1