This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Latency Comparison Numbers | |
-------------------------- | |
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 | |
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms | |
Read 4K randomly from SSD* 150,000 ns 0.15 ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.alexyang.deferred; | |
import com.stumbleupon.async.Callback; | |
import com.stumbleupon.async.Deferred; | |
import java.util.ArrayList; | |
import org.hbase.async.Bytes; | |
import org.hbase.async.GetRequest; | |
import org.hbase.async.HBaseClient; | |
import org.hbase.async.KeyValue; | |
import org.hbase.async.PutRequest; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.alexyang.scanner; | |
import com.stumbleupon.async.Callback; | |
import com.stumbleupon.async.Deferred; | |
import java.nio.charset.Charset; | |
import java.util.ArrayList; | |
import org.hbase.async.HBaseClient; | |
import org.hbase.async.KeyValue; | |
import org.hbase.async.Scanner; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
func fibonacci() func() int { | |
x, y := 0, 1 | |
return func () int { | |
x, y = x + y, x | |
return x | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "precise64" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/etc/neutron.conf | |
[DEFAULT] | |
debug = False | |
verbos = False | |
state_path = /var/lib/neutron | |
lock_path = $state_path/lock | |
#core_plugin = neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2 | |
core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin | |
service_plugins = neutron.services.l3_router.l3_router_plugin.L3RouterPlugin | |
notification_driver = neutron.openstack.common.notifier.rpc_notifier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# Description: | |
# This application is used to discovery the pyhsical disk by using the MegaCLI tool. | |
# | |
# Author: Alex Yang <[email protected]> | |
# | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
struct log { | |
char func_name[255]; | |
char hour[2]; | |
char minute[2]; | |
char second[2]; | |
bool action; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Cinder Multi Backend | |
[root@node-67 ~]# cinder service-list | |
+------------------+-----------------------------+------+---------+-------+----------------------------+-----------------+ | |
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason | | |
+------------------+-----------------------------+------+---------+-------+----------------------------+-----------------+ | |
| cinder-scheduler | node-67.domain.tld | nova | enabled | up | 2015-07-30T06:15:50.000000 | None | | |
| cinder-volume | node-67.domain.tld@iscsi | nova | enabled | up | 2015-07-30T06:15:50.000000 | None | | |
| cinder-volume | node-70.domain.tld@local-70 | nova | enabled | up | 2015-07-30T06:15:55.000000 | None | | |
+------------------+-----------------------------+------+---------+-------+----------------------------+-----------------+ | |
[root@node-67 ~]# cinder type-list |