Skip to content

Instantly share code, notes, and snippets.

Yuvaraj L skyrocknroll

Block or report user

Report or block skyrocknroll

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
skyrocknroll / thrash.fio
Created Dec 4, 2019 — forked from tobert/thrash.fio
fio config to do 50/50 r/w thrashing IO load across a few drives
View thrash.fio
# a 5 minute disk thrashing benchmark
# generates equal amounts of random read and write IO on every drive
# will generate metrics for each drive
View Install protobuf 3.6.1 on Ubuntu 16.04
#! /bin/bash
# Make sure you grab the latest version
curl -OL
# Unzip
unzip -d protoc3
# Move protoc to /usr/local/bin/
sudo mv protoc3/bin/* /usr/local/bin/
View postgres_queries_and_commands.sql
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
skyrocknroll / cgo1.go
Created Apr 4, 2019 — forked from tejainece/cgo1.go
Examples of calling C code from Golang
View cgo1.go
package main
//void inC() {
// printf("I am in C code now!\n");
import "C"
import "fmt"
func main() {
skyrocknroll / go
Last active Mar 31, 2019
[foundationdb] #foundationdb #go
View go
* install the latest fdb client
* go mod init fdblearn
* go get
* make sure you set apiVersion to <= 600
* because the client library installed is 6.0.18 which is 600. 610 can be used only when 6.1.x client libraries are installed
* invalidate the cache and restart if ide complains.
skyrocknroll /
Created Mar 12, 2019 — forked from neomantra/
Notes on running Redis with HPC techniques

High Performance Redis

In response to this brief blog entry, @antirez tweeted for some documentation on high-performance techniques for Redis. What I present here are general high-performance computing (HPC) techniques. The examples are oriented to Redis. but they work well for any program designed to be single- or worker-threaded and asynchronous (e.g. uses epoll).

The motivation for using these techniques is to maximize performance of our system and services. By isolating work, controlling memory, and other tuning, you can achieve significant reduction in latency and increase in throughput.

My perspective comes from the microcosm of my own bare-metal (vs VM), on-premises deployment. It might not be suitable for all scenarios, especially cloud deployments, as I have little experience with HPC there. After some discussion, maybe this can be adapted as [ documentation](

skyrocknroll /
Created Feb 25, 2019
[apache pulsar] #python #client #seek #begining
import pulsar
from pulsar import MessageId
client = pulsar.Client('pulsar://',)
consumer = client.subscribe('persistent://public/default/my-topic-3', 'test-sub5',)
while True:
skyrocknroll /
Last active Jan 7, 2019
pulsar client #mac #pulsar
  • export PULSAR_PATH="/Users/yuvaraj.loganathan/workspace/pulsar"
  • cd ${PULSAR_PATH}/pulsar-client-cpp/
  • brew install protobuf260 boost boost-python log4cxx jsoncpp
  • brew upgrade cmake
  • brew install boost-python3
  • brew install clang-format
  • brew install llvm --with-toolchain
  • ln -s "/usr/local/opt/llvm/bin/clang-format" "/usr/local/bin/clang-format"
  • ln -s "/usr/local/opt/llvm/bin/clang-tidy" "/usr/local/bin/clang-tidy"
skyrocknroll /
Last active Oct 4, 2019
[Jolokia JVM Metrics] #jolokia #jvm #metrics
  • java -javaagent:jolokia-jvm-1.6.0-agent.jar=port=8888,host= -jar target/in.hack4geek.sppring2-1.0-SNAPSHOT.jar
  • java -jar jolokia-jvm-1.6.0-agent.jar start <pid/regex> for already running process
  • http://localhost:8778/jolokia/read/java.lang:type=Threading/ThreadCount
  • Use visualVM or JvisulaVM to get the list of Mbeans.
  • Mbean with value http://localhost:8778/jolokia/read/java.lang:name=MarkSweepCompact,type=GarbageCollector
  • The order matters java.lang:name=MarkSweepCompact,type=GarbageCollector if you try this java.lang:type=GarbageCollector,name=MarkSweepCompact this fails
  • curl "http://localhost:8778/jolokia/read/java.lang:name=MarkSweepCompact,type=GarbageCollector/LastGcInfo/memoryUsageBeforeGc" | jq
skyrocknroll / Vagrantfile
Last active Nov 13, 2019
[Vagrant] #vagrant #multimachine
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
BOX_IMAGE = "ubuntu/xenial64"
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
You can’t perform that action at this time.