Community discussions

MikroTik App
 
netsystem
just joined
Topic Author
Posts: 13
Joined: Sun Feb 15, 2009 9:04 pm

queue tree selector

Sun Mar 22, 2009 11:41 pm

Hi !
I am using queue tree for bandwith limiting - but i have a problem with performance. At 600 mangles 300 queues and traffic about 20 Mb cpu usuage (PIII 1000 ) is about 50-60 % (Rb 600 has 100% CPU usuage).
Is there a way to change (or add) selector for queue tree for src or dst address like in linux tc ?
I use earlier scripts in linux without mangles and performance was very good.
I don't need mangles when bandwith is limited on router who don't need NAT.

Can anybody from MikroTik team request for this post ?

Best Regards
Tomek
 
yancho
Member Candidate
Member Candidate
Posts: 207
Joined: Tue Jun 01, 2004 3:04 pm
Location: LV

Re: queue tree selector

Mon Mar 23, 2009 12:22 am

Wow 600 mangle and 300 queues :shock: What a hell you are trying to limit? Its possible to share bandwidth equally even between 1000 users with few mangle rules and using few PCQ queues! Take a look http://wiki.mikrotik.com/wiki/Bandwidth ... and_Queues
 
netsystem
just joined
Topic Author
Posts: 13
Joined: Sun Feb 15, 2009 9:04 pm

Re: queue tree selector

Mon Mar 23, 2009 7:45 am

I like my solution. I can see bandwith usuage of any user in my network (down + up) at realtime.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26381
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: queue tree selector

Mon Mar 23, 2009 9:56 am

I like my solution. I can see bandwith usuage of any user in my network (down + up) at realtime.
yes, but you are also killing your router's performance
 
netsystem
just joined
Topic Author
Posts: 13
Joined: Sun Feb 15, 2009 9:04 pm

Re: queue tree selector

Mon Mar 23, 2009 2:20 pm

I know this - but this post is for find a solution - maybe OS upgrade. I make script in htb on linux few years later (without mangles and u32 filter - src and dst address targets) and everything works ok without kiling my cpu.
Queue tree is very useful - but has disadwantage - targeting by packet mark.
I can use linux and htb scripts - but i like Mikrotik OS - maybe you can do something with it.
Packet marks are very ineffective in large traffiic - maybe is time to change something.

Best Regards
Tomasz

P.S. Are you planning MUM in Poland this year ?
 
yancho
Member Candidate
Member Candidate
Posts: 207
Joined: Tue Jun 01, 2004 3:04 pm
Location: LV

Re: queue tree selector

Mon Mar 23, 2009 6:03 pm

Not sure, but maybe simple queues without mangling works better?
Anyhow you can use torch tool for realtime traffic monitoring, or you are using queues to collect SNMP data? If yes there is other ways to monitor/collect/count per user bandwidth usage.
 
netsystem
just joined
Topic Author
Posts: 13
Joined: Sun Feb 15, 2009 9:04 pm

Re: queue tree selector

Mon Mar 23, 2009 7:25 pm

As you wrote maybe is another way to do this. At this time i have queues named with user first and last name. When someone callin that has problem i just look at queues and see all without search user, address etc.
I heard about simple queues that it adds 3 queues - but i don't now how it works inside OS.
Queue tree is htb type but it don't have all of features for selecting traffic. I think that is a big disadvantage of queue tree.
Normis can you wite more about simple queues (queuing technology, selector) inside OS ?

Best Regards Tomasz
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26381
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: queue tree selector

Tue Mar 24, 2009 9:05 am

not an easy question to answer. if you are interested in how it works, read these:
http://wiki.mikrotik.com/wiki/Category: ... ic_control
 
netsystem
just joined
Topic Author
Posts: 13
Joined: Sun Feb 15, 2009 9:04 pm

Re: queue tree selector

Tue Mar 24, 2009 2:12 pm

