Throttle settings in Comanche?
goran.krampe at bluefish.se
goran.krampe at bluefish.se
Mon Apr 18 14:44:21 UTC 2005
Hi!
Jason Rogers <jacaetevha at fast-mail.org> wrote:
> On Sat, 2005-04-16 at 14:39, Lex Spoon wrote:
> > FWIW, I've previously done simple benchmarks of Comanche doing bulk
> > downloads, and found it just as fast as Apache and scp: ie, it saturates
> > the network. This was on 10Mbit/sec networks.
> >
> > For simply filling up a T1 link, Squeak and Comanche should be fine. I
> > don't know what was different about my old computer, from the machine
> > you are testing on, but clearly something funny is going on. Sorry I
> > don't have any specific suggestions, but maybe this at least gives you
> > some hope!
>
> Yes, thank you. I am still planning to try the FastSocketStream
> suggested earlier. But, I have been derailed from this particular
> problem for the time being.
This is the heart of it all:
HttpResponse>>pvtWriteContentsOn: aStream
| chunkSize cnts |
chunkSize _ self responseChunkSize.
cnts _ self contents.
[cnts atEnd] whileFalse:
[aStream nextPutAll: (cnts next: chunkSize); flush]
responseChunkSize will be 131072. cnts is the FileStream reading from
disk. aStream is a SocketStream. So it tries to read 131kb at a time and
send it out, if you start looking at SocketStream>>nextPutAll: and flush
etc you will notice that this definitely isn't optimal (lots of copying
and buffer growing going on) and that FastSocketStream is much better in
general.
But I haven't tested large file downloading (only uploading, which is
MUCH better with FastSocketStream) much so I am not sure about the
specifics.
regards, Göran
More information about the Squeak-dev
mailing list
|