You need to tell the kernel if you need larger-than-default SO_SNDBUF/SO_RCVBUF, e.g. for 4 MByte (default is 128 kByte):
sysctl -w net.core.rmem_max=4194304
sysctl -w net.core.wmem_max=4194304
Documentation: http://git.kernel.org/cgit/linux/kernel/git/stable/linux-sta...