Skip to contentSkip to conversation

Best Kernel QoS Parameters

DISCUSSION Lucas Willian Bocchi 2 participants 5 messages Oct 13, 2009 – Oct 23, 2009 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hello all!

I don't know if this is the right list to send this message, but LARTC is dead and I believe that this is the only place that I'll have the help that I need!

My question is simple: to a linux router, how are the kernel parameters (2.6 kernel tree) to set to make a good and responsive kernel to best QoS Shaping (HTB, HFSC, etc)?

Another question is: how are the effect of TX and RX Ring Buffer (hardware packet buffer) in QoS? The algoritms use these parameters in the QoS configuration? I presume that this parameters can affect the performance, because the hardware buffer can borrow the QoS configuration.

Thanks a lot for answer my question. I believe that it's very important to newbies in this world (QoS), like me.

[]'s

#1 lore raw
Quoted 2 lines · Lucas Willian Bocchi

Hello all!

Hi,

Quoted 2 lines

My question is simple: to a linux router, how are the kernel parameters (2.6 kernel tree) to set to make a good and responsive kernel to best QoS Shaping (HTB, HFSC, etc)?

From my point of view, into a normal environment, the last problem is which packet scheduler choose. All those are so well builds that when your setup don't work like you want, the right question must be "where I'm wrong?" and not "can be the shaper wrong or there is a bug inside?"

For me, for a newbie, the right one are htb. Simple and with a good documentation / cookbook.

Quoted 1 line

Another question is: how are the effect of TX and RX Ring Buffer (hardware packet buffer) in QoS? The algoritms use these parameters in the QoS configuration? I presume that this parameters can affect the performance, because the hardware buffer can borrow the QoS configuration.

I haven't read the sources and I'm not a kernel devel, so I don't know exactly how are the hw buffer use, but I can ensure you that I tried more than one type of ethernet cards into a heavy use systems (google for ml archives) and a good card it's one of the best buys that you can do

Michele

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 2 lines · Lucas Willian Bocchi

Dear Michelle

Ciao,
Lucas

(I think you forgot to include the netfilter address into the sent)

Quoted 12 lines

Even when you choose your shaper, you need to use the "granularity" of kernel to more exact QoS.

The preferences that I know is

1) Preemptible Kernel
2) Tickless System
3) 1000 HZ Kernel

With these parameters on, the shaper precision is very, very increased. But I think that have another parameters that improve more the speed.

If you talk with hard precision in mind, I'm with you. But into a real systems like mine, where p.e. if a user as 1Mb bw and the shaper wrong for 1 or 2 kb, for me it's not a real problem. (admitting that the shape wrong by a simple 1/2%)

However I didn't know the exists of those parameters... No one doc or books that I study mentioned them. Also on this ml, if I remember correctly, no one say to use them.
Seeing like now the default .config found on arch/x86/configs/x86_64_defconfig anyway the 1000hz and preemptible are already set. So I'm feeling like!
Next time I'll upgrade my kernel I'll take care to enable also the tickless parameter!

Quoted 2 lines

Un saluto a tutti italian.

You forgot the last "i" into "italiani". Italian are in English :)

Quoted 3 lines

I'm italian descendent. My father was bird in Napole and bring from Brazil very young.

I'm a bit far from Napole, talking with Italian distances, about 1k km. For understand, near Austria.

Michele

#4 lore raw

Yep. I forgot to include netfilter really. I resend the message to netfilter to see this.

The documentation, really, is very poor in this question.

I think that
1) Preemptible Kernel - Hability to the kernel "interrupt" a process to insert the scheduler in the processor again (more accuracy)
2) Tickless System - Generate a "timer interrupt" when it is more needed. In the scheduler case, make it more "fast".
3) 1000 HZ Kernel - Generate more granularity, inserting a 1ms max latency to the tick.

I think that, in the newest version of the kernel, these are the more important parameters.

Now, about the hardware: I have, for example:
~#~ ethtool -g eth0
Ring parameters for eth0:
Pre-set maximums:

RX:             4096
RX Mini:        0
RX Jumbo:       0
TX:             4096
Current hardware settings:
RX:             256
RX Mini:        0
RX Jumbo:       0
TX:             80

My preocupation is: the Shaper (htb, hfsc, etc) use this parameters in your configuration? The programmers have in mind that this buffer can affect the eficiency of shaper?
Because if I can enqueue/dequeue packets in the hardware, obviously that the Kernel won't have any acknowledgement about these packets. But it will affect the QoS in slow lines, such ADSL and others, when the one, two or three packets inserted in the hardware layer and ignored by the QoS can borrow all the configuration, inserting unknown latencies and other problems.

To me, it's very important the precision, because I have clients with 1 or more MB of link and 56, 48 kbps clients too, and I need to have these in mind.

Thanks a lot for all help!

Michele Petrazzo - Unipex escreveu:

Quoted 60 lines
Quoted 3 lines · Lucas Willian Bocchi

Dear Michelle

Ciao,
Lucas

(I think you forgot to include the netfilter address into the sent)

Quoted 13 lines

Even when you choose your shaper, you need to use the "granularity" of kernel to more exact QoS.

The preferences that I know is

1) Preemptible Kernel
2) Tickless System
3) 1000 HZ Kernel

With these parameters on, the shaper precision is very, very increased. But I think that have another parameters that improve more the speed.

If you talk with hard precision in mind, I'm with you. But into a real systems like mine, where p.e. if a user as 1Mb bw and the shaper wrong for 1 or 2 kb, for me it's not a real problem. (admitting that the shape wrong by a simple 1/2%)

However I didn't know the exists of those parameters... No one doc or books that I study mentioned them. Also on this ml, if I remember correctly, no one say to use them.
Seeing like now the default .config found on arch/x86/configs/x86_64_defconfig anyway the 1000hz and preemptible are already set. So I'm feeling like!
Next time I'll upgrade my kernel I'll take care to enable also the tickless parameter!

Quoted 3 lines

Un saluto a tutti italian.

You forgot the last "i" into "italiani". Italian are in English :)

Quoted 4 lines

I'm italian descendent. My father was bird in Napole and bring from Brazil very young.

I'm a bit far from Napole, talking with Italian distances, about 1k km. For understand, near Austria.

Michele

#5 lore raw

Lucas Willian Bocchi ha scritto:

(sorry for late reply, I was so busy)

Quoted 3 lines

The documentation, really, is very poor in this question.

well said!

Quoted 3 lines

Now, about the hardware: I have, for example: ~#~ ethtool -g eth0 Ring parameters for eth0: Pre-set maximums: RX: 4096 RX Mini: 0 RX Jumbo: 0 TX: 4096 Current hardware settings: RX: 256 RX Mini: 0 RX Jumbo: 0
TX: 80

I have the same data here, more or less

Quoted 1 line

My preocupation is: the Shaper (htb, hfsc, etc) use this parameters in your configuration?

I don't know if directly the shaper or the kernel take advantage of them, but I can say that I tried to use a low card and the result was so...miserable. Of course with the same programming.

Quoted 1 line

The programmers have in mind that this buffer can affect the eficiency of shaper?

I think that the best ml for ask this is directly to lkml.org.

Quoted 4 lines

To me, it's very important the precision, because I have clients with
1 or more MB of link and 56, 48 kbps clients too, and I need to have these in mind.

Sorry, but have you already tried a setup like that? Before starts I try here, in office, my server and after seen that worked perfect with about ten clients, I put it in production and now it's shaping perfectly about 1k htb classes!

Michele