On Fri, 2009-09-04 at 12:48 -0700, Ben Greear wrote: > I'm trying to optimize a tool that should do NFS reads as fast as possible > from a server in order to stress test the server. > > Currently, I open the file as normal and read into a pre-allocated buffer. > > This causes a copy of the data to user-space. > > Is there any way to cause the nfs client logic to still request the file-read, > but not actually copy anything to user-space? > > Maybe some trick with mmap would do this? How about using O_DIRECT? That just copies the data directly into user pages and avoids all the overhead of using the page cache? Note that you can combine O_DIRECT with aio in order to further increase the speeds. Cheers Trond -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html