l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
August 18: A professional photographer's view of Linux
Next Installfest:
TBD
Latest News:
Aug. 18: Discounts to "Velocity" in NY; come to tonight's "Photography" talk
Page last updated:
2004 Feb 29 21:18

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] Very slow TCP transfer over loopback
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] Very slow TCP transfer over loopback



--On Sunday, February 29, 2004 08:56:42 PM -0500 Mike Simons <msimons@moria.simons-clan.com> wrote:

Hello All,

Got a mystery here... transferring data over the loopback interface
on a old RHAS 2.1 kernel (2.4.9-e.25enterprise) even a modern 2.6.1
kernel, is _very_ slow.  When the SO_RCVBUF is set low.

  As you can see from the tcpdump below after the session gets going,
only one data packet is exchanged every .2 seconds, the sending side
of the pipe seems to be waiting for something...

- Anyone have a place to look in the RFCs or such that would explain
  why it's waiting, for what?
Seems pretty quick to me:

Run while stracing the server:

dd if=/dev/zero bs=1024  | time nc -q 0 localhost 2222
Command exited with non-zero status 1
0.07user 0.88system 0:38.67elapsed 2%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (144major+26minor)pagefaults 0swaps
363244+0 records in
363243+0 records out

Fixed the sample program to setsockopt() the accepted file and straced the server:

dd if=/dev/zero bs=1024  | time nc -q 0 localhost 2222
Command exited with non-zero status 1
0.06user 0.79system 0:30.18elapsed 2%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (144major+26minor)pagefaults 0swaps
277564+0 records in
277563+0 records out

Run while tcpdumping the loopback interface:

dd if=/dev/zero bs=1024  | time nc -q 0 localhost 2222
Command exited with non-zero status 1
0.17user 1.98system 0:21.79elapsed 9%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (145major+27minor)pagefaults 0swaps
818739+0 records in
818738+0 records out

Just let it run a while:

dd if=/dev/zero bs=1024  | time nc -q 0 localhost 2222
Command exited with non-zero status 1
0.33user 4.90system 0:23.38elapsed 22%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (144major+26minor)pagefaults 0swaps
2045878+0 records in
2045877+0 records out


--
Ken Herron
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.