Community discussions

MikroTik App
 
Ozelo
Member
Member
Topic Author
Posts: 338
Joined: Fri Jun 02, 2006 3:56 am

Feature request: Ability to store/compare ROS ping statistic

Tue Dec 11, 2007 10:20 pm

Please, I beg you. I know it is not essential and also most of nobody have any use for it. But it may be a key for us here.
[admin@GBROUTER] > ping http://www.google.com count 3
72.14.205.99 64 byte ping: ttl=242 time=167 ms
72.14.205.99 64 byte ping: ttl=242 time=171 ms
72.14.205.99 64 byte ping: ttl=242 time=173 ms
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 167/170.3/173 ms
We just need this value (avg) to be possible to stored on a ROS variable:
170.3
Obs.: Everything else that could perform a latency measurement on a wireless AP also fits our needs. But cant think on anything else than ROS PING.
 
User avatar
gmsmstr
Trainer
Trainer
Posts: 982
Joined: Fri Jun 04, 2004 2:22 am
Location: St. Louis, MO
Contact:

Re: Feature request: Ability to store/compare ROS ping statistic

Tue Dec 11, 2007 11:22 pm

Dude can do this. If you setup a ping, it will avg out the ping times over time.
 
User avatar
macgaiver
Forum Guru
Forum Guru
Posts: 1764
Joined: Wed May 18, 2005 5:57 pm
Location: Sol III, Sol system, Sector 001, Alpha Quadrant

Re: Feature request: Ability to store/compare ROS ping statistic

Wed Dec 12, 2007 12:19 pm

Whats the point - simple QoS with ICMP priority=1 and other traffic priority=8 and we have completely different ping numbers - even on full load ping times are less than 50ms :)
 
Ozelo
Member
Member
Topic Author
Posts: 338
Joined: Fri Jun 02, 2006 3:56 am

Re: Feature request: Ability to store/compare ROS ping statistic

Wed Dec 12, 2007 10:13 pm

Dude can do this. If you setup a ping, it will avg out the ping times over time.
Yes, I know. Im sorry, didnt said the whole stuff behind it. ;) The fact that I just want the average value from ROS ping tool statistics does not mean that I just want to "see" this value, but store the value on a variable inside a ROS device too.
Whats the point - simple QoS with ICMP priority=1 and other traffic priority=8 and we have completely different ping numbers - even on full load ping times are less than 50ms
:) Yes, you are correct, but not exactly. Let me try explain better whats happening and maybe Im doing something wrong. :roll: Who knows?

Since the symptom we have show the same face on different hardwares and scenarios, just consider the following:
- MT ROS on a P4 3GHz processor power, 512MB ram and two radios;
- The first one (wlan1) as station 5.8GHz turbo txpower default, etc etc;
- The second one (wlan2) as ap-bridge 2.4GHz B only, txpower default, same etc (Ive tryed tons of changes anyway with no success);

;) Ok, no mistery so far and a P4 is kinda plenty of processor resources for just one AP in 802.11b. Basicly, one public IP address on wlan1, a default gateway, local DNS caching, RADIUS aaa, a public IP pool, a PPPOE server over wlan2 and, of course, some sort of traffic shaping. Such a simple setup is completely sufficient to people surf the web good. Lets talk about queues and shapers.

Our first implementations: One simple queue for each IP from the pool, each one applied over customers IP addresses individually only (no traffic priority at all). 1/3 of this pool at 256k/256k max-limit and the rest at 128k/128k max-limit only. Then you (customer) may see nice pings when doing nothing and nasty pings when the queue is full. Different queue types like pfifo and sfq change the ping responses you see, but not change the fact that when the queue is full latency is high.

:? We noticed that some congested wireless AP was showing high latency for all clients from times to times, even if a determined customer measured was doing nothing. Also on non congested AP, but in this case was a clear radio issue on the customer side. Then, we did a shot on priority expecting to solve the high latency and it did very nice!

Our lastest implementations: Mangling different types of traffic, as you know, tcp syn, icmp, tcp 80, 25, 110, p2p and finnaly a default one. Using queue tree, one main queue for download on global-out and another for upload on global-in. Each one with five child inner classes labeled as follow: icmp, high_prio, mid_prio, low_prio and p2p. Each of these five inner classes with two or more child leaf classes. Most of the leaf classes are PCQ type with rates mentioned above, including p2p and default traffic. Some PCQ types have zero as rate.

8) After this lastest implementation latency was great, I mean, low. About 2ms, even if the customer is surfing @ 2mbits. People can play online games, watch youtube, they are happy. But some sort of imperfectness, dunno, from times to times people still get high latency. :shock: The total AP throughput is under those max-limit values, queues are green, wireless ok, very good signal and ccq, plenty of processor resources. Well...

