Usage examples of applying multiple shaping rules

Discussion of general questions. Your feedback is welcome.

Moderator: Forum Moderators

Usage examples of applying multiple shaping rules

Postby Evgeny » Fri Apr 05, 2013 1:15 pm

Starting from version 1.39, it is possible to configure multiple shaping rules to be simultaneously applied in Bandwidth Splitter. Below are some examples of usage to clarify how it works and how it can be used.

If you have any questions or comments, please feel free to write in this topic.

To allow applying of multiple rules there is a new option in shaping rule: 'Continue to evaluate subsequent rules to allow them to be applied too'. By default it is unchecked, which means that if a rule matches connection, it is applied, and no further rules are applied. This was always the case in all previous versions of BS.

But now, if a rule matches connection, and this new option is checked, this rule is also applied, but subsequent rules are also evaluated. (Rules are checked sequentially, and if another matched rule found with new option unchecked, further evaluation is stopped.) Note that if rule does not match, this new option is ignored and next rule is evaluated anyway.

Image

When multiple shaping rules are applied, the order of these rules does not matter.

In short, the effect of applying multiple shaping rules is that minimum of their speed limits is enforced. But it can be more complex process because the speed of one connection can affect limits of another connection when they have different but intersected set of applied shaping rules. You will see it in examples below.
Evgeny
Moderator
Moderator
 
Posts: 711
Joined: Thu Dec 22, 2005 4:59 pm
Location: BNTC Software

Re: Usage examples of applying multiple shaping rules

Postby Evgeny » Fri Apr 05, 2013 4:40 pm

Example A. Simultaneously applying individual and distributed speed limits to the same user group.

Rule A1.
Applies to: user set "group X"
Speed limit: 200 kbits/s
Shaping type: Individual
Continue to evaluate subsequent rules to allow them to be applied too: checked

Rule A2.
Applies to: user set "group X"
Speed limit: 300 kbits/s
Shaping type: Distributed
"Continue to evaluate ..." option is irrelevant here since there is no other rules below.

Image

This configuration means that each user of group X is limited to 200 kbits/s, but the total group speed also cannot exceed 300 kbits/s.

How it works? The main idea is that all applied rules must be respected.

If only 1 user is downloading, he gets 200 kbits/s. (Minimum of speed limits is chosen.)

Image

If 2 users are downloading at the same time, each one gets 150 kbits/s. This should also be obvious, but here is short explanation:
Based on rule A1, the limit of each user is 200 kbits/s.
And based on rule A2, all users share 300 kbits/s (because it is 'distributed' rule). In this case 300 kbits/s is shared between 2 users, so each one gets 150 kbits/s when both are downloading.
And a minimum of 200 and 150 is chosen as a resulting limit for both users: 150 kbit/s.

Image
Evgeny
Moderator
Moderator
 
Posts: 711
Joined: Thu Dec 22, 2005 4:59 pm
Location: BNTC Software

Re: Usage examples of applying multiple shaping rules

Postby Evgeny » Fri Apr 05, 2013 7:08 pm

Example B. Setting speed limit for a group and also a more restrictive limit for its subset.

Rule B1.
Applies to: user sets "Regular", "VIP"
Speed limit: 700 kbits/s
Shaping type: Distributed
Continue to evaluate subsequent rules to allow them to be applied too: checked

Rule B2.
Applies to: user set "Regular"
Speed limit: 200 kbits/s
Shaping type: Distributed

Image

Again, all rules must be respected. When one user of Regular group (user R) and one user of VIP group (user V) are downloading simultaneously, their speed limits are computed as follows:
Rule B1 is applied to both users, so its limit is supposed to be shared equally: 700 / 2 = 350 kbits/s.
But user R is also limited by another more restrictive rule B2, so limit of user R will actually be 200 kbits/s.
Rule B2 does not apply to user V. Also since the bandwidth in rule B1 is distributed dynamically (which is the default, unless 'Static bandwidth distribution' option is selected), user V will consume unused bandwidth of this rule, so his limit will be computed as 700 - 200 = 500 kbits/s.

Image

This configuration means that while members of both groups share 700 kbits/s, it contains 700 - 200 = 500 kbits/s that can be used only by members of VIP group. This can be thought of as 'reserved' bandwidth (of course if this bandwidth is actually available).

