Re: [LARTC] Qdisc statistics project
As a necessety for my job is to real-time monitor the bytes, packets, packet dropped etc of all the qdiscs working inside the kernel i've tried varius methods: 1. Parse tc -s command output and update a round robin database and use rrdtool to graphically display tc statistics. I have developed myself a similar setup, but i used a perl script with snmp pass_persist to retrieve the data via snmp feed it to MRTG and then display it with a CGI script, since i changed jobs recently i made some changes to the setup and was thinking in creating a sourceforge project. I guess you use the qos snmp extentions to achieve the above. The only drawback to your design is the cpu usage of cgi. But i don't think it is ready for that yet, i mean, it is working beautifully for me (and in my previous employer) but there are some rough edges to address first. I can forward you the software that i use with some documentation. Please do so. Thanks, Antonio ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] Is this actually possible?
Hello gypsy, Thank you for information. This patch solves all my problems. FOR EVERYONE = HTB borrowing has problems in kernels up to 2.4.27 (not sure about 2.6 series). Apply patch 21.6.2004. http://luxik.cdi.cz/~devik/qos/htb/ Best regards, Zviad === At 2004-10-14, 09:28:59 you wrote: === Zviad O. Giorgadze wrote: Only if I lower the ceiling on leaf 1:30 does it show any results. If I have the ceiling the same on both, there is no measureable result in speed. The both seem to share the connection equally. Am I missing the point, is it possible at all, or am I just too dum to get it right? .peter I have the same problem and unable to solve. I can't promise this is the answer you're looking for, but it sure helped me a lot. grep changes from state /user/src/linux/net/sched/sch_htb.c If you don't get a match, go to http://luxik.cdi.cz/~devik/qos/htb/ and find the 21.6.2004 patch. gypsy ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] Excess Bandwidth
Sorry for my insistence, but I have tried to use different prios based on the class rate and what happens is that the class that has more rate, and in this case more priority, will borrow almost all the excess bandwidth. Like I said, I have read that htb share its excess bandwidth proportionaly to the class rates its childrens are assigned. I made a test and based on the statistics of tc ouput we can see that the class that has more rate borrowed less of the excess bandwidth. Another question is what is the meaning of lended in htb? To me it is a little bit confusing. [EMAIL PROTECTED] htb]# tc -s -d class show dev pvc0 class htb 1:2 root rate 512Kbit ceil 512Kbit burst 2254b/8 mpu 0b cburst 2254b/8 mpu 0b level 7 Sent 7543402 bytes 5031 pkts (dropped 0, overlimits 0) rate 37748bps 25pps lended: 2112 borrowed: 0 giants: 0 tokens: 27488 ctokens: 27488 class htb 1:3 parent 1:2 leaf 3: prio 1 quantum 1000 rate 50Kbit ceil 512Kbit burst 1664b/8 mpu 0b cburst 2254b/8 mpu 0b level 0 Sent 2068254 bytes 1377 pkts (dropped 2988, overlimits 0) rate 11268bps 7pps lended: 493 borrowed: 884 giants: 0 tokens: -326656 ctokens: 9488 class htb 1:4 parent 1:2 leaf 4: prio 1 quantum 1280 rate 100Kbit ceil 512Kbit burst 1728b/8 mpu 0b cburst 2254b/8 mpu 0b level 0 Sent 2588080 bytes 1728 pkts (dropped 2644, overlimits 0) rate 11335bps 7pps lended: 980 borrowed: 748 giants: 0 tokens: 73728 ctokens: 20988 class htb 1:5 parent 1:2 leaf 5: prio 1 quantum 1920 rate 150Kbit ceil 512Kbit burst 1791b/8 mpu 0b cburst 2254b/8 mpu 0b level 0 Sent 2887068 bytes 1926 pkts (dropped 2447, overlimits 0) rate 11696bps 7pps lended: 1446 borrowed: 480 giants: 0 tokens: 74070 ctokens: 27488 Daniel Frederiksen wrote: Hej Ronaldo Remember to prioritize the excess bandwidth. If you are using the HTB read the bottom section of the manual.: http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm#prio The prio parameter will help you with your problem, give the child classes a priority from 1-3, where 1 is the highest priority and 3 is the lowest. On Fri, 2004-10-08 at 22:37, Ronaldo Z. Afonso wrote: Hi, I'm trying to configure QoS on my linux in the following manner: I have a main link with 64K, so I divided it in 3 classes of 18K, 14K and 9K with an excess (not used for classified traffic, just to be shared) of 23K. This excess should be distributed proportonally among the 3 classes, that is, the class that has more rate should borrow more bandwidth. What is happening is just the opposite, the class that has less rate is borrowing more bandwidth. A representation of my hierarchical class layout is as follow: root - 64K A - 18K B - 14KC - 9K I have read some documentation that says it should work exactly in this in way, but it is not happening in my environment. All the tests I did show me that the class with less rate is borrow more bandwidth. Can anyone help me? ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ -- __ Ronaldo Z. Afonso Projetista de Software Jr. Cyclades Brasil [EMAIL PROTECTED] Phone: 55 11 5033-3361 Fax: 55 11 5033-3388 www.cyclades.com.br Everywhere with Linux ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] Is this actually possible?
On Thursday 14 October 2004 06:37, Zviad O. Giorgadze wrote: Hello gypsy, Thank you for information. This patch solves all my problems. FOR EVERYONE = HTB borrowing has problems in kernels up to 2.4.27 (not sure about 2.6 series). Apply patch 21.6.2004. It's in 2.6.8.1 and beyond, but not in 2.6.7 and below. (I didn't check 2.6.8.0.) -- Jason Boxman Perl Programmer / *NIX Systems Administrator Shimberg Center for Affordable Housing | University of Florida http://edseek.com/ - Linux and FOSS stuff ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] Is this actually possible?
On Thursday 14 October 2004 05:46, Ow Mun Heng wrote: I have TSL 2.1, kernel 2.4.27-3tr. I changed the PSCHED_CPU and disabled the HTB hysteresis, set SFQ queue length to 16 I'm not sure what are those. If anyone can explain that,it wold be nice - HTB hysteries is an undocumented option and it makes htb faster but les accurate. http://www.docum.org/docum.org/faq/cache/36.html - PSCHED_CPU is the timer used by the kernel: http://www.docum.org/docum.org/faq/cache/40.html - For the queue length: http://www.docum.org/docum.org/faq/cache/21.html Stef -- [EMAIL PROTECTED] Using Linux as bandwidth manager http://www.docum.org/ ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] Qdisc statistics project
On Thursday 14 October 2004 10:39, Antonios Chalkiopoulos wrote: As a necessety for my job is to real-time monitor the bytes, packets, packet dropped etc of all the qdiscs working inside the kernel i've tried varius methods: 1. Parse tc -s command output and update a round robin database and use rrdtool to graphically display tc statistics. I have developed myself a similar setup, but i used a perl script with snmp pass_persist to retrieve the data via snmp feed it to MRTG and then display it with a CGI script, since i changed jobs recently i made some changes to the setup and was thinking in creating a sourceforge project. I guess you use the qos snmp extentions to achieve the above. The only drawback to your design is the cpu usage of cgi. But i don't think it is ready for that yet, i mean, it is working beautifully for me (and in my previous employer) but there are some rough edges to address first. I can forward you the software that i use with some documentation. Please do so. I did the same, see www.docum.org. Most of the scripts are a mess :) but they work for me. My scripts can: - parse tc output and recreate the tc setup (parent - child relation ship) - use snmp extension to get stats remotly - use rrd to store the stats - a cgi script to generate graphs on the fly - create/edit htb + filters setup and generate commands graphical (cgi-bin script, 1 big hack) - realtime graphs ina browser: written in java, but data is fetched from a webserver so it's not that handy - much more that I forgot The development of these scripts is stopped. I'm rebuilding my house, making a website, I'm a father for 6 months now, .. but if an interesting project is started, I want to help. Stef -- [EMAIL PROTECTED] Using Linux as bandwidth manager http://www.docum.org/ ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] HTB
Hi all I'm new in this list and i hope to lear and to help if possible. But firt i need help :-( I have this messege in my syslog when my classes and qdiscs goes down. Can any one know what does it mean? Thnx in advance. Yannick Arrimadas Bot Oct 14 16:09:27 pototogorri kernel: HTB init, kernel part version 3.17 Oct 14 16:09:27 pototogorri kernel: Unable to handle kernel paging request at virtual address 00100100 Oct 14 16:09:27 pototogorri kernel: printing eip: Oct 14 16:09:27 pototogorri kernel: c0267fb4 Oct 14 16:09:27 pototogorri kernel: *pde = Oct 14 16:09:27 pototogorri kernel: Oops: [#1] Oct 14 16:09:27 pototogorri kernel: Modules linked in: cls_fw sch_sfq sch_htb ipt_MARK iptable_mangle ide_floppy ide_tape sg sr_mod ide_cd cd Oct 14 16:09:27 pototogorri kernel: CPU:0 Oct 14 16:09:27 pototogorri kernel: EIP:0060:[c0267fb4]Not tainted Oct 14 16:09:27 pototogorri kernel: EFLAGS: 00010206 (2.6.8.1) Oct 14 16:09:27 pototogorri kernel: EIP is at qdisc_lookup+0x34/0x50 Oct 14 16:09:27 pototogorri kernel: eax: 001000d4 ebx: 001000d4 ecx: dd3f7914 edx: 00100100 Oct 14 16:09:27 pototogorri kernel: esi: 0001 edi: 0001 ebp: c204dc38 esp: c204dc30 Oct 14 16:09:27 pototogorri kernel: ds: 007b es: 007b ss: 0068 Oct 14 16:09:27 pototogorri kernel: Process tc (pid: 22899, threadinfo=c204c000 task=c80219d0) Oct 14 16:09:27 pototogorri kernel: Stack: ddeca290 dd3f7800 c204dc80 c0268a62 dd3f7800 0001 d1a8873c Oct 14 16:09:27 pototogorri kernel:05c8 ddb15800 000a dd3f7800 ddb15800 Oct 14 16:09:27 pototogorri kernel:0010 dce34a40 0048 c204dcb0 c204dcfc c0262297 dce34a40 ddeca280 Oct 14 16:09:27 pototogorri kernel: Call Trace: Oct 14 16:09:27 pototogorri kernel: [c010707b] show_stack+0x9b/0xb0 Oct 14 16:09:27 pototogorri kernel: [c01071cb] show_registers+0x11b/0x180 Oct 14 16:09:27 pototogorri kernel: [c0107310] die+0x50/0xb0 Oct 14 16:09:27 pototogorri kernel: [c0117280] do_page_fault+0x330/0x5b8 Oct 14 16:09:27 pototogorri kernel: [c0106cbd] error_code+0x2d/0x40 Oct 14 16:09:27 pototogorri kernel: [c0268a62] tc_modify_qdisc+0x102/0x450 Oct 14 16:09:27 pototogorri kernel: [c0262297] rtnetlink_rcv+0x347/0x3b0 Oct 14 16:09:27 pototogorri kernel: [c026c3c4] netlink_data_ready+0x54/0x60 Oct 14 16:09:27 pototogorri kernel: [c026baca] netlink_sendskb+0x6a/0x90 Oct 14 16:09:27 pototogorri kernel: [c026c0a9] netlink_sendmsg+0x1f9/0x2c0 Oct 14 16:09:27 pototogorri kernel: [c0253078] sock_sendmsg+0x88/0xb0 Oct 14 16:09:27 pototogorri kernel: [c0254696] sys_sendmsg+0x196/0x210 Oct 14 16:09:27 pototogorri kernel: [c0254960] sys_socketcall+0x80/0x1a0 Oct 14 16:09:27 pototogorri kernel: [c0105c79] sysenter_past_esp+0x52/0x79 Oct 14 16:09:27 pototogorri kernel: Code: 8b 40 2c 0f 18 00 90 39 ca 75 e6 31 c0 5b 5e 5d c3 8d 74 26 Oct 14 17:23:30 pototogorri kernel: HTB: quantum of class 10481 is small. Consider r2q change. Oct 14 17:23:30 pototogorri kernel: HTB: quantum of class 10482 is small. Consider r2q change. Oct 14 17:23:30 pototogorri kernel: HTB: quantum of class 10483 is small. Consider r2q change. Oct 14 17:23:30 pototogorri kernel: HTB: quantum of class 11041 is small. Consider r2q change. Oct 14 17:23:30 pototogorri kernel: HTB: quantum of class 11042 is small. Consider r2q change. Servicio ofrecido por www.systemwifi.com ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] Qdisc statistics project
The development of these scripts is stopped. I'm rebuilding my house, making a website, I'm a father for 6 months now, .. but if an interesting project is started, I want to help. In order to not run into duplicated projects: libnl General purpose netlink library for all netlink users with different API levels from raw netlink messaging to abstract processing of already existing netlink users. It supports a generic caching interface with filtering on all levels. All modules may be compiled in or loaded at runtime. Status netlink messaging needs some work to handle special cases link finished and tested neighbour finished and tested qdisc/class nearly finished cbq nearly finished fifofinished and tested priofinished and tested sfq finished and tested ... filters nearly finished u32 finished and tested ... address TLV parsers done route TLV parsers done The reason for not working on LQL are licensing issues not acceptable to me. I will release this library in 2-3 weeks and accept patches from that point. bmon bmon is a portable bandwidth monitor running on various operating systems. It supports various input methods, one of those being the above libnl resulting in support for tc statistics. Variout output modes exist including an interactive curses interface: http://people.suug.ch/~tgr/bmon_ingress.jpg but also lightweight HTML output: http://people.suug.ch/~tgr/stats/axs.4.s.html Statistics may be distributed over a network using multicast or unicast and collected at some point to generate a summary of statistics for a set of nodes. I'm about to release 1.0-pre1 once I fixed the multicast issues on SunOS. netconfig Cisco IOS like iproute2 replacement fully based on netlink supporting full tab completion and command description for those familiar with IOS. It is far from being releaseable as libnl needs to be finished first. Ideas exist to use it as interface for the new ietf netconf protocol. generic netlink network statistics A few of may have noticed the first small set of patches going into 269rc3 introducing generic network statistics which will make the process of adding new statistics to qdiscs/class/filters very easy and removes the issue of backward compatibility. netlink errors Effort has gone into improving error codes/messages returned from netlink users in the kernel. The idea is currently on hold as all acceptable solutions would break APIs. Planned for 2.7 as of now. ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB
On Thursday 14 October 2004 14:23, sistemas wrote: Hi all I'm new in this list and i hope to lear and to help if possible. But firt i need help :-( I have this messege in my syslog when my classes and qdiscs goes down. Can any one know what does it mean? I used to have an Oops an awful lot like that. I upgraded to 2.6.9-rc3 and it resolved the problem. Yours could be something else, though. What `tc` configuration are you using? What's the simplest possible configuration you can create that consistently reproduces the problem? What specifically did you do to trigger this problem, if you know? Thanks. ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] Qdisc statistics project
Thomas Graf wrote: netlink errors Effort has gone into improving error codes/messages returned from netlink users in the kernel. The idea is currently on hold as all acceptable solutions would break APIs. Planned for 2.7 as of now. You probably need to come with another alternative since 2.7 probably won't start for a long time ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] Qdisc statistics project
* Stephen Hemminger [EMAIL PROTECTED] 2004-10-14 13:17 netlink errors Effort has gone into improving error codes/messages returned from netlink users in the kernel. The idea is currently on hold as all acceptable solutions would break APIs. Planned for 2.7 as of now. You probably need to come with another alternative since 2.7 probably won't start for a long time Agreed, Jamal and myself couldn't find this alternative yet though, it was therefore postponed to after the generic statistic conversion. Ideas are very much appreciated. ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] Shaping on Ports, multiple IP Address's, and SFQ
Hi, I have a 3Mbit (up,down) connection going through a Linux box (Debian 600mhz, 500mb ram) using NAT to approx 125 users. Presently I am shaping by marking packets by their port numbers. I'm prioritizing 22, 23, 25, 80, 81, 110, 443, 500, 3389, 1214, 6881:6889, etc, into their appropriate classes depending on weather there getting more or less bandwidth. This has worked pretty good, but some users have problems at times like time-outs browsing, email and such. One question, should I be using SFQ on these classes? Would this decrease the time-outs some users are getting at heavy load times? If so, could someone please explain what this (SFQ) does, as the documentation in the LARTC and other spots is very weak. Another question, I was also thinking of limiting everyone's bandwidth to like say 500K each, so no connection can get more then 500k, then it would take about 6 people using full connections to max the line. I have searched and found no real good way to do this other than creating 125 classes and filters AND if I did that would I still be able to perform QoS on certain ports. I'm confused on if this is possible or not for it seems that once you filtered a IP address for instance, then it's gone and cannot be filtered through another qdisc. Doing the math, if I had 125 users divided up into a 3mbit connection, I would have to have a rate of 24 kbps and ceil of 500kbps per class. But if I did rate limit each user, now how do I rate limit all the ports flowing as a whole like I was originally doing? Thanks for the help. -Dave ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] Shaping on Ports, multiple IP Address's, and SFQ
Dave Scott wrote: Another question, I was also thinking of limiting everyone's bandwidth to like say 500K each, so no connection can get more then 500k, then it would take about 6 people using full connections to max the line. And then what? If the line is maxed, then it's maxed, wether that's done by a single user, or by three, six, or twelve people doesn't really make much difference to me... Doing the math, if I had 125 users divided up into a 3mbit connection, I would have to have a rate of 24 kbps and ceil of 500kbps per class. But if I did rate limit each user, now how do I rate limit all the ports flowing as a whole like I was originally doing? Limiting per user and limiting per port are two different approaches which just don't mix well. By creating one class per user (all with the same rates), HTB is supposed to distribute available bandwidth in a fair manner among all active users. By adding a limit to certain ports however, some users will be limited in favour to others. The port stuff isn't a good idea anyway since it can be easily bypassed. Especially filesharing applications such as BitTorrent can be moved to any port you like. If you want to recognize this kind of traffic, you're better off using ipp2p, l7-filter or similar. Andreas ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] Emulate WAN
Where can I find examples of configs to emulate WANs, I am looking for slow speeds and high latencies. Thanks