What is the effect of installing a Linux socket - high priority?

From the linux socket manpage :

SO_PRIORITY
Set the priority specified by the protocol for all packets sent to this socket. Linux uses this value to organize queue networks: higher priority packets may be processed first, depending on the selected device queue queue.

And this is set using:

int optval=7 // valid values are in the range [1,7]  
             // 1- low priority, 7 - high priority  
setsockopt(socket, SOL_SOCKET, SO_PRIORITY, &optval, optlen)   

And let's say the process has:
a. 10 low-priority nests (priority = 4) from socket_1- socket_10,
b. 1 high priority connector (priority = 7) -socket_11

What will happen in the following scenarios:

  • send(): socket_1 - socket_10 socket_11, IMO msgs socket_11 , socket_1 - socket_10.

  • recv(): , , mutilple msgs, socket_11 socket_1 - socket_10?

  • , lsof, netstat ..

+4
2

Linux "qdisc" ( ). qdisc, . , pfifo bfifo, , , , - .

qdisc, pfifo_fast ( qdisc Linux), .

, pfifo_fast qdisc:

enter image description here

, . ( , ), . , , , . , , - , , , , .

qdiscs . , SFQ qdisc:

enter image description here

:

  • qdisc, , socket_11 . pfifo_fast, socket_11 , . , , - , .

  • , , , . , , , - , . , , , .

    , , qdisc , , ? , . , qdiscs , ( ), , - .

  • , , . , , , , .

+9

:

  • ,
  • , /proc

1

, . (DiffServ).

, "" , . , , . fifo0, fifo1. fifo :

  • 0 ( ) - fifo1
  • 1-3 (Filler, Bulk,...) - fifo2
  • 4 - fifo1
  • 5 - fifo2
  • 6-7 (Interactive, Control) - fifo0
  • 8-15 - fifo1

, 1 0.

(tc). . " ". , ( ).

2

Socket , " " / " ", bool. - , " " "", , select/poll recv. , , , .

, ,

  • .
  • /
+3

All Articles