in reply to 4k read buffer is too small
You might want to look at your NFS client to see if it can be of any help. Readahead could help here a great deal without changing Perl; look at the rsize NFS option, and any other options you have in your NFS client. You will need to test by running tcpdump or looking at your NFS stats, since Perl will still be doing 4K reads, but the OS will be doing larger reads behind the scenes.
If you're only reading the file from beginning to end, another useful trick is to write a small program to read files in whatever blocksize you need (for example with sysread) and write them to standard output; then you can run that program and pipe its output to your actual program, which can read from the pipe in 4KB blocks without affecting how the NFS server is accessed. If you need to seek around this won't work, but sometimes it can be helpful.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: 4k read buffer is too small
by voeckler (Sexton) on Jun 17, 2008 at 04:10 UTC | |
by sgifford (Prior) on Jun 17, 2008 at 04:55 UTC | |
Re^2: 4k read buffer is too small
by voeckler (Sexton) on Jun 17, 2008 at 20:32 UTC | |
by aufflick (Deacon) on Jun 20, 2008 at 10:04 UTC |