MATLAB Linux tcpip buffer overflow

Hello,
I write a client in MATLAB based on tcpip object witch connect to a 3rf party server based on socket. all run on Windows and Linux.
  • On Windows, internal buffer seem very big or infinite. The standard TCP/IP ACK is receive correctly. The basic/standard tcp/ip mecanisme work well
  • On Linux, internal buffer seem to be 64 Ko. and ACK is sended anyway if the buffer is saturated so i can flood it quicly !!!
Can someone tell me how to increase this buffer size ? It's a Java parameters ?
Thanks to help

Answers (1)

Jason Ross
Jason Ross on 5 Oct 2011
Google around for your Linux distribution as to how to increase TCP/IP buffer size. It's likely configured in a file in /etc, and you'll likely need root permission to do it.

2 Comments

Hello Jason,
Thanks for help me.
I already check if a buffer is limiter to 64 Ko but all seem large enougth, what do you think about ? do i need to increase a value ?
eric@devboard:~$ cat /proc/sys/net/core/rmem_default
112640
eric@devboard:~$ cat /proc/sys/net/core/rmem_max
131071
eric@devboard:~$ cat /proc/sys/net/core/wmem_default
112640
eric@devboard:~$ cat /proc/sys/net/core/wmem_max
131071
eric@devboard:~$ cat /proc/sys/net/ipv4/tcp_window_scaling
1
eric@devboard:~$ cat /proc/sys/net/ipv4/tcp_sack
1
eric@devboard:~$ cat /proc/sys/net/ipv4/tcp_fack
1
eric@devboard:~$ cat /proc/sys/net/ipv4/tcp_timestamps
1
eric@devboard:~$ cat /proc/sys/net/ipv4/tcp_mem
81312 108416 162624
eric@devboard:~$ cat /proc/sys/net/ipv4/tcp_wmem
4096 16384 3469312
eric@devboard:~$ cat /proc/sys/net/ipv4/tcp_rmem
4096 87380 3469312
eric@devboard:~$ cat /proc/sys/net/ipv4/tcp_low_latency
0
Another thanks
Jason,
To be more clear, here is the video show difference beetween Linux and Windows :
http://niobium.iav.ch/matlab/tcpnoflood.flv (Win32)
http://niobium.iav.ch/matlab/tcpflood.flv (Linux)
64 Ko "65536 bytes" is the "clear" limit... i hop this parameters can be change
Thanks in advance

Sign in to comment.

Asked:

on 5 Oct 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!