Search code examples
linuxsocketsbuffer

How to find the socket buffer size of linux


What's the default socket buffer size of linux? Is there any command to see it?


Solution

  • If you want see your buffer size in terminal, you can take a look at:

    • /proc/sys/net/ipv4/tcp_rmem (for read)
    • /proc/sys/net/ipv4/tcp_wmem (for write)

    They contain three numbers, which are minimum, default and maximum memory size values (in byte), respectively.