GithubHelp home page GithubHelp logo

dtaht / debloat Goto Github PK

View Code? Open in Web Editor NEW
85.0 21.0 22.0 5.81 MB

Scripts for doing better and fairer network, traffic control, optimization and shaping

Shell 13.75% Perl 2.29% C# 2.27% Java 2.63% Visual Basic 1.75% C 43.46% Lua 14.80% Awk 0.24% R 0.13% Makefile 3.60% Lex 0.38% Yacc 0.78% HTML 13.23% ApacheConf 0.01% GLSL 0.20% Gnuplot 0.47%

debloat's Introduction

September 2016: The contents of this site have now moved

They are largely documented, implemented, or built into one of the following sites:

— from the old README.org —

Various scripts for less bufferbloated fair queuing, traffic shaping, etc

The principal item of interest in this repository is the src/debloat lua script which incorporates everything I know about how to get reduced latencies under load on wireless and ethernet.

There are also tests and test results in the test dir

All of varying quality. I’ll get better about automating these over time.

Some thank yous

My thanks to everyone in the debloating community for their hard work over the last year to address the bufferbloat issue. That list is far too long:

Tom Herbert: Byte Queue Limits - which takes a big bite out of the bloat and help all the other algorithms work once again…

Eric Dumazet: an unbelievable number of fixes and improvements to RED, ARED, SFB, SFQ, and a genuinely new combination of ideas in REDSFQ.

Jon Corbet of LWN: For writing some of the most informative articles on the problem and keeping the community up to date.

The linux ‘netdev’ mailing list - Notably Dave Miller and Steve Hemminger the linux-wireless mailing list - John Linville

Jim Gettys, Van Jacobson, Kathie Nichols, Vint Cerf, John Nagle, and the huge list of researchers that developed some of the algorithms we’ve played with…

Alcatel-lucent: for supporting jg on his quest….

ISC.org and LINCS.fr : for their kind donations of hardware, rack space, offices, time and energy -

Georgia Tech, Stanford, MIT, and a bunch of folk from various other universities around the world that I’ll have to collect and post….

The 150+ members of the bufferbloat.net wiki… The 300+ members of the bloat and cerowrt mailing lists… the 25+ standing members of the #bloat irc channel…

Huge contributions from various members of the #openwrt irc channel - notably nbd, jow, travis, junos, swalker….

Bob Cringley

Slashdot and other publications

ESR, Doc Searls, a whole bunch of bloggers credited elsewhere on the wiki (this very long list, I’ll add you to this when I remember)

For more about the bufferbloat problems (of which many, many remain to be solved) see: http://queue.acm.org/detail.cfm?id=2071893 and http://queue.acm.org/detail.cfm?id=2076798 -

If I missed anybody, I’m sorry. But a big thank you for joining into brain amplification.

debloat's People

Contributors

dtaht avatar richb-hanover avatar tohojo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

debloat's Issues

Please describe required lua environment

I know very little about lua so I am not sure if this is obvious for most people. I tried to run the debloat lua script with the three different versions of lua in debian/unstable. I was rewarded with three different errors. Can you describe the suggested lua environment for running this script in the documentation? Thank you.

lua50

root@fob-xray:/home/dfc/0xRepos/Net/deBloat/src# QDEBUG=1 IFACE=eth0 lua50 ./debloat
lua50: ./debloat:44: `}' expected (to close `{' at line 30) near `xfc'

lua5.1

root@fob-xray:/home/dfc/0xRepos/Net/deBloat/src# QDEBUG=1 IFACE=eth0 lua5.1 ./debloat
qdisc del dev eth0 root
lua5.1: ./debloat:694: attempt to index field '?' (a nil value)
stack traceback:
    ./debloat:694: in function 'offloads'
    ./debloat:803: in function 'ethernet_setup'
    ./debloat:1882: in function 'ethernet'
    ./debloat:1922: in main chunk
    [C]: ?

lua5.1

root@fob-xray:/home/dfc/0xRepos/Net/deBloat/src# QDEBUG=1 IFACE=eth0 lua5.2 ./debloat
lua5.2: ./debloat:1098: invalid escape sequence near '\|'

Some debloat.lua comments

I was wanting to try ingress queueing, primarily. Ran into a few snags and thought you might want to know about them to fix them 'whenever'... ;-)....

  1. format of INGRESS env var doesn't seem to be defined in the script nor easily decipherable.

  2. didn't like running w/o some non-existent kernel modules that it also didn't use. Specifically:
    FATAL: Module sch_efq_codel not found.
    FATAL: Module sch_ns2_codel not found.