I see that one station can surf alone @ 5mbits without limits, but 40 stations dont raise the total throughput more than 900kbits due to wireless/protocols overhead I think and the average throughput that this AP reach is 3mbits with limits. Lets call this 900k thing as "foot limit". We set about 100 customers per access point access-list running 802.11b, there is about 60% of this list with radios associated and about 50% are PPPOE clients effectively connected (peak values). I thought that if many people want to shake simultaneously, our lastest implementations should solve the high latency. Did not really, but is the most great implementation so far we did. Seems that priority dont work well when queues are green, but if I do set the main download queue max-limit equal the "foot limit" when congested, latency get low and prioritys get back to work. But since it is a fixed value, when the AP is not congested people should surf @ 2mbits, not 900k.

Then I thought I could implement a script to measure this latency and dynamically adjust some queues max-limit. i.e. Periodically measure latency, if above "X" then deduct "Ykbits" from "Z" queue max-limit, if below then add and so on... like an AGC. :) How could we call this? Adaptative Latency Immunity? :D

Thats it, basicly. Ive made some pictures:

This is how the queue tree structure looks like:
Image

This is a tipical latency issue: (green 0-200ms, yellow 201-500, red 501-...)
Image


Hope this post explain the idea or, perhaps, raise a better one. :) If not, just ask for any else details you need.
Thank you for the attention.

Ozelo
 
User avatar
gmsmstr
Trainer
Trainer
Posts: 982
Joined: Fri Jun 04, 2004 2:22 am
Location: St. Louis, MO
Contact:

Re: Feature request: Ability to store/compare ROS ping statistic

Thu Dec 13, 2007 12:52 am

So, basically, you want a script to see the avg latency associated with a ping, then based on that number, it will modify the simple queues to change customers speed?

Good thought. Several hotspot users of mine wanted something smiler, however, the difference was that their internet connection was maxing out, so they wanted to slow people down in hopes of maximizing the effectiveness of their existing connection. The end result was it was simpler, cheaper and better in the long run to increase the bandwidth vs trying to fake the latency times.

not saying its not possible. but i'm not a script guy.
 
Ozelo
Member
Member
Topic Author
Posts: 338
Joined: Fri Jun 02, 2006 3:56 am

Re: Feature request: Ability to store/compare ROS ping statistic

Thu Dec 13, 2007 12:48 pm

So, basically, you want a script to see the avg latency associated with a ping, then based on that number, it will modify the simple queues to change customers speed?
:) Yes. When ping show high latency (more than 300ms) with the setup above, people experience slow auth, slow web opening (when clicking to open web pages, name resolving is fast but you need to wait about 10 seconds to see the web page start loading). Guess latency on ping reflect overall traffic latency on that AP based on above setup. A max rtt under 200ms is completely acceptable for us.

Then, based on latency measurements (meaning store latency values to compare inside a script) the script can change a predefined set of queues on that structure above to fit our needs (is that what we actually do manually). Give me an option to measure this latency (as requested) and I do the scripting.

Maybe there are other better references than ping inside ROS code to measure this issue and interact dynamically. Who knows? I would be glad if someone from MT staff have a word here, positively or not. Maybe the staff grab the idea and introduce a new queue type based on this idea, huh? ;) Thinking far... I think it will work good for us (MT users). ALI - Adaptative Latency Immunity sounds so cool! :lol:
 
User avatar
macgaiver
Forum Guru
Forum Guru
Posts: 1764
Joined: Wed May 18, 2005 5:57 pm
Location: Sol III, Sol system, Sector 001, Alpha Quadrant

Re: Feature request: Ability to store/compare ROS ping statistic

Thu Dec 13, 2007 1:53 pm

Still IMHO it is to much troubles (and toooo long replays :shock: ) .

I also have massive QoS on my core router:

have two big groups of traffic (mangle prerouting):
1) Ensigh services - ICMP DNS, first 500kB of each HTTP connection, VOIP, SHTTP, game server traffic (based on address list)
2) Other services

In global In I ensure that "Other traffic" will not take over "Ensigh services" by simple queue tree with parent and 2 childes with limitation

Then in mangle chain forward I remark all traffic peer user type and on the interface I have standard PCQ per user setup

The only thing that I am changing in this setup is user address lists when they change connection.

I hope you will find something usefull in this idea.
 
Ozelo
Member
Member
Topic Author
Posts: 338
Joined: Fri Jun 02, 2006 3:56 am

Re: Feature request: Ability to store/compare ROS ping statistic

Thu Dec 13, 2007 7:43 pm

:) Aye, Im totally agree with you and we know how easy to implement great QoS on core routers. But on wireless AP things are different when *congested*. When congested, a core router normally have a full load link. When congested, a wireless AP running 802.11b normally have its agregated throughput below 1mbits.

