Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Matlab tcpip receive overflow on Linux
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Van Lancker Eric

Posts: 12
Registered: 10/3/05
Matlab tcpip receive overflow on Linux
Posted: Oct 5, 2011 12:55 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hello,

I dont found an answer for my problem, so i try to explain here (hop i get the right)

For explaining, i write a simple reproductible source code here :
http://niobium.iav.ch/matlab/checktcpack.01.zip

The server send an ascii frame with specified size, this server manager the "sended" socket event to theorically not flood the client.

* On Windows, all work ok, the internal buffer seem to be very big or unlimited

* On Linux i cannot send data upper than 64 Ko or MATLAB clear the buffer after 64Ko.

Here a video to see all is ok on Windows
http://niobium.iav.ch/matlab/tcpnoflood.flv

Here a video to see what append on Linux with same source code
http://niobium.iav.ch/matlab/tcpflood.flv

I play with InputBufferSize but without success....

For exemple if i try obj.InputBufferSize=1024*100; (100Ko) no error append (Java Heap ok) but when data arrive, BytesAvailable is only 64 Ko and after the read, BytesAvailable is 0 :(.

Can someone help me to increase this buffer size or tell me what append ?

For information i put my TCP/IP linux (debian) stack configuration
------------------------------------------------------------------
eric@devboard:~$ uname -a
Linux devboard 2.6.32-hx #1 SMP Wed Jun 29 17:54:41 CEST 2011 i686 GNU/Linux
------------------------------------------------------------------
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
------------------------------------------------------------------

You can build the reproductible sample code :
* On linux, be sure you get gcc, 'cd' into the unziped directory and hit 'make'
* On Windows, install mingw (or gcc win distro) 'cd' into the unziped directory and hit 'make.bat'

Can someone help me ?
Thanks in advance



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.