Skip to content

Instantly share code, notes, and snippets.

View ralph-tice's full-sized avatar

Ralph Tice ralph-tice

  • Kentik
  • Texas
View GitHub Profile
@ralph-tice
ralph-tice / gist:43dfb1ecc8fbc38b8b040fa68a0d32ce
Created July 16, 2017 19:06
docker pull concurrency triage from 2015-07
amazon linux kernel notes -- aufs support -- docker pull concurrency problem
# first hint of a custom AMI for ECS
# https://forums.aws.amazon.com/ann.jspa?annID=2805
# launched with 100gb gp2
aws ec2 run-instances --instance-type c4.xlarge --key-name ralph.tice --image-id ami-8da458e6 --subnet-id subnet-880a3fb2 --security-group-ids sg-ff2f1f9b --block-device-mappings "[{\"DeviceName\":\"/dev/xvda\",\"Ebs\":{\"DeleteOnTermination\":true,\"SnapshotId\":\"snap-f6edf1be\",\"VolumeSize\":100,\"VolumeType\":\"gp2\"}}]"
https://forums.aws.amazon.com/thread.jspa?messageID=628676&#628676
@ralph-tice
ralph-tice / gist:c2943aa672aaa65ecb59
Last active May 16, 2017 02:30
PostgreSQL settings to aggressively vacuum, this config was used for an 18000 TPS steadystate workload on i2.xlarge
#------------------------------------------------------------------------------
# AUTOVACUUM PARAMETERS
#------------------------------------------------------------------------------
#autovacuum = on # Enable autovacuum subprocess? 'on'
# requires track_counts to also be on.
log_autovacuum_min_duration = 0 # -1 disables, 0 logs all actions and
# their durations, > 0 logs only
# actions running at least this number
# of milliseconds.
@ralph-tice
ralph-tice / input.json
Last active January 11, 2017 09:23
updating a json array via jq
{ "arr" : [
{ "id": 3, "bar": "x", "fum": 3.14 },
{ "id": 77, "bar": "y", "fum": 0 },
{ "id": 9, "bar": "z", "fum": -1 }
]
}
@ralph-tice
ralph-tice / keybase.md
Created September 12, 2016 16:05
keybase.md

Keybase proof

I hereby claim:

  • I am ralph-tice on github.
  • I am ralphtice (https://keybase.io/ralphtice) on keybase.
  • I have a public key whose fingerprint is 2ECB 5DF5 33D2 9F96 3BDD 481D 6DF6 0952 9EC9 7B31

To claim this, I am signing this object:

https://papertrailapp.com/systems/setup
# sudo sh
# cd /etc
# wget https://papertrailapp.com/tools/syslog.papertrail.crt
# yum install rsyslog-gnutls
@ralph-tice
ralph-tice / TiceTest.md
Last active May 18, 2016 16:57
The Tice Test

Questions I expect companies I want to work at to get 12/12 yeses:

  1. Does each team own their production stack and manage their own on-call rotation?

  2. Is all code within the organization available to all developers?

  3. Can a new developer onboard and ship to production on their first day?

  4. Is there a well-defined process for making internal projects open source?

[program:kafka]
command = /usr/local/kafka/bin/kafka-run-class.sh -name kafkaServer -loggc kafka.Kafka /usr/local/kafka/config/server.properties
stopwaitsecs = 60
redirect_stderr = true
stdout_logfile = /var/log/kafka/kafka-stdout.log
stdout_logfile_maxbytes = 0
stdout_logfile_backups = 0
stopasgroup=true
environment =
JAVA_HOME="/usr/java/default",
@ralph-tice
ralph-tice / README.md
Last active January 26, 2016 21:36
SolrCloud backups

A little background on my context:

We run multiple Solr JVMs per box, which live in directories like:

/mnt/solr_8983
/mnt/solr_8984
/mnt/solr_8985
...
/mnt/solr_${PORT}
@ralph-tice
ralph-tice / i2.2xlarge #1
Last active January 2, 2016 16:19
unixbench i2.2xlarge bonnie++ output
========================================================================
BYTE UNIX Benchmarks (Version 5.1.3)
System: machine1.com: GNU/Linux
OS: GNU/Linux -- 3.8.0-35-generic -- #50~precise1-Ubuntu SMP Wed Dec 4 17:25:51 UTC 2013
Machine: x86_64 (x86_64)
Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
CPU 0: Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz (5000.1 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
CPU 1: Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz (5000.1 bogomips)
@ralph-tice
ralph-tice / rsyslog.conf
Last active December 22, 2015 22:59
rsyslog testing
#!/usr/bin/perl
use Sys::Syslog qw( :DEFAULT setlogsock );
setlogsock('unix');
openlog('apache', 'cons', 'pid', 'local2');
while ($log = <STDIN>) {
syslog('notice', $log);
}
closelog