Here's a preliminary experiment to see how much memory is saved with the new copy-on-write friendly (bitmap marking) GC.
Calculated by memstats.rb https://gist.github.com/kenn/5105061 on Debian x86_64.
# ./memstats.rb 20547
if node[:ec2][:ephemeral][:devices].include?("/dev/sdd") | |
# if we also have sdd and sde, raid0 them and put data there | |
data_raid_block_devs = [ "/dev/sdd", "/dev/sde" ] | |
data_raid_mountpoint = "/mnt/cassandra_data" | |
data_raid_dev = "/dev/md0" | |
data_file_dir = Array(node[:cassandra][:data_file_dirs]).first | |
package "mdadm" do | |
action :install | |
end |
# Create 4 volumes and attach them to hdb | |
%w[sdi sdj sdk sdl].each do |dev| | |
volume = AWS.volumes.new :device => "/dev/#{dev}", :size => 5, :availability_zone => hdb.availability_zone | |
volume.server = hdb | |
volume.save | |
end |
Bluepill.application("THEAPP") do | app | | |
["mail"].each do |worker_type| | |
app.process(worker_type+"_worker") do |process| | |
process.group = "workers" | |
#Refactor this into using rails_env and rails_root variables | |
process.start_command = "cd /home/........production; QUEUE="+worker_type+" rake environment resque:work RAILS_ENV=production" | |
process.daemonize = true | |
process.pid_file = "/tmp/"+worker_type+"_worker.pid" | |
process.start_grace_time = 3.seconds | |
process.stop_grace_time = 5.seconds |
# | |
# Cookbook Name:: nodejs | |
# Recipe:: default | |
# | |
# Build and install node.js | |
# | |
if ['app','app_master','solo'].include?(node[:instance_role]) | |
version_tag = "v0.4.8" | |
source_base_dir = "/data/nodejs" |
#!upstart | |
description "Workers [resque]" | |
start on (local-filesystems and net-device-up IFACE=eth0) | |
stop on shutdown | |
respawn | |
respawn limit 99 5 | |
console none |
check process redis | |
start program = "/usr/bin/redis-server /etc/redis/redis.conf" | |
stop program = "/usr/bin/redis-cli -p 6379 shutdown" | |
with pidfile /var/run/redis.pid |
#!/bin/bash | |
# this script tries to turn your etcd into env vars | |
[[ ! $EHOST ]] && EHOST="$(hostname -I | awk '{ print $1 }')" | |
[[ ! $EPORT ]] && EPORT=4001 | |
[[ ! $ETCD ]] && ETCD="http://${EHOST}:$EPORT" | |
ETCD_FILE="/tmp/$(date +%s).etcd.json" | |
wget "$ETCD/v2/keys/?recursive=true" -O $ETCD_FILE |
{ | |
"title": "Nginx", | |
"services": { | |
"query": { | |
"list": { | |
"0": { | |
"id": 0, | |
"color": "#7EB26D", | |
"alias": "Exclude from Top Page Requests", | |
"pin": false, |
Here's a preliminary experiment to see how much memory is saved with the new copy-on-write friendly (bitmap marking) GC.
Calculated by memstats.rb https://gist.github.com/kenn/5105061 on Debian x86_64.
# ./memstats.rb 20547
require "bundler/capistrano" | |
load 'deploy/assets' | |
# Pretty colors | |
require 'capistrano_colors' | |
# rbenv and ssh forwarding | |
set :default_environment, { 'PATH' => "$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH" } | |
set :default_run_options, { :pty => true, :shell => '/bin/zsh' } | |
set :ssh_options, { :forward_agent => true } |