:| There are thousand of wireless users surfing along 24 hrs per day, some times you get an wireless AP running 802.11b with 90 wireless clients from different vendors simultaneously connected and then things get really bad. The best way to deal with wireless latency issues (apart RF problems and crap radios) is to keep the relation clients/AP as much low as possible. It demand cash and time to fix things, adding more APs, turn arround antennas. ;) While that not happens, thought we could implement an intermediary low cost solution via software. You know, the best QoS ever is a clean, empty, flat highway.

:roll: We dont know really what topology is the best on wireless yet, but we are moving from a "centralized PPPOE AC and bridged wireless APs" to "routed wireless AP with local PPPOE AC".
 
lukkes
Member Candidate
Member Candidate
Posts: 177
Joined: Mon Jun 16, 2008 2:12 am
Location: Venezuela
Contact:

Re: Feature request: Ability to store/compare ROS ping statistic

Sun Jan 24, 2010 7:17 am

hi Ozelo, i'm sorry for i can help you, so i hope you can help me, i'm searching a way to implement a good qos, i've read a lot and mine is working but i'm collecting from working examples, can you share your mangle rules, your queues rules looks good, thanks a lot anyway
 
Ozelo
Member
Member
Topic Author
Posts: 338
Joined: Fri Jun 02, 2006 3:56 am

Re: Feature request: Ability to store/compare ROS ping statistic

Mon Jan 25, 2010 8:33 pm

hi lukkes,

We have moved along with the QoS above and implemented connection-rate matching! Works like a charm. Here is some code... part of it. We r showing only a downstream part of it. Fast surfing while holding heavy downloaders good.

MANGLE
add action=mark-connection chain=wlan1hdcd comment="" connection-mark=!wlan1hdcdhc disabled=no new-connection-mark=wlan1hdcdac passthrough=yes
add action=mark-connection chain=wlan1hdcd comment="" connection-mark=wlan1hdcdac disabled=no new-connection-mark=wlan1hdcdhc p2p=all-p2p passthrough=yes
add action=mark-connection chain=wlan1hdcd comment="" connection-limit=4,32 connection-mark=wlan1hdcdac disabled=no new-connection-mark=wlan1hdcdhc passthrough=yes protocol=tcp
add action=mark-connection chain=wlan1hdcd comment="" connection-bytes=500000-0 connection-mark=wlan1hdcdac connection-rate=50k-100M disabled=no new-connection-mark=wlan1hdcdhc passthrough=yes protocol=tcp
add action=mark-connection chain=wlan1hdcd comment="" connection-bytes=250000-0 connection-mark=wlan1hdcdac connection-rate=50k-100M disabled=no new-connection-mark=wlan1hdcdhc passthrough=yes protocol=udp
add action=mark-connection chain=wlan1hdcd comment="" connection-mark=wlan1hdcdac disabled=no new-connection-mark=wlan1hdcdhc passthrough=yes protocol=tcp src-port=!25,53,80,110,443,554,1723,1863,3389,8000,8291,5800,5900
add action=mark-connection chain=wlan1hdcd comment="" connection-mark=wlan1hdcdac disabled=no new-connection-mark=wlan1hdcdhc passthrough=yes protocol=udp src-port=!53,5060,16567,16568
add action=mark-packet chain=wlan1hdcd comment="" disabled=no dst-address-list=htcd new-packet-mark=wlan1hdcdt passthrough=no time=0s-7h,sun,mon,tue,wed,thu,fri,sat
add action=mark-packet chain=wlan1hdcd comment="" connection-mark=wlan1hdcdac disabled=no new-packet-mark=wlan1hdcdt passthrough=no
add action=mark-packet chain=wlan1hdcd comment="" disabled=no new-packet-mark=wlan1hdcdh passthrough=no
QUEUE TREE
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=wlan1hdcdh packet-mark=wlan1hdcdh parent=wlan1d priority=8 queue=hdcd
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=wlan1hdcdt packet-mark=wlan1hdcdt parent=wlan1d priority=3 queue=hdcdt
QUEUE TYPE
add kind=pcq name=hdcd pcq-classifier=dst-address pcq-limit=50 pcq-rate=250000 pcq-total-limit=2000
add kind=pcq name=hdcdt pcq-classifier=dst-address pcq-limit=50 pcq-rate=700000 pcq-total-limit=2000
Hope it can help. A bit OT indeed, sry.
Ozelo
 
lukkes
Member Candidate
Member Candidate
Posts: 177
Joined: Mon Jun 16, 2008 2:12 am
Location: Venezuela
Contact:

Re: Feature request: Ability to store/compare ROS ping statistic

Tue Jan 26, 2010 7:31 am

Ozelo, realy, realy thanks for share, not much want to do it.. i will try to make the upload part and will post it, that you check, comment and suggest, thanks again

Who is online

Users browsing this forum: No registered users and 125 guests