Thank you Normis i read this, but i don't see anything about selectors. I have experiences in QoS in Linux since 2000-2001 i know that is not a little think to explain how it works.
Could you write some about selectors ?
Is there a chance to something change with selectors in queue tree ? (i must know for planning feature solutions. If this can't be possible in ROS i must plan change this platform to linux).

Best Regards Tomasz
 
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: queue tree selector

Tue Mar 24, 2009 2:34 pm

Any selector will still use connection tracking to match, so I can't see the reason for that. Queue tree are nice and simple, just do everything in mangle.

If you need some solutions that do not involve mangle use simple queues there are plenty selectors there.

P.S. 600mangles and 300queues for 20Mbps traffic is not normal, whats your latency?
 
netsystem
just joined
Topic Author
Posts: 13
Joined: Sun Feb 15, 2009 9:04 pm

Re: queue tree selector

Tue Mar 24, 2009 3:14 pm

Any selector will still use connection tracking to match, so I can't see the reason for that. Queue tree are nice and simple, just do everything in mangle.

If you need some solutions that do not involve mangle use simple queues there are plenty selectors there.

P.S. 600mangles and 300queues for 20Mbps traffic is not normal, whats your latency?
----
Oh no, look at this (http://lartc.org/howto/lartc.adv-filter.html#AEN1289):
"The U32 selector contains definition of the pattern, that will be matched to the currently processed packet. Precisely, it defines which bits are to be matched in the packet header and nothing more, but this simple method is very powerful. Let's take a look at the following examples, taken directly from a pretty complex, real-world filter:"

This sounds like this selector does not use connection tracking.
There is a difference between mangling packets with label + check + classify ...
and check + classify

Roules at firewal are processed for every packet from top to down until fit roule pattern (fit ends roule processing).
This process killing cpu.

If you can use selector who compares pattern directly with packet field (src, dst, TOS) this process can by mutch efficient.

About latency - can't be latency from roule processing if i have still 40-50 % of CPU power. Latency from QoS is from packet droping ( packets must be retransmited ).

Best Regards Tomasz
 
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: queue tree selector

Wed Mar 25, 2009 9:09 am

looking in every packet for specific bit sequence....

I better will look for it in one packet and then with the help of connection tracking mark all other packets from same connection.

You should choose ether go for faster hardware or optimize your configuration (PCQ and stuff). Queues are for limitation not monitoring.

There are lots of ways how you can monitor and log all of your client traffic.
 
akram
Frequent Visitor
Frequent Visitor
Posts: 88
Joined: Wed Aug 10, 2005 4:58 pm

Re: queue tree selector

Wed Mar 25, 2009 11:00 am

I like my solution. I can see bandwith usuage of any user in my network (down + up) at realtime.
how did u do that?
i'd like to know how can u see bandwidth usage of any user in ur network (down + up) at realtime?
plz help and show me how u did it
 
netsystem
just joined
Topic Author
Posts: 13
Joined: Sun Feb 15, 2009 9:04 pm

Re: queue tree selector

Wed Mar 25, 2009 11:33 am

looking in every packet for specific bit sequence....

I better will look for it in one packet and then with the help of connection tracking mark all other packets from same connection.

You should choose ether go for faster hardware or optimize your configuration (PCQ and stuff). Queues are for limitation not monitoring.

There are lots of ways how you can monitor and log all of your client traffic.
--
I see that you don't understand whats going on with selectors, firewall, class based queues.
Every packet is marked, with connection mark and second rule mark all packets from same connection mark (using connection tracking table) with packet mark (gives all of that packets label). Queue selector looks at this label and classify packet to proper class at end of class is queue.
u32 filter does not mangling packet, it only checks for every packet to fit rule using hash tables.
The point is check every packet with firewall rules. Check for rule fit for every packet spends a lot of CPU time (if you want to check this add 600 rule in INPUT chain and then you can check your CPU usuage :) )
Firewall has inefective rule check because it check rules fit from top to bottom with entered by user order.

Best Regards Tomasz
 
akram
Frequent Visitor
Frequent Visitor
Posts: 88
Joined: Wed Aug 10, 2005 4:58 pm

Re: queue tree selector

Wed Mar 25, 2009 1:46 pm

i got ur problem

all i want to learn from u how did u see bandwith usuage of any user in my network (down + up) at realtime.
i'd like to learn from u how to do it on MK
 
netsystem
just joined
Topic Author
Posts: 13
Joined: Sun Feb 15, 2009 9:04 pm

Re: queue tree selector

Wed Mar 25, 2009 2:30 pm

i got ur problem

all i want to learn from u how did u see bandwith usuage of any user in my network (down + up) at realtime.
i'd like to learn from u how to do it on MK
---
No problem i send you my address list based script. You can add "from hand" 2 queues for user one for download and one for upload too. You must know that limiting is on outgoing interface:
wan->lan - download parent: lan, upload parent: wan
you must add queues:

wan
+--- upload
+----- username_u
lan
+--- download
+----- username_d

send me your e-mail to: tomek@netsystem24.pl, i resend you my script.

Best Regards Tomasz
 
akram
Frequent Visitor
Frequent Visitor
Posts: 88
Joined: Wed Aug 10, 2005 4:58 pm

Re: queue tree selector

Sun Mar 29, 2009 12:24 pm

i'm sorry ,how do i make upload and download for each user , can u give it to me step by step ,cause i don't get it?

Who is online

Users browsing this forum: Bing [Bot] and 50 guests