Skip to content

Instantly share code, notes, and snippets.

View likid0's full-sized avatar

Daniel Parkes likid0

View GitHub Profile
@likid0
likid0 / ceph_large_omap_objets_warning
Created December 4, 2020 22:09
Ceph Large omap objects
#Check bucket limits:
$ radosgw-admin bucket limit check | jq '.[].buckets[].fill_status' | uniq
$ radosgw-admin bucket limit check | jq '.[].buckets[].objects_per_shard' | sort -n | uniq
#Default WARN Thresholds:
"osd_deep_scrub_large_omap_object_key_threshold": "2000000",
"osd_deep_scrub_large_omap_object_value_sum_threshold": "1073741824" #1G
#Warnings you get in the cluster log:
@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
@likid0
likid0 / ceph.conf
Last active August 11, 2025 03:48
RHCS on All Flash Cluster : Performance Blog Series : ceph.conf template file
### PLEASE TAKE IN ACCOUNT THIS FILE IS CONFIGURED FOR BECHNMARK TESTING OF CEPH NOT PRODUCTION USE
[client]
rbd cache = False
[client.openstack]
admin socket = /var/run/openstack/$cluster-$type.$id.$pid.$cctid.asok
log file = /var/log/ceph/qemu-guest-$pid.log
@likid0
likid0 / fio-template.job
Last active May 13, 2025 04:37
RHCS on All Flash Cluster : Performance Blog Series : Configuration template for FIO
[global]
ioengine=rbd
clientname=admin
pool=rbdpool
#IO-Depth changes depending on the test
iodepth=$IODEPTH
runtime=600
direct=1
sync=0
buffered=0
import boto3
import time
import datetime
from dateutil import parser
import botocore.exceptions
from colorama import init, Fore, Style
from rich.console import Console
from rich.table import Table
from rich.panel import Panel
from rich.progress import Progress, SpinnerColumn, TextColumn

TXC 2024 - Lab 1518 Helper Commands

Chapter 1

Accessing your Workstation via ssh: export USERNAME={your_username} export USERIP={your_public_ip} chmod 0600 ~Downloads/ssh_private_key.pem ssh -i ~/Downloads/ssh_private_key.pem -p 2223 ${USERNAME}@${USERIP}

@likid0
likid0 / gist:3c12a275fc912e8b2af0fa3cd3ce0d5c
Created March 11, 2024 11:01
Basic example script to test if IAM/STS assume role with web identity is working
#!/bin/bash
export AWS_CA_BUNDLE="/etc/pki/ca-trust/source/anchors/cert.pem"
unset AWS_ACCESS_KEY_ID
unset AWS_SECRET_ACCESS_KEY
unset AWS_SESSION_TOKEN
echo "Getting the JWT from SSO..."
KC_ACCESS_TOKEN="$(./get_web_token.sh $1 $2 | jq -r '.id_token')"
if [ $? != 0 ] ; then echo "Failed to get token from SSO" ; exit 1 ; fi
echo -e "\n"
@likid0
likid0 / gist:eb8a05b130a5c0d00805bf08cfdb806f
Created March 11, 2024 10:55
Ugly Example, just for testing and inspecting a JWT token using curl
# cat check_token.sh
USERNAME=$1
PASSWORD=$2
KC_CLIENT="ceph"
KC_CLIENT_SECRET="XXXXXSECRETXXXX"
KC_ACCESS_TOKEN="$(./get_web_token.sh $USERNAME $PASSWORD | jq -r '.access_token')"
KC_SERVER="https://keycloak-sso.apps.example.local"
KC_CONTEXT="auth"
KC_REALM="ceph"
curl -k -s -q \
#!/bin/bash
SITE1=cluster1
SITE2=cluster2
TOKEN='irw4CeuS7CgbSLMk6/k2YDJkAXmAKdndCYMZ4XXTYtwrTXgX6oghTbS4su7WMq4WAi'
HOOK1=http://rocket-chat-rocket-chat.apps.bos1.chris.ocs.ninja/hooks/${TOKEN}
HOOK2=http://rocket-chat-rocket-chat.apps.bos2.chris.ocs.ninja/hooks/${TOKEN}
TIME=10
export NUMBER1=0
export NUMBER2=0
while true ; do
@likid0
likid0 / Ceph Bluestore Compression Perf Stats
Created August 27, 2019 10:58
Ceph Bluestore Compression Perf Stats for the tests run with: 84 rbd volumes, 32 IO-Depth, 100% Random Write.
These are the compression perf stats for the tests run with: 84 rbd volumes, 32 IO-Depth, 100% Random Write.
FIO config:
- LibRBD engine
- refill_buffers
- buffer_compress_percentage=80
- buffer_pattern=0xdeadfac
Ceph config:
- bluestore_compression_algorithm: snappy