Hi,
I am involved in research around EXT2 file system. During the ongoing
research project I have noticed nfs behavior for which I would like to
benefit from your experiences.
I am using Red Hat Linux 9.0 (kernel version 2.4.20-8).
*Scenairo:*
The nfs client is required to read a file residing on a remote server.
I monitored nfs requests as recieved by the EXT2 using kernel mode messages.
I found the following sequence:
On Client Side:
Application opens file residing on nfs mounted directory.
reads the file
reads the file
reads the file
closes the file
Server side: Requests as recieved by the Ext2
nfs request opens the file
reads the data
closes the file
nfs request opens the file
reads the data
closes the file
nfs request opens the file
reads the data
closes the file
*Behaviour Noticed:*
Nfs client opens the file for every read request and reads the data then
closes the file. And repeats the same procedure for every read request.
*Question:*
It was noted that after each Read, the file is closed,so the Virtual File
System (VFS) file object is deleted.
For next time Read a new VFS level file object is created.
Now nfs keeps record of the last reading position and sends the read request
to EXT2 with last reading position.
Where as at EXT2 level I was supposing to get the position zero as the file
was closed in the last reading and all its memory references were deleted.
How/where does the nfs keeps the record of the previous reading position?
I want to get the reference to the documentation stating the read/write
behaviour of nfs.
with best regards,
Arfan
--
Muhammad Arfan Nazir
Research Associate
COMSATS Institute of IT (CIIT),
Islamabad, Pakistan
http://csr.comsats.edu.pk/research/multimedia.shtml
On Mon, Dec 19, 2005 at 04:52:30PM +0500, Muhammad Irfan Nazir wrote:
> Where as at EXT2 level I was supposing to get the position zero as the file
> was closed in the last reading and all its memory references were deleted.
>
> How/where does the nfs keeps the record of the previous reading position?
In the NFS client. Each READ call passes the filehandle, offset and
size to be read. On traditional UNIX servers, read and readahead
behaviour is controlled entirely by the client. However the Linux
NFS server also keeps a cache of read-ahead state for a small number
of files (search for "raparm" in fs/nfsd/vfs.c) thus enabling it to
do server-side readahead also.
> I want to get the reference to the documentation stating the read/write
> behaviour of nfs.
RFC1813 would be a good start.
http://www.faqs.org/rfcs/rfc1813.html
Greg.
--
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs