Re: Network file transmission with speed of raw disk read. How can that be?!?
From: Jens Kramel (no_at_spam.org)
Date: 07/08/05
- Next message: Kasper Dupont: "Re: Network file transmission with speed of raw disk read. How canthat be?!?"
- Previous message: Kasper Dupont: "Re: Garbage collection for the g++ compiler"
- In reply to: David Schwartz: "Re: Network file transmission with speed of raw disk read. How can that be?!?"
- Next in thread: David Schwartz: "Re: Network file transmission with speed of raw disk read. How can that be?!?"
- Reply: David Schwartz: "Re: Network file transmission with speed of raw disk read. How can that be?!?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 8 Jul 2005 11:43:28 +0200
"David Schwartz" <davids@webmaster.com> wrote in message
news:dalfcm$dpb$1@nntp.webmaster.com...
> It would report the error when you tried to close the connection down.
>
How could it do that? Are we talking about the simple close(..)-call or do
you think of any other way to shut the connection down?
> If the disk is faster than the network, the network buffer is always
> full. If the network is faster than the disk, the network buffer is almost
> always empty. Either way, you will get parallelism.
>
>
> DS
So, let's build an example from this (used values might be a bit unrealistic
;)
Let's assume that disk is significantly faster than network and that the
whole network buffer is already full.
The program loops on:
read 100 bytes into buffer x
send the 100 bytes in buffer x
In this case, we would nearly lose the advantage of parallelism, right? The
send(..)-call has to wait until there are 100 bytes freed in the buffer,
which means it has to wait until the network really tranferred 100 bytes of
data. until this is completed, the send(..)-call can't return and the next
read(..)-call won't happen. And because the disk is always faster than the
network in our example, the disk will read the next 100 bytes again before
the network freed up another 100 bytes, so there will be another significant
delay.
Please, correct me if I'm wrong. And thanks again, of course!
Jens
- Next message: Kasper Dupont: "Re: Network file transmission with speed of raw disk read. How canthat be?!?"
- Previous message: Kasper Dupont: "Re: Garbage collection for the g++ compiler"
- In reply to: David Schwartz: "Re: Network file transmission with speed of raw disk read. How can that be?!?"
- Next in thread: David Schwartz: "Re: Network file transmission with speed of raw disk read. How can that be?!?"
- Reply: David Schwartz: "Re: Network file transmission with speed of raw disk read. How can that be?!?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|