{
    "mode": "man",
    "parameter": "tc-drr",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/tc-drr/8/json",
    "generated": "2026-08-11T15:22:54Z",
    "synopsis": "tc qdisc ... add drr [ quantum bytes ]",
    "sections": {
        "NAME": {
            "content": "drr - deficit round robin scheduler\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "tc qdisc ... add drr [ quantum bytes ]\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The  Deficit  Round  Robin  Scheduler is a classful queuing discipline as a more flexible re‐\nplacement for Stochastic Fairness Queuing.\n\nUnlike SFQ, there are no built-in queues -- you need to add classes and then set  up  filters\nto classify packets accordingly.  This can be useful e.g. for using RED qdiscs with different\nsettings  for  particular traffic. There is no default class -- if a packet cannot be classi‐\nfied, it is dropped.\n\n",
            "subsections": []
        },
        "ALGORITHM": {
            "content": "Each class is assigned a deficit counter, initialized to quantum.\n\nDRR maintains an (internal) ''active'' list of classes whose qdiscs are non-empty. This  list\nis  used  for  dequeuing.  A packet is dequeued from the class at the head of the list if the\npacket size is smaller or equal to the deficit counter. If the counter is too  small,  it  is\nincreased by quantum and the scheduler moves on to the next class in the active list.\n\n\n",
            "subsections": []
        },
        "PARAMETERS": {
            "content": "quantum\nAmount  of  bytes  a flow is allowed to dequeue before the scheduler moves to the next\nclass. Defaults to the MTU of the interface. The minimum value is 1.\n\n\nEXAMPLE & USAGE\nTo attach to device eth0, using the interface MTU as its quantum:\n\n# tc qdisc add dev eth0 handle 1 root drr\n\nAdding two classes:\n\n# tc class add dev eth0 parent 1: classid 1:1 drr\n# tc class add dev eth0 parent 1: classid 1:2 drr\n\nYou also need to add at least one filter to classify packets.\n\n# tc filter add dev eth0 protocol .. classid 1:1\n\nLike SFQ, DRR is only useful when it owns the queue -- it is a pure scheduler  and  does  not\ndelay  packets.  Attaching  non-work-conserving  qdiscs like tbf to it does not make sense --\nother qdiscs in the active list will also become inactive until the  dequeue  operation  suc‐\nceeds. Embed DRR within another qdisc like HTB or HFSC to ensure it owns the queue.\n\nYou  can  mimic SFQ behavior by assigning packets to the attached classes using the flow fil‐\nter:\n",
            "subsections": [
                {
                    "name": "tc qdisc add dev .. drr",
                    "content": ""
                },
                {
                    "name": "for i in .. 1024;do",
                    "content": "tc class add dev .. classid $handle:$(print %x $i)\ntc qdisc add dev .. fifo limit 16"
                },
                {
                    "name": "done",
                    "content": ""
                },
                {
                    "name": "tc filter add .. protocol ip .. $handle flow hash keys src,dst,proto,proto-src,proto-dst  di‐",
                    "content": ""
                },
                {
                    "name": "visor 1024 perturb 10",
                    "content": ""
                }
            ]
        },
        "SOURCE": {
            "content": "o      M.  Shreedhar  and George Varghese \"Efficient Fair Queuing using Deficit Round Robin\",\nProc. SIGCOMM 95.\n\n",
            "subsections": []
        },
        "NOTES": {
            "content": "This implementation does not drop packets from the longest queue on overrun,  as  limits  are\nhandled by the individual child qdiscs.\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "tc(8), tc-htb(8), tc-sfq(8)\n\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "scheddrr was written by Patrick McHardy.\n\niproute2                                    January 2010                                       TC(8)",
            "subsections": []
        }
    },
    "summary": "drr - deficit round robin scheduler",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "tc",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/tc/8/json"
        },
        {
            "name": "tc-htb",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/tc-htb/8/json"
        },
        {
            "name": "tc-sfq",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/tc-sfq/8/json"
        }
    ]
}