Skip to content

Instantly share code, notes, and snippets.

View Jerry-Fix's full-sized avatar

Jerry Jerry-Fix

View GitHub Profile
@Jerry-Fix
Jerry-Fix / op2
Created December 20, 2013 09:56
480G x 12(Intel SSD 3500), raid10
# iozone -Rab output.xls -i 0 -i 1 -i 2 -y 4K -q 2M -n 4K -g 20G -S 8M -+u -f /mnt/10/Bonnie.64999 -z | tee iozone.txt
Iozone: Performance Test of File I/O
Version $Revision: 3.408 $
Compiled for 64 bit mode.
Build: linux
Contributors:William Norcott, Don Capps, Isom Crawford, Kirby Collins
Al Slater, Scott Rhine, Mike Wisner, Ken Goss
Steve Landherr, Brad Smith, Mark Kelly, Dr. Alain CYR,
Randy Dunlap, Mark Montague, Dan Million, Gavin Brebner,
@Jerry-Fix
Jerry-Fix / op1
Created December 20, 2013 09:55
600G x 4(sas, 10k), raid10
Iozone: Performance Test of File I/O
Version $Revision: 3.408 $
Compiled for 64 bit mode.
Build: linux
Contributors:William Norcott, Don Capps, Isom Crawford, Kirby Collins
Al Slater, Scott Rhine, Mike Wisner, Ken Goss
Steve Landherr, Brad Smith, Mark Kelly, Dr. Alain CYR,
Randy Dunlap, Mark Montague, Dan Million, Gavin Brebner,
Jean-Marc Zucconi, Jeff Blomberg, Benny Halevy, Dave Boone,
@Jerry-Fix
Jerry-Fix / nginx dmesg
Created December 17, 2013 14:20
nginx dmesg
[32799839.603312] swapper/14: page allocation failure: order:4, mode:0x4020
[32799839.603317] Pid: 0, comm: swapper/14 Tainted: G W 3.2.0-34-generic #53-Ubuntu
[32799839.603320] Call Trace:
[32799839.603322] <IRQ> [<ffffffff8111ceb6>] warn_alloc_failed+0xf6/0x150
[32799839.603336] [<ffffffff81120c57>] __alloc_pages_nodemask+0x6d7/0x8f0
[32799839.603341] [<ffffffff8157646c>] ? inet_getpeer+0x17c/0x2b0
[32799839.603346] [<ffffffff8153c74b>] ? secure_ip_id+0x3b/0x40
[32799839.603351] [<ffffffff816474de>] kmalloc_large_node+0x57/0x85
[32799839.603357] [<ffffffff81165ea5>] __kmalloc_node_track_caller+0x195/0x1e0
[32799839.603360] [<ffffffff81534d8b>] ? __alloc_skb+0x4b/0x240
@Jerry-Fix
Jerry-Fix / megacli build raid automaticly
Last active December 30, 2015 08:39
megacli build raid automaticly ( raid 0, 1, 5, 10) for benchmark
Create raid
# ./MegaCli -CfgLdAdd -rX[E0:S0,E1:S1,...] [WT|WB] [NORA|RA|ADRA] [Direct|Cached]
[CachedBadBBU|NoCachedBadBBU] [-szXXX [-szYYY ...]]
[-strpszM] [-Hsp[E0:S0,...]] [-AfterLdX] | [FDE|CtrlBased]
[-Default| -Automatic| -None| -Maximum| -MaximumWithoutCaching] [-Cache] [-enblPI] [-Force]-aN
Create RAID 0, 1, 5 drive
# ./MegaCli64 -CfgLdAdd -r(0|1|5) [E:S, E:S, ...] -aN
Create RAID 10 drive
@Jerry-Fix
Jerry-Fix / IO benchamrk with fio, gnuplot
Last active December 30, 2015 02:49
io benchamrk, using fio, gnuplot
set title "SAS 10K 600G diff ioengine(libaio, mmap, sync) benchmark(bandwidth, IOPS) 100% randread"
set xlabel "blocksize(KB)"
set ylabel "bandwidth(MB/s)"
set y2label "IOPS"
set xtics 200
set y2tics 0,100,1500
set grid
set border 15
plot "raid10_diff_ioengine_randread_bandwidth_iops" using 1:2 with linespoints lt 30 title "libaio bandwidth",\
"raid10_diff_ioengine_randread_bandwidth_iops" using 1:3 with linespoints lt 31 title "mmap bandwidth",\
@Jerry-Fix
Jerry-Fix / lld - ss
Created September 26, 2013 14:51
Replace netstat with ss to implement the low level discovery for zabbix
#!/bin/bash
lines=$(sudo ss -lp | grep $1 | awk '{print $3}' | cut -d: -f2 | sort | wc -l)
if [ "$1" == "mongod" ]
then
portarray=(`sudo ss -lp | grep $1 | awk '{print $3}' | cut -d: -f2 | sort | head -n $(($lines/2)) 2>/dev/null`)
else
portarray=(`sudo ss -lp | grep $1 | awk '{print $3}' | cut -d: -f2 | sort 2>/dev/null`)
fi
I spend some time to have some test, all are redhat 6.2, here is the test.
1. Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet(bnx2), host8, E5606x2
# lspci | grep net
01:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
01:00.1 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
02:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
02:00.1 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
# dmidecode -t cache
# dmidecode 2.9
SMBIOS 2.6 present.
Handle 0x0700, DMI type 7, 19 bytes
Cache Information
Socket Designation: Not Specified
Configuration: Enabled, Not Socketed, Level 1
Operational Mode: Write Back
Location: Internal
# cpupower monitor -l
Monitor "Nehalem" (4 states) - Might overflow after 922000000 s
C3 [C] -> Processor Core C3
C6 [C] -> Processor Core C6
PC3 [P] -> Processor Package C3
PC6 [P] -> Processor Package C6
Monitor "SandyBridge" (3 states) - Might overflow after 922000000 s
C7 [C] -> Processor Core C7
PC2 [P] -> Processor Package C2
PC7 [P] -> Processor Package C7
@Jerry-Fix
Jerry-Fix / ring buffer for diff nics
Created August 15, 2013 09:02
ring buffer value
ring buffer:
ethtool -g networkinterface
BCM5709:
Ring parameters for eth0:
Pre-set maximums:
RX: 1020
RX Mini: 0
RX Jumbo: 4080