FATAL: Module sch_nfq_codel not found.

Simply commenting these out seemed to indicate that they were not really essential.

Nothing I did seemed to generate any ingress queues. Not entirely sure
why (egress was generated, but no feedback telling me that it was successful or that it did anything.

I think part of the problem on the ingress filter is that you use "lsmod" to look at loaded modules. This is bad as doesn't catch modules that are built-in.
It should be safer to usually look in /sys/module -- that seems to usually (say that now, cuz...) show the modules that are built-in as well as loaded.

BUT it is not showing 'sch_ingress', but my kernel kernel:
zcat /proc/config.gz |grep -i ingress
CONFIG_NET_SCH_INGRESS=y

Claims to have it built-in. but [cuz...from above continues here...] I see no 'sch_ingres' in the module dir. That's a first. Now question is where would it
be listed and why isn't it there.

FWI, here's my module dir contents:
8250/ efivars/ kvm_intel/ rcupdate/
8250_core/ ehci_hcd/ libata/ rcutree/
acpi/ firewire_ohci/ lockdep/ sch_codel/
acpi_cpufreq/ firmware_class/ loop/ sch_fq_codel/
block/ fscache/ mdio/ sch_htb/
bnx2/ gpio_ich/ megaraid_sas/ sch_qfq/
bonding/ hid/ mousedev/ sch_red/
brd/ i2c_i801/ mpt2sas/ sch_sfq/
cifs/ i7300_idle/ mptbase/ scsi_mod/
cls_flow/ i7core_edac/ mptsas/ scsi_transport_iscsi/
cls_fw/ i8042/ mptscsih/ sg/
cls_u32/ iTCO_wdt/ nbd/ spurious/
coretemp/ ifb/ netconsole/ sr_mod/
cpuidle/ intel_idle/ netpoll/ sysrq/
dca/ ioatdma/ nf_conntrack/ tcp_htcp/
dcdbas/ ipmi_msghandler/ nf_conntrack_ipv4/ uhci_hcd/
debug_core/ ipmi_poweroff/ nf_defrag_ipv4/ uinput/
dell_rbu/ ipmi_si/ nf_nat/ usbcore/
dm_bufio/ iptable_filter/ nf_nat_ipv4/ usbhid/
dm_mod/ iptable_nat/ pci_slot/ vt/
dm_snapshot/ ixgbe/ pcie_aspm/ wmi/
dm_thin_pool/ kdb_main/ pnp/ workqueue/
dns_resolver/ kernel/ printk/ zswap/
e1000e/ keyboard/ processor/
edac_core/ kgdboc/ psmouse/
efi_pstore/ kvm/ pstore/

lsmod:
cls_fw 4973 0
sch_htb 16759 0
sch_red 6333 0
sch_sfq 11348 0
cls_flow 8663 0
cls_u32 7829 0
sch_fq_codel 8433 1
sch_codel 5331 0
sch_qfq 12587 0
ifb 4328 0
iptable_nat 3506 0
nf_conntrack_ipv4 9521 1
nf_defrag_ipv4 1886 1 nf_conntrack_ipv4
nf_nat_ipv4 4727 1 iptable_nat
nf_nat 17712 2 iptable_nat,nf_nat_ipv4
nf_conntrack 94395 4 iptable_nat,nf_conntrack_ipv4,nf_nat_ipv4,nf_nat
iptable_filter 1906 1
mousedev 12440 0
psmouse 20130 0
wmi 10673 0
ixgbe 229318 0
mdio 4417 1 ixgbe

bnx2 84687 0

BTW - you mentioned devices needing a BQL feature. I don't recall seeing it mentioned in the feature list of the Intel X540-AT2 10Gb ethernet cards I got last year (not that they are the ones I'd be using for ingress control) -- nothing I have can usefully peg 1 channel of those, let alone the linked pair I had envisioned using (PC-workstation running windows 7-64 connecting to linux server
that serves all network and admin functions to the PC) -- it tops out on a samba transfer at about 520MB/s read and 370MB/s write.
(vs. 1Gb got 125MB writes and 119MB reads -- i.e. topped out).

