www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/09/19:22:07

Date: Mon, 10 Feb 1997 00:12:56 GMT
Message-Id: <1.5.4.16.19970210001044.1fcf1880@mailhost.sm.ic.ac.uk>
Mime-Version: 1.0
To: Mark Teel <mteel AT dtechs DOT com>
From: Paul Dixon <p DOT dixon AT ic DOT ac DOT uk>
Subject: Re: DJ-WATTCP
Cc: djgpp AT delorie DOT com

Mark,
I have realised that the throughput I get without the printf's corrsponds to
roughly one network packet each 70ms - hence may be a 'waiting for BIOS
timer tick' wait on each and every packet - also that for the problem to
disappear with my code as it stands the printf calls have to be to screen
(ie not redirected to disk) and must include newlines
{ printf("...\r"); fflush(stdout); } does NOT cause the same speed increase
as printf("...\n"); - ie it could be function of the time taken to scroll
the screen.
I guess I need to check through all the tcp-layer code for idle loops!
(primarily in tcpsrc/pctcp.c, tcpsrc/elib.c)
Thanks for any help you can come up with
Paul

I wrote...
>>I have a bizarre problem - on my PC (P90 with a D-Link 16 bit ISA >netcard) I
>>get tx rates of 300kB/s inbound, and 250kB/s outwards, but ONLY with
>>debugging output to the screen at every tcp write - if I disable these
>>printf statements then the tx rate for tcp writes drops by a factor of >20!
>
>>The offending code is horrible cos I have thrown lots of debugging >waiting
>>etc in an attempt to fix but to no avail - does anyone have any good >ideas ?

You wrote...
>Sounds like your data is getting buffered, but without seeing write_s
>and probably the rest of your code, I can't be sure.  You should have
>better tx rates than that on a 10Mb Ethernet link unless you are on a
>very busy network... The screen I/O is probably slowing it down some. 
>But it sounds like the printfs are causing your socket to get flushed
>out...  If I have time, I'll take a look at your code.

PS Is there ANYONE out there with any experience with wattcp for writing
large amounts of data to the net (rather than as primarily for reading data,
like LYNX) ?
---------------------------------------------------------------------
Paul Dixon                            
Software Engineer, Dept of Paediatrics  Telephone: (+44) 171 725 6258
St Mary's Hospital Medical School       Fax:       (+44) 171 725 6284
Norfolk Place, London W2 1PG, UK        Email:       p DOT dixon AT ic DOT ac DOT uk

A Constituent College of 
                 Imperial College of Science, Technology and Medicine
------------------------------------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019