Skip to content

Instantly share code, notes, and snippets.

@mittachaitu
mittachaitu / LVM_Snapshot_performance
Created October 14, 2022 19:06
Checking Performance of Thin LVM volume by creating and deleting thin snapshot without writing data to volume after snapshot creation
Collected performance results for thin lvm volumes along with snapshot (Having snapshot and immediatly deleting snapshot without writing to original volume)
Ran FIO test and collected performance results on following scenarios
Test1:
1. Created thin LVM volume
2. Run FIO 3 times on thin LVM volume
3. Created thin snapshot and immediatly deleted the thin snapshot
4. Run again FIO 3 times on thin LVM volume
Note: Attached results to raw_perf.txt which contains output of `dmsetup status` & `dmsetup table`
{
"volume": {
"spec": {
"num_replicas": 2,
"size": 10485761,
"status": "Created",
"target": {
"node": "mayastor-1",
"protocol": "nvmf"
},
{
"fio version" : "fio-3.16",
"timestamp" : 1610605372,
"timestamp_ms" : 1610605372621,
"time" : "Thu Jan 14 06:22:52 2021",
"global options" : {
"ioengine" : "libaio",
"buffered" : "0",
"rw" : "write",
"bs" : "4k",
@mittachaitu
mittachaitu / fio-per-sec.json
Last active January 18, 2021 10:38
FIO output in json format for every second
{
"fio version" : "fio-3.7",
"timestamp" : 1610442202,
"timestamp_ms" : 1610442202007,
"time" : "Tue Jan 12 14:33:22 2021",
"global options" : {
"ioengine" : "libaio",
"buffered" : "0",
"rw" : "write",
"bs" : "4k",
@mittachaitu
mittachaitu / get_modified_data.go
Created November 29, 2020 08:36
Get modified data from JSON documents
package main
import (
"encoding/json"
jsonpatch "github.com/evanphx/json-patch"
"github.com/pkg/errors"
// "k8s.io/apimachinery/pkg/util/strategicpatch"
)
@mittachaitu
mittachaitu / unstructured_patch.go
Last active November 29, 2020 08:38
Following program will help to solve error(unable to find api field in struct Unstructured for the json field "spec"`) faced while patching unstructured object
package main
import (
"context"
"encoding/json"
"flag"
jsonpatch "github.com/evanphx/json-patch"
"github.com/pkg/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@mittachaitu
mittachaitu / ndm-operator-0.7.0.yaml
Created August 12, 2020 03:34
node disk manager 0.7.0 version
# This is the node-disk-manager related config.
# It can be used to customize the disks probes and filters
apiVersion: v1
kind: ConfigMap
metadata:
name: openebs-ndm-config
namespace: openebs
labels:
openebs.io/component-name: ndm-config
data:
@mittachaitu
mittachaitu / opening_block_file.go
Created July 8, 2020 13:25
It opens the blockfile and doesn't close the fd. Leaving the responsibility to go GC to close the fd
package main
import (
"fmt"
"os"
"runtime"
"sync"
"time"
)