Re: an experiment in pipe bandwidth improvement

From: Larry McVoy (lm@bitmover.com)
Date: Mon Jan 10 2000 - 02:30:14 EST


On Sun, Jan 09, 2000 at 07:32:30PM -0800, Zack Weinberg wrote:
> I attempted to improve the bandwidth of a pipe by enlarging the kernelside
> buffer if a writer offers more data than there's room. Currently a pipe
> write is broken up into one-page chunks. The theory was that this would
> reduce the number of context switches and system calls, and therefore improve
> performance.
>
> The results are quite surprising: bandwidth is reduced by about 100 MB/sec.

You're not the first to get surprised by this, but a hardware guy could
guess the reason right away. The results aren't surprising at all if
you know that:

    a) Linux is quite light weight in the system call and context areas
    b) if the size of the buffer is small, it will fit in the on chip cache

You are seeing is the effect of spilling out of the L1 cache.

-- 
---
Larry McVoy            	   lm@bitmover.com           http://www.bitmover.com/lm 

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:15 EST