How much memory is consumed by the Linux kernel per TCP/IP network connection?

后端 未结 3 770
抹茶落季
抹茶落季 2020-12-07 11:45

How much memory on average is consumed by the Linux kernel (in kernel address space) per TCP/IP network connection?

3条回答
  •  情话喂你
    2020-12-07 12:13

    It depends. On many many things.
    I think an idle connection will take a few hundreds of bytes.
    But if there's data in the transmit and/or receive data, then the consumption increases. The window size can roughly limit this consumption.
    The extra consumption for data isn't just the bytes in the receive/transmit queue. There are overheads, so a segment with one byte might take something like 2K. TCP tries to reduce this, for example by merging segments into a single sk_buff, but it doesn't always succeed.

提交回复
热议问题