Situation is just a little more complex when several users in both groups are downloading.

If 1 user of Regular group and 4 users of VIP group are downloading simultaneously, each of them gets 140 kbits/s. Explanation:
Limit of rule B1 is shared between all 5 users: 700 / 5 = 140 kbits/s. Rule B2 has a greater limit (200 kbits/s), so 140 kbits/s is enforced for user of Regular group. This also means that dynamic distribution in rule B1 is not needed in this case, so each of 4 users of VIP group also gets 140 kbits/s.

If 2 users of Regular group and 3 users of VIP group are downloading simultaneously, each member of Regular group gets 100 kbits/s, and each member of VIP group gets 166 kbits/s. Explanation:
Limit of rule B1 is shared between all 5 users: 700 / 5 = 140 kbits/s. Limit of rule B2 is shared between 2 users: 200 / 2 = 100 kbits/s. This means 100 kbits/s (minimum) is enforced for each user of Regular group. In this case dynamic distribution takes place in rule B1, so unused bandwidth is distributed between 3 VIP members and each of them gets (700 - 200) / 3 = 166 kbits/s.
Evgeny
Moderator
Moderator
 
Posts: 711
Joined: Thu Dec 22, 2005 4:59 pm
Location: BNTC Software

Re: Usage examples of applying multiple shaping rules

Postby Evgeny » Mon Apr 08, 2013 12:40 pm

Example C. Configuring common speed limit and a more restrictive one for specific destinations.

Rule C1.
Applies to: user set 'group X'
Destinations: External
Speed limit: 500 kbits/s
Shaping type: Individual
Continue to evaluate subsequent rules to allow them to be applied too: checked

Rule C2.
Applies to: user set 'group X'
Destinations: Low priority sites
Speed limit: 100 kbits/s
Shaping type: Individual

Image

The principle here is similar to the one that was in example B. The difference is that here we use 2 different destinations where one is a subset of another ('Low priority sites' is a subset of 'External' network), while in example B we used 2 different user sets where one was also a subset of another ('Regular' was a subset of 'Regular'+'VIP').

In this example user can use up to 100 kbits/s when visiting 'Low priority sites', but the total speed to any destination is also limited to 500 kbits/s.

Generally bandwidth is distributed evenly among all active connections, unless some connections have more restrictive limits. In this example, if there is 1 connection to 'Low priority sites' and 1 connections to any other site, then the former one gets min(100, 500 / 2) = min(100, 250) = 100 kbits/s and the latter one gets 500 - 100 = 400 kbits/s (the latter one gets unused bandwidth of the former connection).

If there are 2 connections to 'Low priority sites' and also 5 connections to any other sites, the former 2 connections get 50 kbits/s each, and the latter 5 connections get 80 kbits/s each. Explanation:
Limit of rule C1 is shared between all 7 connections: 500 / 7 = 71.4 kbits/s. Limit of rule C2 is shared between 2 connections: 100 / 2 = 50 kbits/s. This means 50 kbits/s (minimum) is enforced for each connection to 'Low priority sites'. And since C1 limit is overridden for these 2 connections by C2 limit, dynamic distribution takes place in rule C1, so unused bandwidth is distributed between 5 other connections and each of them gets (500 - 100) / 5 = 80 kbits/s.

Note. You could configure similar rules in previous version of BS, but in that case if user simultaneously had traffic to 'Low priority sites' and other sites, his total speed actually reached 500 + 100 = 600 kbits/s.
Evgeny
Moderator
Moderator
 
Posts: 711
Joined: Thu Dec 22, 2005 4:59 pm
Location: BNTC Software

Re: Usage examples of applying multiple shaping rules

Postby nawaz » Mon Nov 17, 2014 12:47 pm

Hi Everybody,

I hope you can help me with this problem, In the BWS Monitor the field "Client Computer" shows the NetBios Computer name and in the "User Name" the field is left blank ... is this correct ... ? How do I fill the "User Name" field with my clients Information by example Active Directory info...?

Thank you very much!!!
nawaz
 
Posts: 1
Joined: Mon Nov 17, 2014 12:46 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 81 guests

cron