Skip to content

Instantly share code, notes, and snippets.

View carlosedp's full-sized avatar

Carlos Eduardo carlosedp

View GitHub Profile
@carlosedp
carlosedp / gist:920fdb49c7f007e423fb8963fa1894e3
Last active November 8, 2018 17:13
Go 1.11.2 Crypto bench - LattePanda Alpha
$ go test crypto/tls -bench BenchmarkThroughput
goos: windows
goarch: amd64
pkg: crypto/tls
BenchmarkThroughput/MaxPacket/1MB-12 200 7624757 ns/op 137.52 MB/s
BenchmarkThroughput/MaxPacket/2MB-12 100 12471020 ns/op 168.16 MB/s
BenchmarkThroughput/MaxPacket/4MB-12 50 23020256 ns/op 182.20 MB/s
BenchmarkThroughput/MaxPacket/8MB-12 30 42115840 ns/op 199.18 MB/s
BenchmarkThroughput/MaxPacket/16MB-12 20 81859070 ns/op 204.95 MB/s
BenchmarkThroughput/MaxPacket/32MB-12 10 147322600 ns/op 227.76 MB/s
@carlosedp
carlosedp / gist:27931cb6bfbbd3be187fcdec15639021
Last active November 8, 2018 17:14
Go 1.11.2 Crypto bench - Macbook Pro 15 2018
$ GOMAXPROCS=12 go test crypto/tls -bench BenchmarkThroughput
goos: darwin
goarch: amd64
pkg: crypto/tls
BenchmarkThroughput/MaxPacket/1MB-12 500 3445840 ns/op 304.30 MB/s
BenchmarkThroughput/MaxPacket/2MB-12 300 5793462 ns/op 361.99 MB/s
BenchmarkThroughput/MaxPacket/4MB-12 100 10720943 ns/op 391.23 MB/s
BenchmarkThroughput/MaxPacket/8MB-12 100 21203382 ns/op 395.63 MB/s
BenchmarkThroughput/MaxPacket/16MB-12 30 38736857 ns/op 433.11 MB/s
BenchmarkThroughput/MaxPacket/32MB-12 20 75047089 ns/op 447.11 MB/s
# 12 process benchmarks for the crypto library BenchmarkThroughput
#RK3399 vs LattePanda
➜ benchcmp rk3399.txt latte.txt
benchmark old ns/op new ns/op delta
BenchmarkThroughput/MaxPacket/1MB-12 33703977 7624757 -77.38%
BenchmarkThroughput/MaxPacket/2MB-12 50824996 12471020 -75.46%
BenchmarkThroughput/MaxPacket/4MB-12 85682448 23020256 -73.13%
BenchmarkThroughput/MaxPacket/8MB-12 102965754 42115840 -59.10%
BenchmarkThroughput/MaxPacket/16MB-12 244088459 81859070 -66.46%
apiVersion: v1
kind: List
items:
- apiVersion: v1
kind: Namespace
metadata:
name: weave
annotations:
cloud.weave.works/version: unknown
- apiVersion: v1
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: scope-dashboard
namespace: weave
annotations:
traefik.frontend.rule.type: PathPrefix
spec:
rules:
- host: scope.internal.domain.com
@carlosedp
carlosedp / main.yml
Created January 28, 2019 19:02
Ansible playbook to automate new Kubernetes SBC nodes
---
- name: Setup SBC
hosts: all
#become: true
#become_user: root
gather_facts: false
vars:
#New user to be created
new_user: newuser
@carlosedp
carlosedp / openshift_network.md
Last active November 27, 2023 09:47
Openshift Network Sizing

Openshift Network Sizing

Parameters on inventory [OSE3:vars]

osm_host_subnet_length

This variable specifies the size of the per host subnet allocated for pod IPs by OpenShift Container Platform SDN. Defaults to 9 which means that a subnet of size /23 is allocated to each host; for example, given the default 10.128.0.0/14 cluster network, this will allocate 10.128.0.0/23, 10.128.2.0/23, 10.128.4.0/23, and so on. This cannot be re-configured after deployment.

osm_cluster_network_cidr

@carlosedp
carlosedp / Openshift-F5-Config.md
Created April 25, 2019 21:38
F5 BigIP Configuration for OpenShift

Configuring F5 Big IP for OpenShift

Master LB

create ltm monitor https ocp-master-mon defaults-from https send "GET /healthz"
create ltm node openshift-master-1.myorg.com fqdn { name openshift-master-1.myorg.com }
create ltm node openshift-master-2.myorg.com fqdn { name openshift-master-2.myorg.com }
create ltm node openshift-master-3.myorg.com fqdn { name openshift-master-3.myorg.com }
create ltm pool master.myorg.com monitor ocp-master-mon members add { openshift-master-1.myorg.com:443 openshift-master-2.myorg.com:443 openshift-master-3.myorg.com.com:443 }

create ltm virtual OpenShift-Master pool master.myorg.com source-address-translation { type automap } destination 192.168.10.100:443

FROM linuxkit/alpine:86cd4f51b49fb9a078b50201d892a3c7973d48ec AS mirror
RUN apk add --no-cache go musl-dev
ENV GOPATH=/go PATH=$PATH:/go/bin
COPY main.go /go/src/binfmt/
RUN go-compile.sh /go/src/binfmt
FROM scratch
ENTRYPOINT []
@carlosedp
carlosedp / .config
Created May 3, 2019 23:23
Odroid N2 Kernel config
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 4.9.170 Kernel Configuration
#
CONFIG_ARM64=y
CONFIG_64BIT=y
CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
CONFIG_MMU=y
CONFIG_DEBUG_RODATA=y
CONFIG_ARM64_PAGE_SHIFT=12