Limiting factor is CPU (usually on the server), as SMB doesn't easily support multiple connections to a server by the same person. Rather annoying.

Anyway... wanted to ingress shaping on a 25/7Mb cable modem... I have tried wondershaper (or a modified version to suit my needs), but gave up using it when I realized that it couldn't really keep up with incoming traffic (needed insanely large burst limits... but this was with policing and hoping newer queuing might address that. (since 1 dropped packet really hurts in throughput).

Anyway.. I may need a new network card for my external net to do this.. but
also got to find where the bleep sch_ingress is... theoretically it is loaded.. ;-)

Thanks for the script. Lua, eh? well, at least it's not python...
;-)

(bash & perl for scripting mostly here...

reply if you want... or whatever, I'm won't hold my breath... ;-) (Just wanted to let you know the probs I ran into in trying to run it...)..

Thanks again..

A*a..

Error in debloat.sh at "...FQ_LIMIT=1200"

I think this line is incorrectly: [ "$SPEED" -lt 1001 ] && FQ_LIMIT=1200 in 'debloat.sh' script. The correct would be [ "$SPEED" -lt 1001 ] && FQ_LIMIT="limit 1200".

Makes sense on OpenWrt or not?

Hi,
I see this script hasn't been touched for 3-4 years... so does is make sense to deploy it on latest Chaos Chalmer OpenWrt or OpenWrt already has bufferbload under control?

Make install errors in Ubuntu

Ubuntu 12.04 64 bits

$ sudo make install
cd debianstuff; make install
make[1]: Entering directory `/home/simon/sources/deBloat/debianstuff'
cp if-pre-up.d/* /etc/network/if-pre-up.d
cp if-up.d/* /etc/network/if-up.d
cp: cannot stat `if-up.d/*': No such file or directory
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/simon/sources/deBloat/debianstuff'
make: *** [install] Error 2

Different values between debloat.sh and debloat with same ethernet card

eth1 = Gigabit ethernet card.
debloat.sh sets: tc qdisc add dev eth1 root fq_codel quantum 500 ecn limit 1200
debloat ( lua script ) sets:qdisc add dev eth1 handle a root fq_codel limit 1000 quantum 1000

After to execute 'debloat' ( lua script ):

$ tc -s qdisc ls dev eth1
qdisc fq_codel a: root refcnt 2 limit 1000p flows 1024 quantum 1000 target 5.0ms interval 100.0ms ecn 
 Sent 613811 bytes 4529 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
  maxpacket 256 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0

After to execute 'debloat.sh':

$ tc -s qdisc ls dev eth1
qdisc fq_codel 8004: root refcnt 2 limit 1200p flows 1024 quantum 500 target 5.0ms interval 100.0ms ecn 
 Sent 1058 bytes 12 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
  maxpacket 256 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0

Why these differences if it's the same ethernet card?

debloat (lua script) returns some errors

# uname -a
Linux X58A-UD5 3.5.0-21-i7 #32 SMP Sat Dec 22 12:21:03 CET 2012 x86_64 x86_64 x86_64 GNU/Linux
# QDEBUG=1 IFACE=eth1 lua debloat
FATAL: Module sch_efq_codel not found.
FATAL: Module sch_ns2_codel not found.
FATAL: Module sch_nfq_codel not found.
qdisc del dev eth1 root
Cannot get device ring settings: Operation not supported
qdisc add dev eth1 handle a root fq_codel limit 1000 quantum 1000 

Are necessary those kernel modules?
What's the meaning of this error: Cannot get device ring settings: Operation not supported?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.