Skip to content

Instantly share code, notes, and snippets.

@imjching
imjching / nginx-tuning.md
Created March 4, 2018 15:42 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@imjching
imjching / README.md
Created April 17, 2018 03:37
virtualbox (boot2docker) vs xhyve (barge-os) benchmarks
@imjching
imjching / gdb_ruby_backtrace.py
Created April 27, 2018 03:17 — forked from csfrancis/gdb_ruby_backtrace.py
Dump an MRI call stack from gdb
# Updated for Ruby 2.3
string_t = None
def get_rstring(addr):
s = addr.cast(string_t.pointer())
if s['basic']['flags'] & (1 << 13):
return s['as']['heap']['ptr'].string()
else:
return s['as']['ary'].string()

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

{
"Ansi 6 Color" : {
"Green Component" : 0.57082360982894897,
"Red Component" : 0.14679534733295441,
"Blue Component" : 0.52502274513244629
},
"Ansi 12 Color" : {
"Red Component" : 0.42023858428001404,
"Color Space" : "Calibrated",
"Blue Component" : 0.93014276027679443,
[jay@archome] cockroach (master)$ go test -test.v -exec 'stress -p=1' -v ./pkg/ccl/sqlproxyccl/ -run TestDirectoryConnect -timeout 0
0 runs so far, 0 failures, over 5s
1 runs so far, 0 failures, over 10s
1 runs so far, 0 failures, over 15s
2 runs so far, 0 failures, over 20s
3 runs so far, 0 failures, over 25s
3 runs so far, 0 failures, over 30s
4 runs so far, 0 failures, over 35s
4 runs so far, 0 failures, over 40s
5 runs so far, 0 failures, over 45s
=== RUN TestConnectionMigration
test_log_scope.go:79: test logs captured to: /tmp/logTestConnectionMigration2409985112
test_log_scope.go:80: use -show-logs to present logs inline
ONE
127.0.0.1:36529
TWO
127.0.0.1:39917
=== RUN TestConnectionMigration/successful_connection
request
{postgresql://root@127.0.0.1:39917/defaultdb?sslcert=test_certs%2Fclient.root.crt&sslkey=test_certs%2Fclient.root.key&sslmode=verify-full&sslrootcert=test_certs%2Fca.crt true}