* Tc does not seem to be limiting bandwidth
@ 2013-02-01 19:20 Neil Aggarwal
2013-02-01 19:58 ` 叶雨飞
` (14 more replies)
0 siblings, 15 replies; 16+ messages in thread
From: Neil Aggarwal @ 2013-02-01 19:20 UTC (permalink / raw)
To: lartc
[-- Attachment #1: Type: text/plain, Size: 950 bytes --]
Hello:
I have these commands in my firewall startup script:
DEV=v1252
IP=a.b.c.d
/sbin/tc qdisc del dev $DEV root
/sbin/tc qdisc add dev $DEV root handle 1: htb default 30
/sbin/tc class add dev $DEV parent 1: classid 1:1 htb rate 10mbit
/sbin/tc class add dev $DEV parent 1: classid 1:2 htb rate 10mbit
/sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip dst
$IP flowid 1:1
/sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip src
$IP flowid 1:2
And tc qdisc list shows it has something for that dev:
qdisc htb 1: dev v1252 root refcnt 2 r2q 10 default 30 direct_packets_stat 3
But, I am still seeing huge consumption of bandwidth from that server.
Take a look at the attached graph.
Any ideas why tc is not limiting the bandwidth?
Thanks,
Neil
--
Neil Aggarwal, (972)834-1565, http://UnmeteredVPS.net/centos
Virtual private server with CentOS 6 preinstalled
Unmetered bandwidth = no overage charges
[-- Attachment #2: graph.png --]
[-- Type: image/png, Size: 38173 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Tc does not seem to be limiting bandwidth
2013-02-01 19:20 Tc does not seem to be limiting bandwidth Neil Aggarwal
@ 2013-02-01 19:58 ` 叶雨飞
2013-02-01 19:59 ` Outofwall.com
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: 叶雨飞 @ 2013-02-01 19:58 UTC (permalink / raw)
To: lartc
your device, may not have a queue length,
try
ip link set $DEV txqueuelen 1000
and see whether it limits correctly.
On Fri, Feb 1, 2013 at 11:20 AM, Neil Aggarwal <neil@jammconsulting.com> wrote:
> Hello:
>
> I have these commands in my firewall startup script:
>
> DEV=v1252
> IP=a.b.c.d
> /sbin/tc qdisc del dev $DEV root
> /sbin/tc qdisc add dev $DEV root handle 1: htb default 30
> /sbin/tc class add dev $DEV parent 1: classid 1:1 htb rate 10mbit
> /sbin/tc class add dev $DEV parent 1: classid 1:2 htb rate 10mbit
> /sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip dst
> $IP flowid 1:1
> /sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip src
> $IP flowid 1:2
>
> And tc qdisc list shows it has something for that dev:
>
> qdisc htb 1: dev v1252 root refcnt 2 r2q 10 default 30 direct_packets_stat 3
>
> But, I am still seeing huge consumption of bandwidth from that server.
> Take a look at the attached graph.
>
> Any ideas why tc is not limiting the bandwidth?
>
> Thanks,
> Neil
>
> --
> Neil Aggarwal, (972)834-1565, http://UnmeteredVPS.net/centos
> Virtual private server with CentOS 6 preinstalled
> Unmetered bandwidth = no overage charges
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Tc does not seem to be limiting bandwidth
2013-02-01 19:20 Tc does not seem to be limiting bandwidth Neil Aggarwal
2013-02-01 19:58 ` 叶雨飞
@ 2013-02-01 19:59 ` Outofwall.com
2013-02-03 16:53 ` Neil Aggarwal
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Outofwall.com @ 2013-02-01 19:59 UTC (permalink / raw)
To: lartc
your device, may not have a queue length,
try
ip link set $DEV txqueuelen 1000
and see whether it limits correctly.
On Fri, Feb 1, 2013 at 11:58 AM, 叶雨飞 <sunyucong@gmail.com> wrote:
> your device, may not have a queue length,
>
> try
>
> ip link set $DEV txqueuelen 1000
>
> and see whether it limits correctly.
>
> On Fri, Feb 1, 2013 at 11:20 AM, Neil Aggarwal <neil@jammconsulting.com> wrote:
>> Hello:
>>
>> I have these commands in my firewall startup script:
>>
>> DEV=v1252
>> IP=a.b.c.d
>> /sbin/tc qdisc del dev $DEV root
>> /sbin/tc qdisc add dev $DEV root handle 1: htb default 30
>> /sbin/tc class add dev $DEV parent 1: classid 1:1 htb rate 10mbit
>> /sbin/tc class add dev $DEV parent 1: classid 1:2 htb rate 10mbit
>> /sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip dst
>> $IP flowid 1:1
>> /sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip src
>> $IP flowid 1:2
>>
>> And tc qdisc list shows it has something for that dev:
>>
>> qdisc htb 1: dev v1252 root refcnt 2 r2q 10 default 30 direct_packets_stat 3
>>
>> But, I am still seeing huge consumption of bandwidth from that server.
>> Take a look at the attached graph.
>>
>> Any ideas why tc is not limiting the bandwidth?
>>
>> Thanks,
>> Neil
>>
>> --
>> Neil Aggarwal, (972)834-1565, http://UnmeteredVPS.net/centos
>> Virtual private server with CentOS 6 preinstalled
>> Unmetered bandwidth = no overage charges
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: Tc does not seem to be limiting bandwidth
2013-02-01 19:20 Tc does not seem to be limiting bandwidth Neil Aggarwal
2013-02-01 19:58 ` 叶雨飞
2013-02-01 19:59 ` Outofwall.com
@ 2013-02-03 16:53 ` Neil Aggarwal
2013-02-03 21:35 ` Andrew Beverley
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Neil Aggarwal @ 2013-02-03 16:53 UTC (permalink / raw)
To: lartc
I added the call to ip link set and I am still seeing huge bandwidth
consumption. Any other ideas?
Thanks,
Neil
--
Neil Aggarwal, (972) 834-1565
We lend money to investors to buy or refinance single family rent houses.
No origination fees, quick approval, no credit check.
-----Original Message-----
From: lartc-owner@vger.kernel.org [mailto:lartc-owner@vger.kernel.org] On Behalf Of Outofwall.com
Sent: Friday, February 01, 2013 2:00 PM
To: Neil Aggarwal
Cc: lartc@vger.kernel.org
Subject: Re: Tc does not seem to be limiting bandwidth
your device, may not have a queue length,
try
ip link set $DEV txqueuelen 1000
and see whether it limits correctly.
On Fri, Feb 1, 2013 at 11:58 AM, 叶雨飞 <sunyucong@gmail.com> wrote:
> your device, may not have a queue length,
>
> try
>
> ip link set $DEV txqueuelen 1000
>
> and see whether it limits correctly.
>
> On Fri, Feb 1, 2013 at 11:20 AM, Neil Aggarwal <neil@jammconsulting.com> wrote:
>> Hello:
>>
>> I have these commands in my firewall startup script:
>>
>> DEV=v1252
>> IP=a.b.c.d
>> /sbin/tc qdisc del dev $DEV root
>> /sbin/tc qdisc add dev $DEV root handle 1: htb default 30
>> /sbin/tc class add dev $DEV parent 1: classid 1:1 htb rate 10mbit
>> /sbin/tc class add dev $DEV parent 1: classid 1:2 htb rate 10mbit
>> /sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip dst
>> $IP flowid 1:1
>> /sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip src
>> $IP flowid 1:2
>>
>> And tc qdisc list shows it has something for that dev:
>>
>> qdisc htb 1: dev v1252 root refcnt 2 r2q 10 default 30 direct_packets_stat 3
>>
>> But, I am still seeing huge consumption of bandwidth from that server.
>> Take a look at the attached graph.
>>
>> Any ideas why tc is not limiting the bandwidth?
>>
>> Thanks,
>> Neil
>>
>> --
>> Neil Aggarwal, (972)834-1565, http://UnmeteredVPS.net/centos
>> Virtual private server with CentOS 6 preinstalled
>> Unmetered bandwidth = no overage charges
--
To unsubscribe from this list: send the line "unsubscribe lartc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Tc does not seem to be limiting bandwidth
2013-02-01 19:20 Tc does not seem to be limiting bandwidth Neil Aggarwal
` (2 preceding siblings ...)
2013-02-03 16:53 ` Neil Aggarwal
@ 2013-02-03 21:35 ` Andrew Beverley
2013-02-03 23:34 ` Neil Aggarwal
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Andrew Beverley @ 2013-02-03 21:35 UTC (permalink / raw)
To: lartc
On Fri, 2013-02-01 at 13:20 -0600, Neil Aggarwal wrote:
> Hello:
>
> I have these commands in my firewall startup script:
>
> DEV=v1252
> IP=a.b.c.d
> /sbin/tc qdisc del dev $DEV root
> /sbin/tc qdisc add dev $DEV root handle 1: htb default 30
> /sbin/tc class add dev $DEV parent 1: classid 1:1 htb rate 10mbit
> /sbin/tc class add dev $DEV parent 1: classid 1:2 htb rate 10mbit
> /sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip dst
> $IP flowid 1:1
> /sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip src
> $IP flowid 1:2
You're setting a rate value but not a ceil value. Rate values can be
exceeded, ceil values cannot.
You may also need an extra class with an overall rate limit, and then
your leaf classes attached to that (I don't know if that's required, but
the examples I have seen have used that). I can provide examples if
needed.
Andy
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: Tc does not seem to be limiting bandwidth
2013-02-01 19:20 Tc does not seem to be limiting bandwidth Neil Aggarwal
` (3 preceding siblings ...)
2013-02-03 21:35 ` Andrew Beverley
@ 2013-02-03 23:34 ` Neil Aggarwal
2013-02-03 23:55 ` Neil Aggarwal
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Neil Aggarwal @ 2013-02-03 23:34 UTC (permalink / raw)
To: lartc
Andy (Copy to LARTC):
> You're setting a rate value but not a ceil value. [...] I can provide
> examples if needed.
An example would be nice.
I also tried using the token bucket filter:
/sbin/tc qdisc add dev $DEV root tbf rate 1mbit latency 5ms burst 2048
Which also does not seem to be limiting the bandwidth.
I appreciate any help you can offer.
Thank you,
Neil
--
Neil Aggarwal, (972) 834-1565
We lend money to investors to buy or refinance single family rent houses.
No origination fees, quick approval, no credit check.
-----Original Message-----
From: lartc-owner@vger.kernel.org [mailto:lartc-owner@vger.kernel.org] On Behalf Of Andrew Beverley
Sent: Sunday, February 03, 2013 3:35 PM
To: Neil Aggarwal
Cc: lartc@vger.kernel.org
Subject: Re: Tc does not seem to be limiting bandwidth
On Fri, 2013-02-01 at 13:20 -0600, Neil Aggarwal wrote:
> Hello:
>
> I have these commands in my firewall startup script:
>
> DEV=v1252
> IP=a.b.c.d
> /sbin/tc qdisc del dev $DEV root
> /sbin/tc qdisc add dev $DEV root handle 1: htb default 30
> /sbin/tc class add dev $DEV parent 1: classid 1:1 htb rate 10mbit
> /sbin/tc class add dev $DEV parent 1: classid 1:2 htb rate 10mbit
> /sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip dst
> $IP flowid 1:1
> /sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip src
> $IP flowid 1:2
Andy
--
To unsubscribe from this list: send the line "unsubscribe lartc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: Tc does not seem to be limiting bandwidth
2013-02-01 19:20 Tc does not seem to be limiting bandwidth Neil Aggarwal
` (4 preceding siblings ...)
2013-02-03 23:34 ` Neil Aggarwal
@ 2013-02-03 23:55 ` Neil Aggarwal
2013-02-04 0:35 ` 叶雨飞
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Neil Aggarwal @ 2013-02-03 23:55 UTC (permalink / raw)
To: lartc
Hello all:
It looks like tc thinks I set a token bucket filter on my interface:
# tc -s qdisc ls dev v1252
qdisc tbf 8006: root refcnt 2 rate 1000Kbit burst 2Kb lat 5.0ms
Sent 6788208 bytes 51190 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
But I am still seeing bandwidth consumption hitting 80mbit/sec.
Any ideas why it would not be working?
This is a CentOS server with all the latest updates installed.
V1252 is a KVM guest running on the machine.
Thank you,
Neil
--
Neil Aggarwal, (972)834-1565, http://UnmeteredVPS.net/centos
Virtual private server with CentOS 6 preinstalled
Unmetered bandwidth = no overage charges
-----Original Message-----
From: lartc-owner@vger.kernel.org [mailto:lartc-owner@vger.kernel.org] On
Behalf Of Neil Aggarwal
Sent: Friday, February 01, 2013 1:20 PM
To: lartc@vger.kernel.org
Subject: Tc does not seem to be limiting bandwidth
Hello:
I have these commands in my firewall startup script:
DEV=v1252
IP=a.b.c.d
/sbin/tc qdisc del dev $DEV root
/sbin/tc qdisc add dev $DEV root handle 1: htb default 30
/sbin/tc class add dev $DEV parent 1: classid 1:1 htb rate 10mbit
/sbin/tc class add dev $DEV parent 1: classid 1:2 htb rate 10mbit
/sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip dst
$IP flowid 1:1
/sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip src
$IP flowid 1:2
And tc qdisc list shows it has something for that dev:
qdisc htb 1: dev v1252 root refcnt 2 r2q 10 default 30 direct_packets_stat 3
But, I am still seeing huge consumption of bandwidth from that server.
Take a look at the attached graph.
Any ideas why tc is not limiting the bandwidth?
Thanks,
Neil
--
Neil Aggarwal, (972)834-1565, http://UnmeteredVPS.net/centos
Virtual private server with CentOS 6 preinstalled
Unmetered bandwidth = no overage charges
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Tc does not seem to be limiting bandwidth
2013-02-01 19:20 Tc does not seem to be limiting bandwidth Neil Aggarwal
` (5 preceding siblings ...)
2013-02-03 23:55 ` Neil Aggarwal
@ 2013-02-04 0:35 ` 叶雨飞
2013-02-04 1:17 ` Neil Aggarwal
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: 叶雨飞 @ 2013-02-04 0:35 UTC (permalink / raw)
To: lartc
To set a ceil value, just add ceil 10Mbit after your rate 10Mbit in
your HTB script.
BTW, please fix your spam detector, i call it racism
to think all email contains Chinese character as spam.
On Sun, Feb 3, 2013 at 3:55 PM, Neil Aggarwal <neil@jammconsulting.com> wrote:
> Hello all:
>
> It looks like tc thinks I set a token bucket filter on my interface:
>
> # tc -s qdisc ls dev v1252
> qdisc tbf 8006: root refcnt 2 rate 1000Kbit burst 2Kb lat 5.0ms
> Sent 6788208 bytes 51190 pkt (dropped 0, overlimits 0 requeues 0)
> rate 0bit 0pps backlog 0b 0p requeues 0
>
> But I am still seeing bandwidth consumption hitting 80mbit/sec.
>
> Any ideas why it would not be working?
> This is a CentOS server with all the latest updates installed.
> V1252 is a KVM guest running on the machine.
>
> Thank you,
> Neil
>
> --
> Neil Aggarwal, (972)834-1565, http://UnmeteredVPS.net/centos
> Virtual private server with CentOS 6 preinstalled
> Unmetered bandwidth = no overage charges
>
> -----Original Message-----
> From: lartc-owner@vger.kernel.org [mailto:lartc-owner@vger.kernel.org] On
> Behalf Of Neil Aggarwal
> Sent: Friday, February 01, 2013 1:20 PM
> To: lartc@vger.kernel.org
> Subject: Tc does not seem to be limiting bandwidth
>
> Hello:
>
> I have these commands in my firewall startup script:
>
> DEV=v1252
> IP=a.b.c.d
> /sbin/tc qdisc del dev $DEV root
> /sbin/tc qdisc add dev $DEV root handle 1: htb default 30
> /sbin/tc class add dev $DEV parent 1: classid 1:1 htb rate 10mbit
> /sbin/tc class add dev $DEV parent 1: classid 1:2 htb rate 10mbit
> /sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip dst
> $IP flowid 1:1
> /sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip src
> $IP flowid 1:2
>
> And tc qdisc list shows it has something for that dev:
>
> qdisc htb 1: dev v1252 root refcnt 2 r2q 10 default 30 direct_packets_stat 3
>
> But, I am still seeing huge consumption of bandwidth from that server.
> Take a look at the attached graph.
>
> Any ideas why tc is not limiting the bandwidth?
>
> Thanks,
> Neil
>
> --
> Neil Aggarwal, (972)834-1565, http://UnmeteredVPS.net/centos
> Virtual private server with CentOS 6 preinstalled
> Unmetered bandwidth = no overage charges
>
> --
> To unsubscribe from this list: send the line "unsubscribe lartc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: Tc does not seem to be limiting bandwidth
2013-02-01 19:20 Tc does not seem to be limiting bandwidth Neil Aggarwal
` (6 preceding siblings ...)
2013-02-04 0:35 ` 叶雨飞
@ 2013-02-04 1:17 ` Neil Aggarwal
2013-02-04 22:57 ` Andrew Beverley
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Neil Aggarwal @ 2013-02-04 1:17 UTC (permalink / raw)
To: lartc
Hello all:
I think I figured out something.
I am able to filter the download bandwidth to a VPS server, but
not the upload bandwidth.
How do I filter the upload bandwidth for a VPS server?
Thank you,
Neil
--
Neil Aggarwal, (972)834-1565, http://UnmeteredVPS.net/centos
Virtual private server with CentOS 6 preinstalled
Unmetered bandwidth = no overage charges
-----Original Message-----
From: lartc-owner@vger.kernel.org [mailto:lartc-owner@vger.kernel.org] On
Behalf Of Neil Aggarwal
Sent: Sunday, February 03, 2013 5:56 PM
To: lartc@vger.kernel.org
Subject: RE: Tc does not seem to be limiting bandwidth
Hello all:
It looks like tc thinks I set a token bucket filter on my interface:
# tc -s qdisc ls dev v1252
qdisc tbf 8006: root refcnt 2 rate 1000Kbit burst 2Kb lat 5.0ms
Sent 6788208 bytes 51190 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
But I am still seeing bandwidth consumption hitting 80mbit/sec.
Any ideas why it would not be working?
This is a CentOS server with all the latest updates installed.
V1252 is a KVM guest running on the machine.
Thank you,
Neil
--
Neil Aggarwal, (972)834-1565, http://UnmeteredVPS.net/centos
Virtual private server with CentOS 6 preinstalled
Unmetered bandwidth = no overage charges
-----Original Message-----
From: lartc-owner@vger.kernel.org [mailto:lartc-owner@vger.kernel.org] On
Behalf Of Neil Aggarwal
Sent: Friday, February 01, 2013 1:20 PM
To: lartc@vger.kernel.org
Subject: Tc does not seem to be limiting bandwidth
Hello:
I have these commands in my firewall startup script:
DEV=v1252
IP=a.b.c.d
/sbin/tc qdisc del dev $DEV root
/sbin/tc qdisc add dev $DEV root handle 1: htb default 30
/sbin/tc class add dev $DEV parent 1: classid 1:1 htb rate 10mbit
/sbin/tc class add dev $DEV parent 1: classid 1:2 htb rate 10mbit
/sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip dst
$IP flowid 1:1
/sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip src
$IP flowid 1:2
And tc qdisc list shows it has something for that dev:
qdisc htb 1: dev v1252 root refcnt 2 r2q 10 default 30 direct_packets_stat 3
But, I am still seeing huge consumption of bandwidth from that server.
Take a look at the attached graph.
Any ideas why tc is not limiting the bandwidth?
Thanks,
Neil
--
Neil Aggarwal, (972)834-1565, http://UnmeteredVPS.net/centos
Virtual private server with CentOS 6 preinstalled
Unmetered bandwidth = no overage charges
--
To unsubscribe from this list: send the line "unsubscribe lartc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: Tc does not seem to be limiting bandwidth
2013-02-01 19:20 Tc does not seem to be limiting bandwidth Neil Aggarwal
` (7 preceding siblings ...)
2013-02-04 1:17 ` Neil Aggarwal
@ 2013-02-04 22:57 ` Andrew Beverley
2013-02-04 22:59 ` Andrew Beverley
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Andrew Beverley @ 2013-02-04 22:57 UTC (permalink / raw)
To: lartc
On Sun, 2013-02-03 at 19:17 -0600, Neil Aggarwal wrote:
> Hello all:
>
> I think I figured out something.
>
> I am able to filter the download bandwidth to a VPS server, but
> not the upload bandwidth.
>
> How do I filter the upload bandwidth for a VPS server?
A VPS server shouldn't be any different to a normal server (although I
have never tried). Are you sure you are attaching to the correct
interface and doing the correct egress/ingress shaping? It won't limit
both ways by default.
Can you post your rules that are/aren't working please?
Andy
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Tc does not seem to be limiting bandwidth
2013-02-01 19:20 Tc does not seem to be limiting bandwidth Neil Aggarwal
` (8 preceding siblings ...)
2013-02-04 22:57 ` Andrew Beverley
@ 2013-02-04 22:59 ` Andrew Beverley
2013-02-05 0:11 ` Neil Aggarwal
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Andrew Beverley @ 2013-02-04 22:59 UTC (permalink / raw)
To: lartc
On Sun, 2013-02-03 at 16:35 -0800, 叶雨飞 wrote:
> BTW, please fix your spam detector, i call it racism
> to think all email contains Chinese character as spam.
Nope, I'm getting the delivery failures as well. Neil - please turn off
your spam rejections for people who are trying to help you ;-)
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: Tc does not seem to be limiting bandwidth
2013-02-01 19:20 Tc does not seem to be limiting bandwidth Neil Aggarwal
` (9 preceding siblings ...)
2013-02-04 22:59 ` Andrew Beverley
@ 2013-02-05 0:11 ` Neil Aggarwal
2013-02-05 7:33 ` Andrew Beverley
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Neil Aggarwal @ 2013-02-05 0:11 UTC (permalink / raw)
To: lartc
Andrew:
> Can you post your rules that are/aren't working please?
Here are the rules I am using. They throttle the bandwidth into
the VPS just fine, but they are not working to throttle the bandwidth
out of the VPS:
IP=a.b.c.d
DEV=v1208
/sbin/tc qdisc del dev $DEV root
/sbin/tc qdisc add dev $DEV root handle 1: htb default 30
/sbin/tc class add dev $DEV parent 1: classid 1:1 htb rate 500kbit
/sbin/tc class add dev $DEV parent 1: classid 1:2 htb rate 500kbit
/sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip dst $IP flowid 1:1
/sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip src $IP flowid 1:2
Thank you,
Neil
--
Neil Aggarwal, (972)834-1565, http://UnmeteredVPS.net/centos
Virtual private server with CentOS 6 preinstalled
Unmetered bandwidth = no overage charges
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: Tc does not seem to be limiting bandwidth
2013-02-01 19:20 Tc does not seem to be limiting bandwidth Neil Aggarwal
` (10 preceding siblings ...)
2013-02-05 0:11 ` Neil Aggarwal
@ 2013-02-05 7:33 ` Andrew Beverley
2013-02-05 7:35 ` Andrew Beverley
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Andrew Beverley @ 2013-02-05 7:33 UTC (permalink / raw)
To: lartc
On Mon, 2013-02-04 at 18:11 -0600, Neil Aggarwal wrote:
> Andrew:
>
> > Can you post your rules that are/aren't working please?
>
> Here are the rules I am using. They throttle the bandwidth into
> the VPS just fine, but they are not working to throttle the bandwidth
> out of the VPS:
>
> IP=a.b.c.d
> DEV=v1208
> /sbin/tc qdisc del dev $DEV root
> /sbin/tc qdisc add dev $DEV root handle 1: htb default 30
> /sbin/tc class add dev $DEV parent 1: classid 1:1 htb rate 500kbit
> /sbin/tc class add dev $DEV parent 1: classid 1:2 htb rate 500kbit
> /sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip dst $IP flowid 1:1
> /sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip src $IP flowid 1:2
Assuming that these are your only rules, these will be doing the egress
from device v1208, which I am assuming is the upload for the VPS.
If that is the case, you'll need an ingress for the download. The
following page has an example:
http://blog.stevedoria.net/20050906/ingress-policing-with-linux-and-tc
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: Tc does not seem to be limiting bandwidth
2013-02-01 19:20 Tc does not seem to be limiting bandwidth Neil Aggarwal
` (11 preceding siblings ...)
2013-02-05 7:33 ` Andrew Beverley
@ 2013-02-05 7:35 ` Andrew Beverley
2013-02-09 3:27 ` Neil Aggarwal
2013-02-10 11:03 ` Andrew Beverley
14 siblings, 0 replies; 16+ messages in thread
From: Andrew Beverley @ 2013-02-05 7:35 UTC (permalink / raw)
To: lartc
On Mon, 2013-02-04 at 17:10 -0600, Neil Aggarwal wrote:
> Andrew:
>
> Just post your responses to the list.
> There is no need to send me email directly.
Of course, I can try to remember to do so for your particular posts to
that particular mailing list, although I'd have to rearrange the email
addresses as neither a reply-to or reply-all would work.
But it's better netiquette for you not to reject people's emails.
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: Tc does not seem to be limiting bandwidth
2013-02-01 19:20 Tc does not seem to be limiting bandwidth Neil Aggarwal
` (12 preceding siblings ...)
2013-02-05 7:35 ` Andrew Beverley
@ 2013-02-09 3:27 ` Neil Aggarwal
2013-02-10 11:03 ` Andrew Beverley
14 siblings, 0 replies; 16+ messages in thread
From: Neil Aggarwal @ 2013-02-09 3:27 UTC (permalink / raw)
To: lartc
[-- Attachment #1: Type: text/plain, Size: 1421 bytes --]
Andy:
> If that is the case, you'll need an ingress
You were right, I needed to add an ingress filter to limit the upload
speed of the VPS. So, now here are my rules:
IP=a.b.c.d
DEV=v1208
/sbin/tc qdisc del dev $DEV root
/sbin/tc qdisc add dev $DEV root handle 1: htb default 30
/sbin/tc class add dev $DEV parent 1: classid 1:1 htb rate 5mbit
/sbin/tc class add dev $DEV parent 1: classid 1:2 htb rate 5mbit
/sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip dst $IP flowid 1:1
/sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip src $IP flowid 1:2
/sbin/tc qdisc del dev $DEV ingress
/sbin/tc qdisc add dev $DEV ingress handle ffff:
/sbin/tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip src 0.0.0.0/0 police rate 5mbit burst 500k drop flowid :1
I am attaching a graph that shows the bandwidth during two large file transfers.
The first part of the graph is when I was doing a large download.
It sits exactly at 5mbit/sec which is what I want it to do.
Next, I stopped the download and started an upload. That is sitting at
about 60kbit/sec and not going any higher.
Any ideas why the ingress rules are limiting the bandwidth so much?
Thank you,
Neil
--
Neil Aggarwal, (972)834-1565, http://UnmeteredVPS.net/centos
Virtual private server with CentOS 6 preinstalled
Unmetered bandwidth = no overage charges
[-- Attachment #2: bandwidth.png --]
[-- Type: image/png, Size: 23813 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Tc does not seem to be limiting bandwidth
2013-02-01 19:20 Tc does not seem to be limiting bandwidth Neil Aggarwal
` (13 preceding siblings ...)
2013-02-09 3:27 ` Neil Aggarwal
@ 2013-02-10 11:03 ` Andrew Beverley
14 siblings, 0 replies; 16+ messages in thread
From: Andrew Beverley @ 2013-02-10 11:03 UTC (permalink / raw)
To: lartc
On Sun, 2013-02-03 at 21:35 +0000, Andrew Beverley wrote:
> On Fri, 2013-02-01 at 13:20 -0600, Neil Aggarwal wrote:
> > Hello:
> >
> > I have these commands in my firewall startup script:
> >
> > DEV=v1252
> > IP=a.b.c.d
> > /sbin/tc qdisc del dev $DEV root
> > /sbin/tc qdisc add dev $DEV root handle 1: htb default 30
> > /sbin/tc class add dev $DEV parent 1: classid 1:1 htb rate 10mbit
> > /sbin/tc class add dev $DEV parent 1: classid 1:2 htb rate 10mbit
> > /sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip dst
> > $IP flowid 1:1
> > /sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip src
> > $IP flowid 1:2
>
> You're setting a rate value but not a ceil value.
I should correct this statement that I made. If not specified, a ceil
value defaults to the rate value.
> Rate values can be exceeded, ceil values cannot.
This, of course, is still true.
Andy
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2013-02-10 11:03 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-01 19:20 Tc does not seem to be limiting bandwidth Neil Aggarwal
2013-02-01 19:58 ` 叶雨飞
2013-02-01 19:59 ` Outofwall.com
2013-02-03 16:53 ` Neil Aggarwal
2013-02-03 21:35 ` Andrew Beverley
2013-02-03 23:34 ` Neil Aggarwal
2013-02-03 23:55 ` Neil Aggarwal
2013-02-04 0:35 ` 叶雨飞
2013-02-04 1:17 ` Neil Aggarwal
2013-02-04 22:57 ` Andrew Beverley
2013-02-04 22:59 ` Andrew Beverley
2013-02-05 0:11 ` Neil Aggarwal
2013-02-05 7:33 ` Andrew Beverley
2013-02-05 7:35 ` Andrew Beverley
2013-02-09 3:27 ` Neil Aggarwal
2013-02-10 11:03 ` Andrew Beverley
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.