[Samba] TCP/IP block size

Jeremy M jrmymllr at hotmail.com
Tue Aug 5 00:11:40 GMT 2008


I
don't know if this is a Samba question or an OS question. I'm
working on an embedded project (microcontroller, limited RAM)
that reads files from a FreeBSD/Samba (FreeNAS) box using TCP/IP transport on port 445.  They're MP3 files so they're
several MB at least. If I request 512 or 1024 bytes each time, I get
1024 bytes back from Samba every time. That's good.  

 

But, if I request more, say for example 1300 bytes, I get 1300 bytes
returned for the 1st three requests, then the 4th 1300 bytes request is
returned by Samba as two messages, one 196 bytes long and
the other is 1104 bytes long. 

 

It appears that Samba is transmitting data in chunks of 4K, and if I
request an even fraction of that, such as 512 or 1024 bytes at a time,
I always get that amount in the response. I wish I could request 2048
bytes, but this exceeds my ethernet controller buffer and TCP/IP specifications.  

 

Is there a way to change this? In summary, I would like Samba to always
return the number of bytes I request and not split it up between two
messages. I know I can combine the two response messages, but this
causes performance problems for the microcontroller.
			 

			
_________________________________________________________________
Get Windows Live and get whatever you need, wherever you are.  Start here.
http://www.windowslive.com/default.html?ocid=TXT_TAGLM_WL_Home_082008


More information about the samba mailing list