On Sun, 6 Feb 2005 23:05:59 -0800, Tom Jackson <[EMAIL PROTECTED]> wrote: > On Sunday 06 February 2005 12:03, Stephen wrote: > > > AOLserver doesn't do scatter/gather IO. > > > Hmm, well in nssock.c, there is this note: > * SockProc -- > * > * Socket driver callback proc. This driver attempts efficient > * scatter/gatter I/O if requested and only blocks for the > * driver configured time once if no bytes are available.
"if requested". The iovec is only ever given one buffer, so there's nothing to scatter or gather. > > Read-ahead refers to the driver thread accepting new connections and > > reading data from the socket before passing it to a connection thread > > to run. This beneficially prevents precious connection threads from > > blocking for data as it dribbles in over a 14k modem. > > > > Read-ahead is more aggressive in 4.0 because it reads the entire > > request, not just the request line and headers as was the case in 3.x. > > That's why the new upload limit of 2MB which caught a lot of people > > I think we are referring to the same thing here. The socket driver uses > scatter/gather, but this is transparent to the application. Two different things. Scatter/gather IO uses multiple separate buffers to send or receive data as a contiguous chunk in a single system call. It's used to prevent data copying and extra memory usage and/or the overhead of crossing the kernel/user-space boundary many times for multiple system calls. Read-ahead is the timing/location of the data read from the client. Non-blocking IO from multiple sockets is efficiently multiplexed in the single driver thread. It would be wasteful to have a conn thread (with it's multi-MB cached Tcl interps) block for IO while data crosses the 'Net. There's context switch overhead, too as each conn thread wakes up to read another packet of data. Well, that's how I read it... -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.
