SMBclient and Local Access Transfers... 8
maan asks: "I recently started using smbclient under Linux. I know that many test results have showed that Samba as a server gives more throughput than an NT server. However, I have found that smbclient is much slower with than Windows when accessing the localhost. Anyone knows if the Samba client needs more work?" That's rather odd. Can someone verify this behavior? Does anyone have any possible explanations?
Re:connections over localhost (Score:1)
I wrote a program that counts the number of bytes read in from stdin, and then writes them to stdout. It also records the start/end time of its run, and starts timing from the recieving of the 1st byte.
Then, I setup 2 netcat sessions, one listening on a port, and putting the output in /dev/null, and the other reading from /dev/zero, and piping it through my program, and then through to netcat, which sent it to the other netcat.
I did this on both connections to 127.0.0.1 and my network cards IP, and the results are almost identical.
225583104.000000 bytes
6612615.740435 Bytes/sec
52900925.923483 bits/sec
I suspect that my CPU is probably limiting things though :)
Later I'll try it on a K6II/400 and see if the results are any different.
Btw - I realize that my test isn't exactly accurate, but the figures are probably in the right area. If you see an obvious mistake in my measuring, let me know.
Oh, if you want the program to laugh at my coding, email me :)
Re:connections over localhost (Score:1)
Why do ALL this stuff instead of just taking the shortcut? Because the loopback device (127.x.x.x) is suppose to simulate a network. loopback will be faster only in that it doesn't have to put it on the wire for xx milliseconds. I'm not saying there are any inbuilt delays, rather loopback wasn't designed with speed in mind.
For highspeed communication to processes on your local machine, you probably shouldn't use network sockets. I'm not sure, but Unix sockets may be faster, otherwise pipes.
Nick
Re:smbclient on localhost? (Score:1)
Re:connections over localhost (Score:1)
The ip to my computer is 1.2.3.4. I can get almost a gigabit per second of bandwidth by ftping to 1.2.3.4 and downloading a file. FTPing to 127.0.0.1, however, results in about 10 kilobits per second. Try it yourself; I'd like to see if other people are experiencing this, or it's the odd 'just me' bug.
Adding an IP and TCP header to a packet is fast and trivial; after this the kernel picks up the packet and delivers it directly to the receiving socket. Since this is slower over localhost, I would assume perhaps there is some throttling done to traffic over localhost.
Huh? (was: Wrong forum?) (Score:1)
Sure, suggesting another place for help is great, don't get me wrong. But saying to take it somewhere else seems to me to be against the very nature of
OTOH, a question like this probably would be answered more quickly with a judicious search on deja.com [deja.com].
Wrong forum? (Score:2)
http://us1.samba.org/samba/archives.html [samba.org].
connections over localhost (Score:2)
The solution to this problem is to use the actual IP address of your computer instead. I haven't tried 0.0.0.0, but that might work as well.