Skip to content

Instantly share code, notes, and snippets.

View unicolet's full-sized avatar

Umberto Nicoletti unicolet

View GitHub Profile
@QuinnyPig
QuinnyPig / resignation.txt
Last active January 31, 2023 06:51
Templated resignation letter
Dear BOSS,
Please accept this letter as formal notification that I am resigning from my position as JOB TITLE with COMPANY. My last day will be DATE OF LAST DAY.
Thank you so much for the opportunity to work in this position for the past DURATION. I’ve greatly enjoyed and appreciated the opportunities I’ve had to WTF DID YOU DO, and I’ve learned many things, all of which I will take with me throughout my career.
During my last two weeks, I’ll do everything possible to wrap up my duties and train other team members. Please let me know if there’s anything else I can do to aid during the transition.
I wish COMPANY continued success, and I hope to stay in touch in the future.
Sincerely,
@likid0
likid0 / tuned.conf
Created May 1, 2019 12:36
RHCS on All Flash Cluster : Performance Blog Series : tuned.conf profile for ceph nodes
cat /usr/lib/tuned/ceph-tuned/tuned.conf
[main]
summary=ceph_perf
[cpu]
governor=performance
energy_perf_bias=performance
min_perf_pct=100
force_latency=1
@saurabhnanda
saurabhnanda / tuning-postgres-zfs.md
Last active August 2, 2023 06:06
Tuning Postgres + ZFS

Tuning ZFS + Postgres to outperform EXT4 + Postgres

Please refer to ZFS 2-3x slower than EXT4 to see how ZFS defaults + Postgres defaults severely underperform EXT4 defaults + Postgres defaults (and also to know more about the system on which these benchmarks were performed). This page documents how to tune ZFS + Postgres to give better performance for the tpcb-like benchmark.

BIG FAT WARNING

Please do not copy these settings blindly because I am myself not clear on why/how these settings had the impact they did. For example, I cannot explain why full_page_writes=off independently did not give that much boost, nor did an optimized PG configuration. However, putting both of them together gave a 2-4x boost compared to baseline numbers.

Benchmark results

import groovy.json.JsonSlurper
import org.sonatype.nexus.repository.storage.Asset
import org.sonatype.nexus.repository.storage.StorageFacet
def DOCKER_REPOSITORY_NAME = 'docker-hosted'
def dockerRepository = repository.repositoryManager.get(DOCKER_REPOSITORY_NAME)
def dockerBlobStore = blobStore.blobStoreManager.get(dockerRepository.configuration.attributes.storage.blobStoreName)
def storageTx = dockerRepository.facet(StorageFacet.class).txSupplier().get()
try {
@leonardofed
leonardofed / README.md
Last active April 24, 2024 01:47
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@ferventcoder
ferventcoder / chocolateyInstall.ps1
Last active September 11, 2015 07:15
MSI package
$ErrorActionPreference = 'Stop';
$packageArgs = @{
packageName = '[[PackageName]]'
unzipLocation = $toolsDir
fileType = 'MSI'
url = '[[Url]]'
url64bit = '[[Url64]]' # 64bit URL here or remove - if installer is both, use $url
silentArgs = "/qn /norestart"
validExitCodes= @(0, 3010, 1641)
@dasjoe
dasjoe / microbench.fio
Last active October 2, 2015 04:59
Useful fio microbenchmarks
; global parameters
[global]
fallocate=none
directory=/tank/bench
bs=4k-128k
size=16g
end_fsync=1
loops=1
rwmixread=70
;buffer_compress_percentage=0
@brendangregg
brendangregg / fsmicrobench.md
Last active February 16, 2022 08:25
some FS micro-benchmarks

F1. FS 128k streaming writes

Benchmark: fio write

Command: fio --name=seqwrite --rw=write --bs=128k --size=4g --end_fsync=1 --loops=4 # aggrb tput

Rationale: Measure the performance of a single threaded streaming write of a reasonably large file. The aim is to measure how well the file system and platform can sustain a write workload, which will depend on how well it can group and dispatch writes. It's difficult to benchmark buffered file system writes in both a short duration and in a repeatable way, as performance greatly depends on if and when the pagecache begins to flush dirty data. As a workaround, an fsync() at the end of the benchmark is called to ensure that flushing will always occur, and the benchmark also repeats four times. While this provides a much more reliable measurement, it is somewhat worst-case (applications don't always fsync), providing closer to a minimum rate – rather than a maximum rate – that you should expect.

F2. FS cached 4k random reads

@ashrithr
ashrithr / kerberos_setup.md
Last active March 19, 2024 16:20
Set up kerberos on Redhat/CentOS 7

Installing Kerberos on Redhat 7

This installation is going to require 2 servers one acts as kerberos KDC server and the other machine is going to be client. Lets assume the FQDN's are (here cw.com is the domain name, make a note of the domain name here):

  • Kerberos KDC Server: kdc.cw.com
  • Kerberos Client: kclient.cw.com

Important: Make sure that both systems have their hostnames properly set and both systems have the hostnames and IP addresses of both systems in

WITH btree_index_atts AS (
SELECT nspname, relname, reltuples, relpages, indrelid, relam,
regexp_split_to_table(indkey::text, ' ')::smallint AS attnum,
indexrelid as index_oid
FROM pg_index
JOIN pg_class ON pg_class.oid=pg_index.indexrelid
JOIN pg_namespace ON pg_namespace.oid = pg_class.relnamespace
JOIN pg_am ON pg_class.relam = pg_am.oid
WHERE pg_am.amname = 'btree'
),