Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How many maximum different CPU-Cores can be used to processing of one IP-packet?

For example, we have 1 CPU with 8 Cores. How many maximum different CPU-Cores can be used to processing of one IP-packet when it going over Eth0->TCP/IP->App (exclude processing in Application)?

For example, could it be 3 CPU-Cores:

  1. Process hardware interrupt
  2. Process checksum calculation
  3. Process copy kernel-space -> user-space (whose pointer has been sent to the socket)

This is very important for the performance, as each transfer of data between the cores is very expensive.

like image 884
Alex Avatar asked Jan 11 '16 21:01

Alex


1 Answers

Generally speaking you'll handle the interrupt on one core, have a chance that the actual kernel work involved in processing it will happen on a different core, and finally hand it off to an application running on a third core. On some OSs you can set process affinity as well as interrupt handler affinity to avoid bouncing your data around.

like image 127
Michael Galassi Avatar answered Nov 11 '22 22:11

Michael Galassi