Why does using threads not speed up things?

Franz GEIGER fgeiger at datec.at
Thu Jan 25 08:10:22 EST 2001


Sorry Sean,

this question really was not very precise. Sorry abaout that, stupid me.

Source was on a machine in the LAN, destination on the local machine (drive
D:).

Singlethreaded: Scanning the directory tree on the machine in the LAN took
1300 seconds, 600 secs for the local drive.
Multithreaded: This was in total 300 secs faster, which means, that 50% of
the "local job" were done in parallel to the "LAN job". Now that's really
not so bad, is it?

Thanks for your quick reply and sorry not being that precise.

Best regards
Franz

"Sean Reifschneider" <jafo-pythonlist at tummy.com> wrote in message
news:mailman.980416529.1110.python-list at python.org...
> On Thu, Jan 25, 2001 at 09:33:36AM +0100, Franz GEIGER wrote:
> >As I said I'd expected more, because there is a lot of slow disk I/O
> >involved and data transfer over a 10MBit section of our LAN. Or did I
miss
> >something?
>
> I think you missed the part where you're supposed to profile your code to
> determine exactly where the time is being spent.  For example, it may
> be that you can get a big win on typical traffic by running it through
> the zlib module to compress the data-stream.  If you have more CPU than
> bandwidth.
>
> The gains you might achieve depend largely on what your app is doing,
> of course.  If it spends 90% of it's time trying to shove data over the
> network, the best improvement you can hope for without reducing the amount
> of data you send is 10%, right?
>
> Sean
> --
>  "Action...  Romance...  Welding...  That movie has everything."
>                  -- Evelyn Mitchell speaking about _Subway_, 1998
> Sean Reifschneider, Inimitably Superfluous <jafo at tummy.com>
> tummy.com - Linux Consulting since 1995. Qmail, KRUD, Firewalls, Python
>





More information about the Python-list mailing list