httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Akins <>
Subject Re: [PATCH] mod_disk_cache: speed up read_table
Date Thu, 18 Aug 2005 13:22:13 GMT
Thanks to all who reminded me what a dumb-a## I am this morning...

I forgot the patch.  Here it is.

Caffiene level much to low...

Brian Akins wrote:
> This one's kinda ugly.
> Rather than rely on apr_file_gets, this stores the total length of the 
> tables, then the serialized table in store_table.  In read_table, it 
> reads this length, allocs that amount, and reads the headers into the 
> buffer.  Then it just uses memchr to "parse" it into a table.
> I didn't mess with the EBCDIC stuff, so alot of the patch is just where 
> I commented all that out.
> I also commented out where the headers file is opened buffered.  It is 
> faster on my tests boxen (Linux 2.6) to use unbuffered (probably because 
> at lease pagesize if being buffered anyway).  YMMV on this one.
> Anyway, I got a nice 5-8% increase in all my benchmarks by using this 
> change.

Brian Akins
Lead Systems Engineer
CNN Internet Technologies

View raw message