Skip to content

Instantly share code, notes, and snippets.

View PatrickDehkordi's full-sized avatar

Patrick Dehkordi PatrickDehkordi

  • Solarflare
  • USA
View GitHub Profile
@PatrickDehkordi
PatrickDehkordi / 100Gbs.md
Last active May 9, 2019 15:28
100Gbs Performance Optimization

100Gbs

  • install latest sfutil
  • sfupdate
  • update sfc
  • install nmon (optional for debug abd monitoring)
  • install either iperf, iperf3, netperf, sockperf, sfnettest
  • ifconfig p1p1 mtu 64, 1500, 9200
  • NUMA taskset -c 0,1 (CPU Pinned)
  • Open one socket per core.
  • BIOS HT Disabled
@PatrickDehkordi
PatrickDehkordi / web.md
Last active May 21, 2019 23:52
How to think about Web Protocols: HTTP, SPDY, WEBSOCKETS, QUIC, TCP, UDP, other in simple terms.

What are the various web protocols? How do they differ?

Two popular lower layer protocols that web protocols use called transport layer protocols:

Requires an agreement or a handshake. The advantage is a from of gaurantee in delivery. It is a connection-based stateful protocol. This makes the transmission more reliable, but also more costly and slower.

Compared to TCP, there is no strict requirment or hadshake.

@PatrickDehkordi
PatrickDehkordi / intro.md
Last active May 3, 2019 22:35
Technical Resources

REFERENCE MATERIALS:

Slides:

Presentation Material

I exclude sensitive materials, roadmaps, etc the best I can. So feel free to share. I WANT customers to be able to find this info, not the opposite. If you see something that you believe SHOULD NOT be shared please report. This preso requires the link above to be viewed and it is only semi-public, but in a month or two, I will place at more public places, and include in Google search engine.

@PatrickDehkordi
PatrickDehkordi / DPDK on AWS howto
Last active February 15, 2020 07:57
Installing and configuring DPDK on AWS
sudo yum install numactl-devel
wget https://fast.dpdk.org/rel/dpdk-17.11.2.tar.xz
cd dpdk-stable-17.11.2/
make config T=x86_64-native-linuxapp-gcc
make
sudo modprobe uio
sudo insmod /home/ec2-user/dpdk-stable-17.11.2/build/kmod/igb_uio.ko
sudo yum install pciutils
sudo vi /etc/sysctl.conf vm.nr_hugepages = 1024
sudo sysctl -p
@PatrickDehkordi
PatrickDehkordi / nvmf.sh
Last active October 4, 2017 16:14
nvmf
#!/bin/bash
CPUS="1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,0"
NIC="eth4"
LGB_NVMF_PORT=4420
SFC_NVMF_PORT=11345
WR_USR="rs"
#NIC="enp3s0f0"
trap "exit -1" TERM
[global]
bs=512
iodepth=1
direct=1
randrepeat=0
group_reporting
time_based
runtime=60
rw=randrw
rwmixread=0
/*
** This file is part of Solarflare SolarCapture.
**
** You may freely copy code from this sample to incorporate into your own
** code.
**
**
** Copyright 2012-2015 Solarflare Communications Inc.
** 7505 Irvine Center Drive, Irvine, CA 92618, USA
**
CREATING syn flood and web work load:
%hping3 -I p1p1 -p 8701 -S -V --flood 192.168.50.1
%wrk -t8 -c1000 -d10s http://192.168.50.1:8701
DRIVER VERSION
%route add default gw a.b.31.254 em1
%ethtool -i p1p1
CPU
Set the cpupower to the approriate governor profile.
@PatrickDehkordi
PatrickDehkordi / EthernetFrame.txt
Last active September 15, 2016 21:01
Ethernet Frame Size calculation
Layer 1 Overhead:
Preamble (8 Bytes) + Ethernet Frame + Interpacket Gap (12 Bytes) = 20 Bytes
Layer 2 Overhead:
MAC Address (12 Bytes) + VLAN (4 Bytes) + Ethertype (2 Bytes) + IP Frame + CRC (4 bytes) = 18-22 Bytes
Layer 3:
Minimum is 46 Bytes. This is also known as MTU or Payload. It includes Layers 3 Headers.
Total if including layer 1 is 20 Bytes + 18 Bytes + 46 Bytes = 84 Bytes (88 with VLAN)
hping3 192.168.10.1 -i -V --udp -p 5001 -I p2p1 --flood --rand-source & \
> hping3 192.168.10.1 -i -V --udp -p 5002 -I p2p1 --flood --rand-source & \
> hping3 192.168.10.1 -i -V --udp -p 5003 -I p2p1 --flood --rand-source & \
> hping3 192.168.10.1 -i -V --udp -p 5004 -I p2p1 --flood --rand-source
taskset -c 21 iperf3 -p 5001 -f m -i 4 -V -c 192.168.10.1 -u -t 16 -b 0 & taskset -c 19 iperf3 -p 5002 -f m -i 4 -V -c 192.168.10.1 -u -t 16 -b 0 & taskset -c 17 iperf3 -p 5003 -f m -i 4 -V -c 192.168.10.1 -u -t 16 -b 0 & taskset -c 15 iperf3 -p 5004 -f m -i 4 -V -c 192.168.10.1 -u -t 16 -b 0
taskset -c 6 iperf3 -p 5001 -f m -B 192.168.10.1 -s & taskset -c 6 iperf3 -p 5002 -f m -B 192.168.10.1 -s & taskset -c 6 iperf3 -p 5003 -f m -B 192.168.10.1 -s & taskset -c 6 iperf3 -p 5004 -f m -B 192.168.10.1 -s & taskset -c 6 iperf3 -p 5005 -f m -B 192.168.10.1 -s & taskset -c 6 iperf3 -p 5006 -f m -B 192.168.10.1 -s & taskset -c 6 iperf3 -p 5007 -f m -B 192.168.10.1 -s & taskset -c 6 iperf3 -p 5008 -f m -B 192.168.10.1 -s