Routing

Β View Only
last person joined: 3 days ago 

Ask questions and share experiences about ACX Series, CTP Series, MX Series, PTX Series, SSR Series, JRR Series, and all things routing, including portfolios and protocols.
  • 1.  QoS: Is the queue and the buffer the same thing?

     
    Posted 04-02-2021 02:49
    Hi.

    While reading QoS, I come across the terms queue (eg. queue fill percentage) and buffer (eg. if a queue is out-of-profile, its packet is buffered).

    Isn't the queue the same thing as the buffer?

    If queue 0 is configured for a buffer size of say 100 bytes, doesn't that mean that the queue length is 100bytes and there is no separate 'buffer' that can store up to 100 bytes?

    Or does each queue actually have a separate buffer such that there can be several notification cells both within the queue and also within the buffer assigned to that queue?

    Thanks,
    Deepak


  • 2.  RE: QoS: Is the queue and the buffer the same thing?
    Best Answer

    Posted 04-02-2021 15:03
    Hello Deepak,

    CoS Queue - When the incoming traffic reaches the device, it takes the action based on the configured BA or MF classifier/filter where the forwarding-class are defined. Both the Forwarding Class and Queues are relative. i.e. Queues are mapped to the Forwarding classes.

    Example:
    Queue      Forwarding-class
            0       best-effort
            1       expedited-forwarding
            2       assured-forwarding
            3       network-control

    Please keep in mind that by default Queue 3 has the Highest priority and further it goes down to Queue 2, 1 and 0.

    Queue Buffer - Each interface queue has its own Queue Buffer which is nothing but the size of the memory space that is allocated for storing the packets. You can view this buffer by using the command "show interfaces queue".

    Example:

    • Queue Buffer Usage:
                     Reserved buffer - The size of the memory buffer that is allocated for storing packets
                     Current - The amount of buffer memory that is currently in use on this queue.

    • Queue-Depth:
                     Current - The maximum number of bytes in this queue, that is currently in use on this queue.

    user@host> show interfaces queue
    Physical interface: ge-0/0/0, Enabled, Physical link is Up
    Interface index: 135, SNMP ifIndex: 510
    Forwarding classes: 8 supported, 4 in use
    Egress queues: 8 supported, 4 in use

    Queue: 0, Forwarding classes: best-effort
    Queued:
    Packets : 14686 0 pps
    Bytes : 616812 0 bps
    Transmitted:
    Packets : 14686 0 pps
    Bytes : 616812 0 bps
    Tail-dropped packets : 0 0 pps
    RL-dropped packets : 0 0 pps
    RL-dropped bytes : 0 0 bps
    RED-dropped packets : 0 0 pps
    Low : 0 0 pps
    Medium-low : 0 0 pps
    Medium-high : 0 0 pps
    High : 0 0 pps
    RED-dropped bytes : 0 0 bps
    Low : 0 0 bps
    Medium-low : 0 0 bps
    Medium-high : 0 0 bps
    High : 0 0 bps
    Queue Buffer Usage:
    Reserved buffer : 118750000 bytes
    Queue-depth bytes :
    Current : 0

    Queue: 1, Forwarding classes: expedited-forwarding
    Queued:
    Packets : 0 0 pps
    Bytes : 0 0 bps
    Transmitted:
    Packets : 0 0 pps
    Bytes : 0 0 bps
    Tail-dropped packets : 0 0 pps
    RL-dropped packets : 0 0 pps
    RL-dropped bytes : 0 0 bps
    RED-dropped packets : 0 0 pps
    Low : 0 0 pps
    Medium-low : 0 0 pps
    Medium-high : 0 0 pps
    High : 0 0 pps
    RED-dropped bytes : 0 0 bps
    Low : 0 0 bps
    Medium-low : 0 0 bps
    Medium-high : 0 0 bps
    High : 0 0 bps
    Queue Buffer Usage:
    Reserved buffer : 9192 bytes
    Queue-depth bytes :
    Current : 0

    Queue: 2, Forwarding classes: assured-forwarding
    Queued:
    Packets : 0 0 pps
    Bytes : 0 0 bps
    Transmitted:
    Packets : 0 0 pps
    Bytes : 0 0 bps
    Tail-dropped packets : 0 0 pps
    RL-dropped packets : 0 0 pps
    RL-dropped bytes : 0 0 bps
    RED-dropped packets : 0 0 pps
    Low : 0 0 pps
    Medium-low : 0 0 pps
    Medium-high : 0 0 pps
    High : 0 0 pps
    RED-dropped bytes : 0 0 bps
    Low : 0 0 bps
    Medium-low : 0 0 bps
    Medium-high : 0 0 bps
    High : 0 0 bps
    Queue Buffer Usage:
    Reserved buffer : 9192 bytes
    Queue-depth bytes :
    Current : 0
    ...

    In a nut shell, 
    1. Queues and Buffers are not the same. 
    2. Each Queues has its own buffer. 


    ------------------------------
    ***𝑫𝒐 π’Žπ’‚π’“π’Œ π’•π’‰π’Šπ’” π’‚π’π’”π’˜π’†π’“ 𝒂𝒔 𝑺𝒐𝒍𝒗𝒆𝒅, π’Šπ’‡ π’Šπ’• 𝒂𝒅𝒅𝒓𝒆𝒔𝒔𝒆𝒔 π’šπ’π’–π’“ π’Šπ’”π’”π’–π’†***

    π•½π–Šπ–Œπ–†π–—π–‰π–˜,
    𝖓𝖔𝖔𝖇 π–’π–†π–˜π–™π–Šπ–—.
    ------------------------------



  • 3.  RE: QoS: Is the queue and the buffer the same thing?

     
    Posted 04-03-2021 02:38

    Thanks noobmaster for helping me with this.

    But if the queue and the buffer are separate memory spaces for packets, more questions are raised.

    1: When a queue is said to be half full (leading to say.. Random Early Discarded packets) or completely full (leading to Tail Dropped packets), what's the state of the buffer?

    2: When is a packet queued and when is it buffered?

    3: I see mention of buffer size a lot. But how long is a queue?

    4: At what point are there several packets in both the buffer and the queue?

    Thanks,

    Deepak




  • 4.  RE: QoS: Is the queue and the buffer the same thing?

    Posted 04-03-2021 12:21
    I have only limited hands-on experience in CoS so let me answer in a best effort basis and leave the rest to the community members. 

    CoS Queues are like pipe which facilitates the packet to be processed/pass-through based on the classification.

    Image Link - https://higherlogicdownload.s3.amazonaws.com/JUNIPER/UploadedImages/960d790a-a084-4916-9029-f4ad644f9247/CoS.png

    Example:

    • From the attached image, Let's assume we are classifying our Voice traffic to be processed in Queue 1 which is mapped to the forwarding-class EF.
    • Voice traffic is given the importance when compared to others.
    • So, if you see the packets incoming to the device it is SSH, Voice and finally Ping.
    • However, based on your configuration we will be processing Voice first and it will be sent to the forwarding-class EF which in turn being mapped to the Queue 1.
    • For this Queue 1, you can configure transmit-rate, buffer-size and priority based on your requirement.
    • Let's say I have configured transmit-rate as 10m exact; which means when a queue reaches its transmit-rate, all subsequent packets are buffered.  

    1: When a queue is said to be half full (leading to say.. Random Early Discarded packets) or completely full (leading to Tail Dropped packets), what's the state of the buffer?
    A: Tail Drop occurs when the queue buffers become full. If the traffic is on higher side for a particular queue and subsequent packets are being placed in the buffer. However, if the buffer is also full it leads to the Tail Drop. 

    2: When is a packet queued and when is it buffered?
    A: As I said earlier, if I have configured transmit-rate as 10m exact; which means when a queue reaches its transmit-rate, all subsequent packets are buffered. Queuing is nothing but a procedure where we send the packets to the appropriate queues post classification.

    3: I see mention of buffer size a lot. But how long is a queue?
    A: transmit-rate is our Queue size; rather than size I would call it as bandwidth. The buffer is the actual storage space holding the packets. 

    4: At what point are there several packets in both the buffer and the queue?
    A: This phenomena occurs when there is high traffic rate in the device. 


    ------------------------------
    ***𝑫𝒐 π’Žπ’‚π’“π’Œ π’•π’‰π’Šπ’” π’‚π’π’”π’˜π’†π’“ 𝒂𝒔 𝑺𝒐𝒍𝒗𝒆𝒅, π’Šπ’‡ π’Šπ’• 𝒂𝒅𝒅𝒓𝒆𝒔𝒔𝒆𝒔 π’šπ’π’–π’“ π’Šπ’”π’”π’–π’†***

    π•½π–Šπ–Œπ–†π–—π–‰π–˜,
    𝖓𝖔𝖔𝖇 π–’π–†π–˜π–™π–Šπ–—.
    ------------------------------



  • 5.  RE: QoS: Is the queue and the buffer the same thing?

     
    Posted 04-03-2021 12:58
    I think I understand now.

    One final (I think) question.

    When a queue is being serviced by the scheduler, all other queues are empty but their buffers may contain packets. True?

    --Deepak


  • 6.  RE: QoS: Is the queue and the buffer the same thing?

    Posted 04-03-2021 13:36
    Yes, that should be true.

    ------------------------------
    ***𝑫𝒐 π’Žπ’‚π’“π’Œ π’•π’‰π’Šπ’” π’‚π’π’”π’˜π’†π’“ 𝒂𝒔 𝑺𝒐𝒍𝒗𝒆𝒅, π’Šπ’‡ π’Šπ’• 𝒂𝒅𝒅𝒓𝒆𝒔𝒔𝒆𝒔 π’šπ’π’–π’“ π’Šπ’”π’”π’–π’†***

    π•½π–Šπ–Œπ–†π–—π–‰π–˜,
    𝖓𝖔𝖔𝖇 π–’π–†π–˜π–™π–Šπ–—.
    ------------------------------



  • 7.  RE: QoS: Is the queue and the buffer the same thing?

     
    Posted 04-03-2021 14:33
    Then I understand now.

    Thanks, noobmaster.