Www.cct.lsu.edu



Linux compile:Get the source codeApt-get updateApt-get install linux-sourceedit the config file:root@pc:~/kernel_src/linux-2.6.34# make menuconfigProcessor type and features --->[ ] Tickless System (Dynamic Ticks) [*] High Resolution Timer Support Processor family (Opteron/Athlon64/Hammer/K8) ---> Preemption Model (Preemptible Kernel (Low-Latency Desktop)) ---> Timer frequency (2000 HZ) --->Power management and ACPI options ---> CPU Frequency scaling --->[ ] CPU Frequency scaling Kernel hacking --->[ ] Kernel debugging make oldconfig Then, start to compile:root@pc:~/kernel_src/linux-2.6.34# make -j9Start compiling to kernel modules:root@pc:~/kernel_src/linux-2.6.34# make -j9 modules Install kernel modules (become a root user, use su command):root@pc:~/kernel_src/linux-2.6.34# make -j9 modules_installInstall kernelroot@pc:~/kernel_src/linux-2.6.34# make -j9 install Create an initrd image# cd /boot !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!root@pc:/boot# mkinitramfs -o initrd.img-2.6.34-2kHZ 2.6.34-2kHZ## the last name 2.6.34-2kHZ locates in /lib/modules/2.6.34-2kHZupdate grub2:root@pc:/boot# update-grubGenerating grub.cfg ...Found linux image: /boot/vmlinuz-2.6.34-2kHZFound initrd image: /boot/initrd.img-2.6.34-2kHZFound linux image: /boot/vmlinuz-2.6.32.15+drm33.5-baseFound initrd image: /boot/initrd.img-2.6.32.15+drm33.5-baseFound linux image: /boot/vmlinuz-2.6.32-21-serverFound initrd image: /boot/initrd.img-2.6.32-21-serverFound memtest86+ image: /memtest86+.bindonepatch kernel: a single kernel module in UbuntuIn the Ubuntu source directory,Make M=/path/to/modulemake M=~/linux-2.6.39.3/net/sched/And then do: rmmod module, and modprobe module, insmod?For Linux Queue, need to change the parameters for RED, CHOKE…Parameter “max” is not working in int_32, so change it to int_64root@router1:/usr/src/linux-2.6.39.3# grep -r "linxue" ../net/sched/sch_choke.c: //linxue./net/sched/sch_choke.c: //printk(KERN_DEBUG "\n linxue");./net/sched/sch_choke.c.bak: //linxue./include/linux/pkt_sched.h://linxue./include/linux/pkt_sched.h://linxue./include/net/red.h://linxue./include/net/red.h://linxueSender receiver parameters:sysctl –w net.ipv4.tcp_sack=1sysctl –w net.ipv4.tcp_dsack=0sysctl –w net.ipv4.tcp_fack=0sysctl -w net.core.rmem_max=800000000 sysctl -w net.core.wmem_max=800000000 sysctl -w net.ipv4.tcp_rmem=”4096 400000000 800000000”sysctl -w net.ipv4.tcp_wmem=”4096 400000000 800000000”sysctl -w net.dev_max_backlog=300000sysctl -w net.ipv4.tcp_timestamps=1sysctl -w net.ipv4.tcp_mem=”4096 400000000 800000000”sysctl -w net.core.optmem_max=800000000Dummynet parameter:sysctl hw.intr_storm_threshold=100000sysctl kern.polling.idle_poll=1user space change in tc, iproute package./include/linux/pkt_sched.hFrom 32 bit to 64 bit for red./tc/q_red.cBefore compile user space tc, install bison and libdb-devGet the flow sequence in the queueusing tcpdump to get the packets in the interface. Then use grep to get the tcp ports.Get raw data to avoid kernel drop packets:tcpdump -i eth6 -t -w 1_flow_seq_logread from raw datetcpdump -r 1_flow_seq_log > 1_flowseq.loggrep the tcp ports:grep -P "([\d]{5}) >" 1_flowseq.log > 1_flowseq_resultget the exact 5 digits:grep -o -P "([\d]{5})" 1_flowseq_result > 1_flowseq_result_finalTCP supported by Linux 3.1.4 * * TCP: advanced congestion control * TCP: advanced congestion control (TCP_CONG_ADVANCED) [Y/n/?] y Binary Increase Congestion (BIC) control (TCP_CONG_BIC) [Y/n/m/?] y CUBIC TCP (TCP_CONG_CUBIC) [Y/n/m/?] y TCP Westwood+ (TCP_CONG_WESTWOOD) [Y/n/m/?] y H-TCP (TCP_CONG_HTCP) [Y/n/m/?] y High Speed TCP (TCP_CONG_HSTCP) [Y/n/m/?] y TCP-Hybla congestion control algorithm (TCP_CONG_HYBLA) [Y/n/m/?] y TCP Vegas (TCP_CONG_VEGAS) [Y/?] y Scalable TCP (TCP_CONG_SCALABLE) [Y/n/m/?] y TCP Low Priority (TCP_CONG_LP) [Y/n/m/?] y TCP Veno (TCP_CONG_VENO) [Y/n/m/?] y YeAH TCP (TCP_CONG_YEAH) [Y/n/m/?] y TCP Illinois (TCP_CONG_ILLINOIS) [Y/n/m/?] y Default TCP congestion control 1. Bic (DEFAULT_BIC) > 2. Cubic (DEFAULT_CUBIC) 3. Htcp (DEFAULT_HTCP) 4. Hybla (DEFAULT_HYBLA) (NEW) 5. Vegas (DEFAULT_VEGAS) 6. Veno (DEFAULT_VENO) (NEW) 7. Westwood (DEFAULT_WESTWOOD) 8. Reno (DEFAULT_RENO)Queue Schemes supported by Linux 3.1.4 * * Queueing/Scheduling * Class Based Queueing (CBQ) (NET_SCH_CBQ) [M/n/y/?] m Hierarchical Token Bucket (HTB) (NET_SCH_HTB) [M/n/y/?] m Hierarchical Fair Service Curve (HFSC) (NET_SCH_HFSC) [M/n/y/?] m ATM Virtual Circuits (ATM) (NET_SCH_ATM) [M/n/?] m Multi Band Priority Queueing (PRIO) (NET_SCH_PRIO) [M/n/y/?] m Hardware Multiqueue-aware Multi Band Queuing (MULTIQ) (NET_SCH_MULTIQ) [M/n/y/?] m Random Early Detection (RED) (NET_SCH_RED) [M/n/y/?] m Stochastic Fair Blue (SFB) (NET_SCH_SFB) [N/m/y/?] (NEW) m Stochastic Fairness Queueing (SFQ) (NET_SCH_SFQ) [M/n/y/?] m True Link Equalizer (TEQL) (NET_SCH_TEQL) [M/n/y/?] m Token Bucket Filter (TBF) (NET_SCH_TBF) [M/n/y/?] m Generic Random Early Detection (GRED) (NET_SCH_GRED) [M/n/y/?] m Differentiated Services marker (DSMARK) (NET_SCH_DSMARK) [M/n/y/?] m Network emulator (NETEM) (NET_SCH_NETEM) [M/n/y/?] m Deficit Round Robin scheduler (DRR) (NET_SCH_DRR) [M/n/y/?] m Multi-queue priority scheduler (MQPRIO) (NET_SCH_MQPRIO) [N/m/y/?] (NEW) m CHOose and Keep responsive flow scheduler (CHOKE) (NET_SCH_CHOKE) [N/m/y/?] (NEW) m Quick Fair Queueing scheduler (QFQ) (NET_SCH_QFQ) [N/m/y/?] (NEW) m Ingress Qdisc (NET_SCH_INGRESS) [M/n/y/?] m ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download