Skip to content

Instantly share code, notes, and snippets.

View kcmannem's full-sized avatar
◾️

Krishna Mannem kcmannem

◾️
View GitHub Profile
# Cost of Concourse
If we're able to disect and expose the costs for running Concourse. We can better answer customer questions as to why they're spending so much for this tool. Costs that are caused by running a customers workload may get grouped as a cost for running Concourse itself. By having a framework which decomposes the fixed, variable, and marginal costs, we can better nagivate and control this conversation.
# Types of Cost
By design Concourse has a set of cluster manangment components that drives costs up when compared to similar sized worker pool on other build systems. We can classify this as the __Fixed Cost__ for running Concourse. Regardless of the deployment size, at minimum this cost has to be payed. The supported deployment method of Concourse for our customers is through BOSH, so we mustn't forget it's costs as well.
This is what I see as the minium well running deployement scheme:
@kcmannem
kcmannem / y.md
Last active July 3, 2019 16:47
why zstd breaks

Doing some manual tests of baggageclaim on both linux and darwin.

#DARWIN

In Darwin when we intialize a volume with contents and call stream out with zstd encoding. The output is malformed silently, theres no error thrown by the library for us to detect this. idk why its happening.

/t/test $ curl -X PUT -H "Accept-Encoding: zstd" localhost:7788/volumes/hello/stream-out > thing.zst
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
@kcmannem
kcmannem / stream_in_out_linux_zstd.go
Created May 4, 2019 21:41
baggage claim with zstd streaming
package main
import (
//"bufio"
"bytes"
"fmt"
"github.com/datadog/zstd"
"io"
"io/ioutil"
"os"
[2195605.419924] wbrdg-0afe0044: port 1(wsgj51bidtp3-0) entered blocking state
[2195605.419927] wbrdg-0afe0044: port 1(wsgj51bidtp3-0) entered forwarding state
[2195605.421406] wbrdg-0afe0044: port 1(wsgj51bidtp3-0) entered disabled state
[2195608.972838] wbrdg-0afe0044: port 1(wsgj51bidtp3-0) entered blocking state
[2195608.972842] wbrdg-0afe0044: port 1(wsgj51bidtp3-0) entered forwarding state
[2195609.478141] wbrdg-0afe011c: port 1(wsgj51bidtjq-0) entered disabled state
[2195609.494125] device wsgj51bidtjq-0 left promiscuous mode
[2195609.494148] wbrdg-0afe011c: port 1(wsgj51bidtjq-0) entered disabled state
[2195637.396542] wbrdg-0afe00e4: port 1(wsgj51bidtjk-0) entered disabled state
[2195637.400387] device wsgj51bidtjk-0 left promiscuous mode
@kcmannem
kcmannem / zfs
Created November 26, 2018 17:21
#CREATING
- you can create a zpool manager through img files just like btrfs but its not recommended as it looses all of zfs' control of underlying disks and resiliance depends on the underlying fs. But thats ok since we only care about clone speeds and ability to scale
creating/destroying new filesystems.
- the mount table is populated automatically, will be interesting to how it scales on 100s of filesystems
- These are pretty avg times
- if this is how fast new creates take, damn those cow clones gunna blaze it
root@ownedbykrishna:/home/kmannem# time zfs create test/diek
real 0m0.033s
user 0m0.002s
sys 0m0.013s
version: '2'
services:
log:
image: goharbor/harbor-log:v1.6.0
container_name: harbor-log
restart: always
volumes:
- ../dev/var/log/harbor/:/var/log/docker/:z
- ./common/config/log/:/etc/logrotate.d/:z
ports:
## Configuration file of Harbor
#This attribute is for migrator to detect the version of the .cfg file, DO NOT MODIFY!
_version = 1.6.0
#The IP address or hostname to access admin UI and registry service.
#DO NOT use localhost or 127.0.0.1, because Harbor needs to be accessed by external clients.
hostname = 10.74.5.138
#The protocol for accessing the UI and token/notification service, by default it is http.
#It can be set to https if ssl is enabled on nginx.
@kcmannem
kcmannem / func.S
Last active December 24, 2016 20:43
frame #0: test`testing(x=1, b=2, c=3, d="helo") -> () at test.swift:2
1 func testing(x: Int, b: Int, c: Int, d: String) {
-> 2 }
3 testing(x:1, b:2, c:3, d:"helo")
(lldb) d
test`testing(x : Int, b : Int, c : Int, d : String) -> ():
0x400bc0 <+0>: pushq %rbp
0x400bc1 <+1>: movq %rsp, %rbp
0x400bc4 <+4>: subq $0x30, %rsp
0x400bc8 <+8>: movq %rdi, -0x8(%rbp)
@kcmannem
kcmannem / bt
Last active November 29, 2016 03:26
* thread #1: tid = 22451, 0x0000000000400c93 main`thunk + 35 at func.swift:0, name = 'main', stop reason = signal SIGSEGV: address access protected (fault address: 0x400d38)
frame #0: 0x0000000000400c93 main`thunk + 35 at func.swift:0
1 @_silgen_name("_test")
2 func testing(x: () -> Any) -> Int
3
4 /*func testing(x: () -> Void) {
5 x()
6 }*/
7
(lldb) disassemble
@kcmannem
kcmannem / func.S
Last active November 27, 2016 01:21
.text
.type _test, @function
.globl _test
_test:
call *%rdi
ret