Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Scheduler HFSC, No Maneja Prioridades ???

    Scheduled Pinned Locked Moved Español
    11 Posts 2 Posters 8.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      andrenio
      last edited by

      Buen dia.

      Como ven estoy entregado al Traffic Shaper, pues el problema en mi empresa me tiene los pelos de punta.

      Investigando en el foro en ingles me encontre con este Hilo, en el cual segun entiendo el Scheduler HFSC no maneja prioridades. Mi ingles es muy basico, no se si interprete bien.

      http://forum.pfsense.org/index.php/topic,42798.0.html

      Y esto es lo que me responde ermal sobre el tema.

      @ermal:

      In HFSC priorities are useless.
      Please use search function before posting.

      Alguien prodria dar una luz sobre el tema en el idioma de Cervantes?? pues verifico mis queues y tengo esactamente el mismo problema, no se aplican las prioridades cuando tengo el HFSC, y la verdad… a mi parecer la gracia del Traffic Shaper es que nos priorice el trafico que es mas importante para nosotros.

      En la imagen pueden ver que en Wan tengo el HFSC y no se estan aplicando las prioridades a las colas.

      Gracias

      Leonardo Moreno
      prior.png
      prior.png_thumb

      Leonardo Moreno
      Cali - Colombia.

      1 Reply Last reply Reply Quote 0
      • belleraB
        bellera
        last edited by

        Lo tienes explicado en http://www.bellera.cat/josep/pfsense/cabal_cs.html

        Manejas "anchos de banda", no prioridad. Es cuestión de matices.

        1 Reply Last reply Reply Quote 0
        • A
          andrenio
          last edited by

          Creeme que me he leido mcuhas veces http://www.bellera.cat/josep/pfsense/cabal_cs.html se a vuelto para mi una guia infaltable. Como tambien https://calomel.org/pf_hfsc.html

          Pero se deberia manejar tanto ancho de Banda, como prioridad. pues depende de las prioridades quien sale primero, o a quien se le da prioridad cuando el canal esta congestionado. No es asi ??

          Gracias

          Leonardo Moreno
          Cali - Colombia.

          1 Reply Last reply Reply Quote 0
          • A
            andrenio
            last edited by

            Ademas para que tenemos la opcion de prioridades si no las va a tener en cuenta el Traffice Shaper ??

            Leonardo Moreno
            Cali - Colombia.

            1 Reply Last reply Reply Quote 0
            • belleraB
              bellera
              last edited by

              Olvidé decir que hasta la 1.2.3 sólo había HFSC. Ahora (2.0 y 2.0.1) también hay CBQ y PRIQ.

              http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/firewalls-pf.html

              ~~Explicación de CBQ y PRIQ en castellano:

              http://www.openbsd.org/faq/pf/es/queueing.html~~

              http://www.openbsd.org/faq/pf/queueing.html

              Saludos,

              Josep Pujadas

              1 Reply Last reply Reply Quote 0
              • belleraB
                bellera
                last edited by

                Después de leer con más atención el hilo que diste, http://forum.pfsense.org/index.php/topic,42798.0.html y hacer unas cuantas pruebas:

                • La prioridad que indica el configurador web para HFSC no sirve. Al parecer, está documentada en los manuales pero nunca ha figurado en el código de PF ALTQ. O sea que hasta la versión 1.2.3 todos hemos trabajado con HFSC sin necesidad de prioridades. Y funcionó… Tendré que postear esto en el foro de FreeBSD en castellano porque bastante gente emplea todo esto directamente desde consola.

                • La forma de hacer que una cola sea prioritaria en HFSC es con los parámetros m1, d y m2 modelan la curva (arranque) de la cola, http://www.cs.cmu.edu/~hzhang/HFSC/sample-sc1.gif

                • PF (Packet Filter) procede originalmente de OpenBSD y FreeBSD lo adoptó en su día. Suele haber estos trasvases de código entre OpenBSD, FreeBSD y NetBSD. HFSC no es mencionado en el manual de OpenBSD pero sí en man pf.conf. En cambio, en FreeBSD figura tanto en el manual como en man altq y man pf.conf.

                • ¿Qué regulador escoger?

                cbq –-> Class Based Queueing. Queues attached to an interface build a tree, thus each queue can have further child queues.  Each queue can have a priority and a bandwidth assigned. Priority mainly controls the time packets take to get sent out, while bandwidth has primarily effects on throughput. cbq achieves both partitioning and sharing of link bandwidth by hierarchically structured classes. Each class has its own queue and is assigned its share of bandwidth. A child class can borrow bandwidth from its parent class as long as excess bandwidth is available.

                priq ---> Priority Queueing. Queues are flat attached to the interface, thus, queues cannot have further child queues.  Each queue has a unique priority assigned, ranging from 0 to 15. Packets in the queue with the highest priority are processed first.

                hfsc ---> Hierarchical Fair Service Curve. Queues attached to an interface build a tree, thus each queue can have further child queues.  Each queue can have a priority and a bandwidth assigned. Priority mainly controls the time packets take to get sent out, while bandwidth has primarily effects on throughput. hfsc supports both link-sharing and guaranteed real-time services.  It employs a service curve based QoS model, and its unique feature is an ability to decouple delay and bandwidth allocation.

                Lo que se parece más a HFSC es CBQ, mientras que PRIQ sólo gestiona prioridades. Según las especificaciones, HFSC parece que modela el tráfico de forma más eficiente que CBQ pero puede ser más complejo de ajuste.

                Puedes probar, a ver qué se adapta mejor a tus necesidades.

                Dejo documentadas algunas pruebas que he hecho…


                CBQ

                [2.0.1-RELEASE][admin@pfSense.localdomain]/root(82): pftop -bv queue
                
                pfTop: Up Queue 1-13/13, View: queue
                QUEUE               BW SCH  PR  PKTS BYTES DROP_P DROP_B QLEN BORR SUSP P/S  B/S
                root_em1         2000K cbq   0    51  4651      0      0    0    0    0
                 qACK             400K cbq   6     0     0      0      0    0    0    0
                 qDefault         200K cbq   3    50  4321      0      0    0    0    0
                 qP2P             100K cbq         1   330      0      0    0    0    0
                 qOthersHigh      200K cbq   4     0     0      0      0    0    0    0
                 qOthersLow       100K cbq   2     0     0      0      0    0    0    0
                root_em0         1000M cbq   0   126  102K      0      0    0    0    0
                 qLink            200M cbq   2   125  101K      0      0    0    0    0
                 qInternet         10M cbq         0     0      0      0    0    0    0
                  qACK           2097K cbq   6     0     0      0      0    0    0    0
                  qP2P            524K cbq         1   233      0      0    0    0    0
                  qOthersHigh    1048K cbq   4     0     0      0      0    0    0    0
                  qOthersLow      524K cbq   3     0     0      0      0    0    0    0
                
                [2.0.1-RELEASE][admin@pfSense.localdomain]/root(88): pfctl -s queue
                queue root_em1 on em1 bandwidth 2Mb priority 0 cbq( wrr root ) {qACK, qDefault, qP2P, qOthersHigh, qOthersLow}
                queue  qACK on em1 bandwidth 400Kb priority 6 cbq( red ecn borrow )
                queue  qDefault on em1 bandwidth 200Kb priority 3 cbq( red ecn borrow default )
                queue  qP2P on em1 bandwidth 100Kb cbq( red ecn borrow )
                queue  qOthersHigh on em1 bandwidth 200Kb priority 4 cbq( red ecn borrow )
                queue  qOthersLow on em1 bandwidth 100Kb priority 2 cbq( red ecn borrow )
                queue root_em0 on em0 bandwidth 1Gb priority 0 cbq( wrr root ) {qLink, qInternet}
                queue  qLink on em0 bandwidth 200Mb priority 2 qlimit 500 cbq( red ecn borrow default )
                queue  qInternet on em0 bandwidth 10.49Mb cbq( red ecn ) {qACK, qP2P, qOthersHigh, qOthersLow}
                queue   qACK on em0 bandwidth 2.10Mb priority 6 cbq( red ecn borrow )
                queue   qP2P on em0 bandwidth 524.28Kb cbq( red ecn borrow )
                queue   qOthersHigh on em0 bandwidth 1.05Mb priority 4 cbq( red ecn borrow )
                queue   qOthersLow on em0 bandwidth 524.28Kb priority 3 cbq( red ecn borrow )
                

                HFSC

                [2.0.1-RELEASE][admin@pfSense.localdomain]/root(83): pftop -bv queue
                
                pfTop: Up Queue 1-13/13, View: queue
                QUEUE               BW SCH  PR  PKTS BYTES DROP_P DROP_B QLEN BORR SUSP P/S  B/S
                root_em1         2000K hfsc  0     0     0      0      0    0
                 qACK             400K hfsc        0     0      0      0    0
                 qDefault         200K hfsc       29  2262      0      0    0
                 qP2P             100K hfsc        0     0      0      0    0
                 qOthersHigh      200K hfsc        0     0      0      0    0
                 qOthersLow       100K hfsc        0     0      0      0    0
                root_em0         1000M hfsc  0     0     0      0      0    0
                 qLink            200M hfsc        6   512      0      0    0
                 qInternet         10M hfsc        0     0      0      0    0
                  qACK           2097K hfsc        0     0      0      0    0
                  qP2P            524K hfsc        0     0      0      0    0
                  qOthersHigh    1048K hfsc        0     0      0      0    0
                  qOthersLow      524K hfsc        0     0      0      0    0
                
                [2.0.1-RELEASE][admin@pfSense.localdomain]/root(84): pfctl -s queue
                queue root_em1 on em1 bandwidth 2Mb priority 0 {qACK, qDefault, qP2P, qOthersHigh, qOthersLow}
                queue  qACK on em1 bandwidth 400Kb hfsc( red ecn )
                queue  qDefault on em1 bandwidth 200Kb hfsc( red ecn default )
                queue  qP2P on em1 bandwidth 100Kb hfsc( red ecn upperlimit 100Kb )
                queue  qOthersHigh on em1 bandwidth 200Kb hfsc( red ecn )
                queue  qOthersLow on em1 bandwidth 100Kb hfsc( red ecn )
                queue root_em0 on em0 bandwidth 1Gb priority 0 {qLink, qInternet}
                queue  qLink on em0 bandwidth 200Mb qlimit 500 hfsc( red ecn default )
                queue  qInternet on em0 bandwidth 10.49Mb hfsc( red ecn upperlimit 10.49Mb ) {qACK, qP2P, qOthersHigh, qOthersLow}
                queue   qACK on em0 bandwidth 2.10Mb hfsc( red ecn )
                queue   qP2P on em0 bandwidth 524.28Kb hfsc( red ecn upperlimit 524.28Kb )
                queue   qOthersHigh on em0 bandwidth 1.05Mb hfsc( red ecn )
                queue   qOthersLow on em0 bandwidth 524.28Kb hfsc( red ecn )
                

                PRIQ

                [2.0.1-RELEASE][admin@pfSense.localdomain]/root(89): pftop -bv queue
                
                pfTop: Up Queue 1-10/10, View: queue
                QUEUE               BW SCH  PR  PKTS BYTES DROP_P DROP_B QLEN BORR SUSP P/S  B/S
                qACK                   priq  6     0     0      0      0    0
                qDefault               priq  3     3   234      0      0    0
                qP2P                   priq        0     0      0      0    0
                qOthersHigh            priq  4     0     0      0      0    0
                qOthersLow             priq  2     0     0      0      0    0
                qLink                  priq  2     8  1222      0      0    0
                qACK                   priq  6     0     0      0      0    0
                qP2P                   priq        0     0      0      0    0
                qOthersHigh            priq  4     0     0      0      0    0
                qOthersLow             priq  3     0     0      0      0    0
                
                [2.0.1-RELEASE][admin@pfSense.localdomain]/root(90): pfctl -s queue
                queue qACK on em1 priority 6 priq( red ecn )
                queue qDefault on em1 priority 3 priq( red ecn default )
                queue qP2P on em1 priq( red ecn )
                queue qOthersHigh on em1 priority 4 priq( red ecn )
                queue qOthersLow on em1 priority 2 priq( red ecn )
                queue qLink on em0 priority 2 qlimit 500 priq( red ecn default )
                queue qACK on em0 priority 6 priq( red ecn )
                queue qP2P on em0 priq( red ecn )
                queue qOthersHigh on em0 priority 4 priq( red ecn )
                queue qOthersLow on em0 priority 3 priq( red ecn )
                
                1 Reply Last reply Reply Quote 0
                • belleraB
                  bellera
                  last edited by

                  Y algo más…

                  Google HFSC

                  http://en.wikipedia.org/wiki/Hierarchical_Fair_Service_Curve

                  http://linux-ip.net/articles/hfsc.en/

                  donde se explica la idoneidad de HFSC para entornos VoIP debido a su adaptación al tiempo real.

                  Y aunque no soy muy experto en Linux no me parece ver prioridades para cada cola.

                  1 Reply Last reply Reply Quote 0
                  • A
                    andrenio
                    last edited by

                    Josep primero muchas gracias por su intereres y su acuciosa investigacion. En el momento estoy leyendo el Manual que me recomendo: http://www.openbsd.org/faq/pf/es/queueing.html PF: Gestion de Ancho de banda, que por cierto esta muy bueno y digerible. Viendo las bondades de CBQ respecto HFSC, para asi tomar una decision en mi caso particular.

                    No se si sea por que los paquetes que estoy subiendo sean de video y el flujo de bits es mucho, pero la cola que me esta gestionando este, me presenta muchos DROPS. Todo se transmite al puerto 1935 de los servidores de las paginas, que es tecnologia de Streaming de Adobe.

                    Por este motivo sigo investigando a ver que se puede lograr hacer.

                    @bellera:

                    • La forma de hacer que una cola sea prioritaria en HFSC es con los parámetros m1, d y m2 modelan la curva (arranque) de la cola, http://www.cs.cmu.edu/~hzhang/HFSC/sample-sc1.gif

                    Esto ultimo, lo de modelar la curva se deberia hacer en el parametro Realtime ?

                    Que Scheduler fue desarrollado primero ? HFSC ?

                    Gracias

                    Leonardo Moreno

                    Leonardo Moreno
                    Cali - Colombia.

                    1 Reply Last reply Reply Quote 0
                    • A
                      andrenio
                      last edited by

                      En el Scheduler CBQ hay una opcion que me parece muy interesante,

                      borrow - la cola puede tomar ancho de banda prestado de su cola matriz. Esto sólo se puede especificar cuando se usa el scheduler cbq.

                      Estoy leyendo las opciones de HFSC y la opcion para hacer algo como borrow, seria LinkShare ??

                      Leonardo Moreno
                      Cali - Colombia.

                      1 Reply Last reply Reply Quote 0
                      • belleraB
                        bellera
                        last edited by

                        ¿Qué Scheduler fue desarrollado primero? ¿HFSC?

                        Yendo al origen de ALTQ parece que todos se incluyeron al mismo tiempo:

                        http://www.sonycsl.co.jp/person/kjc/kjc/software.html

                        Ahí tienes gráficos con pruebas usando CBQ.

                        De todas maneras no creo que en esto quien fue primero tenga demasiada importancia. Son modelos de gestión de tráfico y se adaptan +- según las necesidades de la instalación.

                        En el Scheduler CBQ hay una opción que me parece muy interesante,

                        borrow - la cola puede tomar ancho de banda prestado de su cola matriz. Esto sólo se puede especificar cuando se usa el scheduler cbq.

                        Estoy leyendo las opciones de HFSC y ¿la opción para hacer algo como borrow, sería LinkShare?

                        Sí, es parecido.

                        QUEUEING/ALTQ http://www.freebsd.org/cgi/man.cgi?query=pf.conf&apropos=0&sektion=0&manpath=FreeBSD+8.1-RELEASE&arch=default&format=html

                        The cbq scheduler supports an additional option:
                        borrow –-> The queue can borrow bandwidth from the parent.

                        The hfsc scheduler supports some additional options:
                        realtime <sc>–---> The minimum required bandwidth for the queue.
                        upperlimit <sc>----> The maximum allowed bandwidth for the queue.
                        linkshare <sc>----> The bandwidth share of a backlogged queue.
                        <sc>is an acronym for service curve.
                        The format for service curve specifications is (m1, d, m2).  m2 controls the bandwidth assigned to the queue.  m1 and d are optional and can be used to control the initial bandwidth assignment. For the first d milliseconds the queue gets the bandwidth given as m1, afterwards the value given in m2.</sc></sc></sc></sc>

                        Furthermore, with cbq and hfsc, child queues can be specified as in an altq declaration, thus building a tree of queues using a part of their parent's bandwidth.

                        La cola que me esta gestionando este, me presenta muchos DROPS.

                        Dale más caudal/prioridad a sus ACK. A ver si mejora.

                        ¡De nada! ¡Para eso estamos y así aprendemos todos!

                        1 Reply Last reply Reply Quote 0
                        • belleraB
                          bellera
                          last edited by

                          En http://serverfault.com/questions/105014/does-anyone-really-understand-how-hfsc-scheduling-in-linux-bsd-works se preguntan qué hace en realidad HFSC y una de las respuestas envían a http://linux-ip.net/articles/hfsc.en/ (enlace que ya te dí).

                          También dí una vuelta por Traffic Shaper de la sección en inglés de este foro y, según el desarrollador que escribió esta parte para pfSense HFSC tiene mejor comportamiento que CBQ en tiempo real (léase VoIP) pero es bastante confusa su configuración si se quiere afinar.

                          En http://bsdrp.net/documentation/examples/maximum_bsdrp_features_lab están empleando HFSC para su laboratorio de ensayo. BSDRP es un enrutador basado en FreeBSD. Parecido pues a pfSense pero orientado sólo a tareas de enrutador.

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.