Skip to content

Instantly share code, notes, and snippets.

View jianzzha's full-sized avatar

Jianzhu Zhang jianzzha

  • Red Hat
  • Raleigh, North Carolina
  • 21:03 (UTC -04:00)
View GitHub Profile
@jianzzha
jianzzha / with-dpdk
Last active April 14, 2020 13:43
ovn-perf20
###### on host
setenforce permissive
export PATH=$PATH:/usr/local/share/openvswitch/scripts
export DB_SOCK=/usr/local/var/run/openvswitch/db.sock
ovs-ctl --no-ovs-vswitchd --system-id=random start
ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem="1024,1024"
ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-lcore-mask=0x10000
ovs-vsctl --no-wait set Open_vSwitch . other_config:pmd-cpu-mask=0xfe0000
ovs-ctl --no-ovsdb-server --db-sock="$DB_SOCK" start
@jianzzha
jianzzha / after-centos77-install
Last active April 22, 2020 21:21
super-micro-install
###### add lv for docker vol
fdisk /dev/sdb
# n, p
fdisk /dev/sdc
# n, p
pvcreate /dev/sdb1
pvcreate /dev/sdc1
vgcreate vg_hard_drive /dev/sdb1 /dev/sdc1
lvcreate -n lv_docker --size 1000G vg_hard_drive
mkfs.xfs -n ftype=1 /dev/vg_hard_drive/lv_docker
@jianzzha
jianzzha / alias-lab-single-baremetal-node
Last active September 3, 2020 05:22
OCS 4.3 installatio notes
# after add storage to ocp cluster, wipe storage disk on this node
sgdisk --zap-all /dev/nvme0n1
# (echo n; echo p ; echo 1 ; echo ; echo +1200G; echo p ; echo w) | sudo fdisk /dev/nvme0n1
# check ntp status
timedatectl
# if ntp not synchronized, update /etc/chrony.conf, the following entry works for me:
server gateway iburst
server clock01.util.phx2.redhat.com iburst
server clock02.util.phx2.redhat.com iburst
Starting 8 threads running profile:tcp-rr-1024b-8i ... 0.00 seconds
Txn1 0 / 1.00(s) = 0 8op/s
Txn2 11.58GB / 60.26(s) = 1.65Gb/s 201438op/s
Txn3 0 / 0.00(s) = 0 0op/s
-------------------------------------------------------------------------------
Total 11.58GB / 62.36(s) = 1.59Gb/s 194646op/s
Netstat statistics for this run
-------------------------------------------------------------------------------
Nic opkts/s ipkts/s obits/s ibits/s
@jianzzha
jianzzha / calico, uperf master on host network
Created June 15, 2020 10:45
lower cpu usage when veth is used
Starting 1 threads running profile:tcp-rr-1024b-1i ... 0.00 seconds
Txn1 0 / 1.00(s) = 0 1op/s
Txn2 38.62GB / 60.26(s) = 5.51Gb/s 672063op/s
Txn3 0 / 0.00(s) = 0 0op/s
-------------------------------------------------------------------------------
Total 38.62GB / 62.36(s) = 5.32Gb/s 649403op/s
Netstat statistics for this run
-------------------------------------------------------------------------------
Nic opkts/s ipkts/s obits/s ibits/s
apiVersion: v1
kind: Pod
metadata:
name: uperf-master
spec:
restartPolicy: Never
#hostNetwork: true
containers:
- name: uperf-master
image: cscojianzhan/container-perf-tools
@jianzzha
jianzzha / 1024B-1thread-intra-node
Last active June 20, 2020 19:15
ovn-intra-node-w/o-ACL
Starting 1 threads running profile:tcp-stream-1024b-1i ... 0.00 seconds
Txn1 0 / 1.00(s) = 0 1op/s
Txn2 5.92GB / 60.26(s) = 843.80Mb/s 103003op/s
Txn3 0 / 0.00(s) = 0 0op/s
-------------------------------------------------------------------------------
Total 5.92GB / 62.36(s) = 815.35Mb/s 99529op/s
Netstat statistics for this run
-------------------------------------------------------------------------------
Nic opkts/s ipkts/s obits/s ibits/s
@jianzzha
jianzzha / install.sh
Created July 21, 2020 16:30
ocs+cnv+performance profile setup sequence
function wait_pods_in_namespace () {
ns=${1:-default}
echo "wait pods in ${ns} ready"
while true; do
sleep 3s
count=$(oc get pods -n ${ns} | egrep -v 'Running|Complete|found' | wc -l)
if ((count == 1)); then
break;
fi
done
@jianzzha
jianzzha / install.sh
Created July 21, 2020 16:30
ocs+cnv+performance profile setup sequence
function wait_pods_in_namespace () {
ns=${1:-default}
echo "wait pods in ${ns} ready"
while true; do
sleep 3s
count=$(oc get pods -n ${ns} | egrep -v 'Running|Complete|found' | wc -l)
if ((count == 1)); then
break;
fi
done
@jianzzha
jianzzha / gist:e824b28c174172e8d90f3c2cba900e1d
Last active May 29, 2021 00:33
flexran-build-step-20.11.6
subscription-manager register
subscription-manager attach --auto
subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms
yum groupinstall -y 'Development Tools'
yum install -y git patch tar zip unzip python3 cmake3 libstdc++-static elfutils-libelf-devel zlib-devel numactl-devel libhugetlbfs-devel
pip3 install meson && pip3 install ninja
mkdir -p /opt && cd /opt && git clone git://dpdk.org/dpdk-stable dpdk
cd /opt/dpdk && git checkout 20.11 && patch -p1 < dpdk_20.11_20.11.5.patch
cd /opt && tar zxvf system_studio_2019_update_5_ultimate_edition.tar.gz
cd /opt/system_studio_2019_update_5_ultimate_edition && sed -i -r -e 's/^ACCEPT_EULA=.*/ACCEPT_EULA=accept/' -e 's/^ACTIVATION_TYPE=.*/ACTIVATION_TYPE=license_file/' -e 's%^#?ACTIVATION_LICENSE_FILE=.*%ACTIVATION_LICENSE_FILE=/opt/flexran_license.lic%' silent.cfg