Commit 90788003 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Added some thoughts about chopping up texts.

parent 173c780b
......@@ -20,12 +20,12 @@
It would be nice to be able to spread the work around.
I think the trick would be to not read everything from disk at once.
I think the trick would be to not read everything from disk at once.
We want to read a bit, send it, read some more, and send that. We
add a function to ISC that lets us push an ISC packet onto the ISC
queue that contains no data, just an instruction to call a callback.
That callback reads some more data from the from the disk and queues
hat in ISC too.
That callback reads some more data from the disk and queues that in
ISC too.
When we want to output a text, we start by enqueueing a callback to
read the second bit of the text. Then we read the first bit and
......@@ -68,7 +68,21 @@
yet. It is, however, a Posix 4 extension, not just a Solaris thing.
On Linux we'd have to use poll or select to do asynchronous IO. Is
it possible to use ISC for this as well?
note: it is impossible to use select to do asynchronous I/O
against files. select always considered data from a file to
be immediately availabe. /ceder
ceder says: adding support for aio_* to ISC is probably a good
idea. It should be possible to do it in a way that is useful even
on platforms that don't have aio_*. The idea then is to make sure
that we never read more than one block from the file until we have
written it to the client. Having a 8 KiB buffer where chunks are
copied from file to client, from file to client, is a lot better
than reading 1 MiB from file, chopping it up in small blocks, and
storing them i an ISC queue.
* Sync the database without blocking requests (byers@lysator.liu.se)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment