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:3d6e5b2076cbc2900aaa
Last active December 25, 2018 11:17
terraform for 3 AZ VPC with NAT instance with autorecovery
###########
# Variables
###########
variable "aws_key_name" {
default = "mykeypair"
}
variable "region" {
default = "eu-west-1"
}
@ralph-tice
ralph-tice / benchmark-commands.txt
Created October 1, 2015 19:35 — forked from jkreps/benchmark-commands.txt
Kafka Benchmark Commands
Producer
Setup
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test --partitions 6 --replication-factor 3
Single thread, no replication
bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=esv4-hcl198.grid.linkedin.com:9092 buffer.memory=67108864 batch.size=8196
@ralph-tice
ralph-tice / gist:cf5d9b46da095a2f6df7
Created January 15, 2015 17:51
ssh config for transparent ssh through amazon NAT AMIs to ubuntu private instances
Host *.vpc.mycorp.com
User ubuntu
ProxyCommand ssh -W %h:%p ec2-user@nat.mycorp.com
IdentityFile "~/.ssh/mykey.pem"
Host 172.1.*
User ubuntu
ProxyCommand ssh -W %h:%p ec2-user@nat.mycorp.com
IdentityFile "~/.ssh/mykey.pem"
Host nat.mycorp.com
@ralph-tice
ralph-tice / multi-terminals.sh
Created October 22, 2014 01:11
Open an iTerm to every instance in an AutoScaling Group using aws-cli, knife and jq
launch_terms () {
until [ -z "$1" ] # Until uses up arguments passed...
do
/usr/bin/osascript <<-EOF
tell application "iTerm"
make new terminal
tell the current terminal
activate current session
launch session "Default Session"
tell the last session
@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 / .bashrc or .bash_profile
Last active August 29, 2015 14:06
Connecting to an EC2 instance in a oneliner
sshto() {
ssh ubuntu@`knife ec2 server list | grep $1 | awk '{print $3}'`
}
# ex usage: sshto i-12341234
-verbose:gc \
-XX:+PrintGCDetails \
-XX:+PrintGCDateStamps \
-XX:+PrintGCTimeStamps \
-XX:+PrintHeapAtGC \
-XX:+PrintTenuringDistribution \
-XX:+PrintGCApplicationStoppedTime \
-XX:+PrintGCApplicationConcurrentTime \
-XX:+UseGCLogFileRotation \
-XX:NumberOfGCLogFiles=5 \
@ralph-tice
ralph-tice / gist:458d765cdb9a35bf3dfd
Last active February 13, 2024 18:21
Cloud RAM pricing

AWS u-24tb1.112xlarge:

  • 448 vCPUs
  • 24576 GiB RAM
  • 3 year reservation all upfront cost: $1.65M
  • Monthly effective rate: $44,585
  • $1.81 per GB per month
  • Additional discounts for volume (5% >250K, 10% > $2M)
  • Source updated 2/13/2024

GCE m3-ultramem-128:

@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 / 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)