Colm MacCarthaigh wrote:
The optimisations wouldn't be removing buffering, they'd be using a different kind of buffering :-) If MMap is not available/enabled we can fail back to a buffered APR read.
I did some tinkering with mod_disk_cache. I encapsulated all the reads of the headers file into its own functions (open, read, seek, close) to test different methods. I've only tested to different ways. Both ways do not use apr_file_gets in read_table/array, but rather use the memchr stuff I posted earlier this week.
-suck whole header file into an apr_pcalloc'ed buffer. Performed 5-9% better than stock, as expected from my earlier testing. This saves the unnecessary memory copies when using APR_BUFFERED as well as the gets overhead.
-mmap the headers file. On Linux 2.6, this performed about 20-30% *worse* than stock. <shrug>
The patch is really, really ugly but it works. I can post it if anyone cares to see it.
-- Brian Akins Lead Systems Engineer CNN Internet Technologies
