Here is an essay version of my class notes from Class 1 of CS183: Startup. Errors and omissions are my own. Credit for good stuff is Peter’s entirely.
CS183: Startup—Notes Essay—The Challenge of the Future
Purpose and Preamble
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
Here is an essay version of my class notes from Class 1 of CS183: Startup. Errors and omissions are my own. Credit for good stuff is Peter’s entirely.
CS183: Startup—Notes Essay—The Challenge of the Future
Purpose and Preamble
This tutorial guides you through creating your first Vagrant project.
We start with a generic Ubuntu VM, and use the Chef provisioning tool to:
Afterwards, we'll see how easy it is to package our newly provisioned VM
--- | |
# Data needed for Class['openstack::compute'] | |
# The IP and interface that external sources will use to communicate with the instance and hypervisors. | |
openstack::compute::public_interface: 'eth0' | |
openstack::compute::internal_address: "%{ipaddress_eth0}" | |
openstack::compute::iscsi_ip_address: "%{ipaddress_eth0}" | |
# The interface that will handle instance to intance communication and instance outbound traffic. | |
openstack::compute::private_interface: 'eth1' |
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j
"deleteDummyFiles" : { prefix, xFiles -> | |
def p = ~/$prefix.*\.txt/ | |
def counter=0 | |
def howManyfiles = xFiles.toInteger() | |
println "Deleting ${howManyfiles} .txt files '${prefix}*' in ${dummyFilesFolder} ..." | |
new File(dummyFilesFolder).eachFileMatch(p) {f -> | |
if ( counter < howManyfiles ) { | |
counter++ | |
println "Deleting file #${counter} ${f.getName()} ..." | |
f.delete() |
SMALL_LINUX : computeTemplate { | |
// 3839 is a Red Hat Enterprise Linux - 6 (64 bit) | |
imageId "3839" | |
// Mandatory. Files from the local directory will be copied to this directory on the remote machine. | |
remoteDirectory "/tmp/gs-files" | |
// Mandatory. Amount of RAM available to machine. | |
machineMemoryMB 4096 | |
// Mandatory. Hardware ID. | |
hardwareId largeHardwarePrivateOnlyId | |
// Mandatory. All files from this LOCAL directory will be copied to the remote machine directory. |
# PREREQUISITES: | |
# Setup a Mesos cluster and install Marathon framework | |
MARATHON_HOST="http://<marathon_host>/marathon" | |
# this could be an internal ELB that the Gateway nodes can use to auto-discover services | |
INTERNAL_MARATHON_HOST="http://<internal_marathon_host>/marathon" | |
# a wildcard domain configured with *.api.anydomain | |
API_DOMAIN="api.<my-domain>" | |
# ------------------------- |
If you are getting this in gdb on macOS while trying to run a program:
Unable to find Mach task port for process-id 57573: (os/kern) failure (0x5).
(please check gdb is codesigned - see taskgated(8))
gdbc
)