On Mon, 2004-05-10 at 16:07, Andrew Morton wrote: > Ram Pai wrote: > > > > I am nervous about this change. You are totally getting rid of > > lazy-readahead and that was the optimization which gave the best > > possible boost in performance. > > Because it disabled the large readahead outside the area which the app is > reading. But it's still reading too much. > > Let me see how this patch does with a DSS benchmark. > > That was not a real patch. More work is surely needed to get that right. > > > In the normal large random workload this extra page would have > > compesated for all the wasted readaheads. > > I disagree that 64k is "normal"! > > > However in the case of > > sysbench with Andrew's ra-copy patch the readahead calculation is not > > happening quiet right. Is it worth trying to get a marginal gain > > with sysbench at the cost of getting a big hit on DSS benchmarks, > > aio-tests,iozone and probably others. Or am I making an unsubstantiated > > claim? I will get back with results. > > It shouldn't hurt at all - the app does a seek, we perform the > correctly-sized read. Looks like you are right on all counts! I did some modifications to your patch and did a preliminary run with my user-level simulator. With these changes I am able to get rid of that extra page. Also code looks much simpler and adapts well to sequential and random patterns. However I have to run this under some benchmarks and see how it fares. Its a pre-alpha level patch. Can you take a quick look at the changes and see if you like it? I am sure you won't consider these changes a hack ;) RP