Skip to content

Instantly share code, notes, and snippets.

View kofemann's full-sized avatar
Working on the next great thing....

Tiramisu Mokka kofemann

Working on the next great thing....
View GitHub Profile
@kofemann
kofemann / dcache-on-linux.md
Last active April 8, 2022 01:09
dtrace on linux

#Get started with DTrace on linux ####(with CentOS7/SL7/RHEL7)

  1. add YUM repo
$ cd /etc/yum.repos.d
$ wget http://public-yum.oracle.com/public-yum-ol7.repo
$ rpm --import http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol7
@kofemann
kofemann / NetorkInterfaceFtracer.java
Last active January 12, 2016 15:40
btrace script
import com.sun.btrace.annotations.*;
import com.sun.btrace.aggregation.Aggregation;
import com.sun.btrace.aggregation.AggregationKey;
import com.sun.btrace.aggregation.AggregationFunction;
import static com.sun.btrace.BTraceUtils.*;
/**
* run as:
* $ su dcache -c "/opt/btrace/bin/btrace <pid> NetorkInterfaceFtracer.java"
*/
@kofemann
kofemann / dcache-namespace.md
Last active January 27, 2016 16:20
dCache namespace requirements

dCache namespace requirements

Introduction

####This document describes requirements for dCache's namespace (directory) service. It's heavily biased on current chimera implementation.

The main role of namespace in dCache is to provide a hierarchical structure to manage and file system objects, collection of objects, aka directories, and provide an access to the metadata associated with them. Every data file in dCache has an associated object in the namespace. Typically a change of object in the namespace, like changing the object name or changing objects ownership, does not changes the state of the data file in dCache. Each object in the namespace has a unique objID. We expect that objIDs are permanent, e.q. there objID will always point to the same data file independent from it location, state in the dCache and existence. The objIDs can’t be recycled and reused for new objects after deletion. Every object has a set of associated attributes. Some attributes are

@kofemann
kofemann / PnfsManagerTrace.java
Created May 18, 2016 11:19
btrace script to trace db interracions
import com.sun.btrace.annotations.*;
import com.sun.btrace.aggregation.Aggregation;
import com.sun.btrace.aggregation.AggregationKey;
import com.sun.btrace.aggregation.AggregationFunction;
import com.sun.btrace.AnyType;
import static com.sun.btrace.BTraceUtils.*;
@BTrace
public class PnfsManagerTrace {
@kofemann
kofemann / dcache-ceph.md
Last active January 11, 2017 14:01
dCache with CEPH

Using CEPH as a backend for dCache pools

dCache pool -> CEPH releation

dCache pools are mapped one-to-one with CEPH pools, e.g. CEPH pool is used by a single dCache pool. To store files in CEPH, dCache uses RBD interface. For eache file in dCache pool a sigle RBD image is created.

@kofemann
kofemann / BadCookie.java
Created May 27, 2017 09:50
btrace script to print error message passes to BadCookieException constructor
import com.sun.btrace.annotations.*;
import static com.sun.btrace.BTraceUtils.*;
import org.dcache.nfs.status.BadCookieException;
import org.dcache.nfs.status.AccessException;
@BTrace public class BadCookie {
@OnMethod(
@kofemann
kofemann / hand-on-git.md
Last active July 31, 2017 15:57
Git tutorial for beginners

Hands on GIT

Get started

create your own fork and clone newly created repo:

$ git clone https://github.com/kofemann/dcache.git
@kofemann
kofemann / code-guideline.md
Last active August 9, 2017 10:28
dCache code guideline

dCache code guideline

Spaces vs Tabs

dCache projects uses four (4) spaces indention. Some historic code still have mixed style. However, the newly written code must stick to spaces.

@kofemann
kofemann / PnfsHandler.java
Last active August 9, 2017 20:45
BTrace script to catch source of clearCacheLocation message
import com.sun.btrace.annotations.*;
import static com.sun.btrace.BTraceUtils.*;
@BTrace
public class PnfsHandler {
@OnMethod(
clazz="diskCacheV111.util.PnfsHandler",
method="clearCacheLocation"
)
@kofemann
kofemann / virtual-guest-nfs-client.conf
Created December 13, 2017 12:31
tuned profile for VM based nfs client
#
# tuned configuration
# /etc/tuned/virtual-guest-nfs-client/tuned.conf
#
[main]
summary=Optimize for running inside a virtual guest
include=throughput-performance
[sysctl]