So, what if readahead > bufsize, what does that mean?  When we
read-ahead, we read directly into the buffer. If the buffer is
read-ahead sized, no point reading in smaller than neccessary bufsize
chunks.
What if readahead < bufsize? Does it mean the buffer will never be
fully filled? What kind of sense does that make.

Reading nsd/driver.c, it's really not obvious what's going on.
I will see into that, readahead could be unnesassary


Well, the concept is necessary. We added it ourselves after discussing
it a whole lot!

But there are some weird interactions going on in that section of
code. The intent is not clear at all.

Making buffer too big will block driver while reading too much data, that was the intent to make the driver async and not blocking on reads and writes, uploading big file into memory makes nsd process huge, writing small chunks into temp file uses less memory but blocks the driver if chunks are big enough. So if i set limit to 1Mb for uploads and driver will use buffer of that size, it will block while reading the whole 1Mb, but reading from all sockets by 16k could be faster than by 512K-1Mb. Am i right about this?

--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/


Reply via email to