nfslogd & ndbm design limitations
Introduction:
nfslogd is a daemon which runs at NFS server to log all the NFS activities from the clients. The subset of these activities is to store information about the files/links/directories. nfslogd does not use flat files to log these activities as the searching of data will become very inefficient. Instead nfslogd uses Solaris native database ndbm to log all these records. This makes searching/deleting/inserting the records very efficient. nfslogd stores two set of records for each file/link/directory. These records are primary & secondary. The write-up is aimed at exposing ndbm design limitations. These limitations are finally exposed to the user of ndbm i.e., nfslogd. As a result of this limitation, nfslogd restricts limited number of files/links to be created in a directory before it starts throwing dbm error. The write-up highlights following issues -
-
nfslogd key & records
-
nfslogd interfacing with ndbm database
-
ndbm data-structure & interfaces
-
ndbm database data organisation
-
ndbm design insert/fetch/delete design
-
positioning new record in the database & split mechnism
-
limitations of the database and hence nfslogd
Please find complete writeup with the analysis
here...
( Jul 10 2005, 08:47:55 PM PDT )
Permalink
NFS (Client) I/O Architecture & Implementation In Solaris
Introduction:
This write-up details the architecture of Solaris I/O implementation for NFSv3 client. The document is helpful in getting insight into the complete life-cycle of NFS data transaction between client and server. The life-cycle involves various steps of NFS data processing by the kernel. These steps within the kernel are:
-
receiving NFS read/write request from user application,
-
processing data using various kernel framework,
-
issuing RPC request to the NFS server,
-
(NFS client) receiving the response from the NFS server &
-
processing the data and finally returning to the user application
which initiated the request.
Both SYNC & ASYNC framework for NFS client data transaction is elaborated. The idea is not to walk through the entire code base but to get familiar with the design and implementation of NFS clients read/write process in the multi-threaded kernel environment. Various kernel data-structures involved in client's NFS read/write is covered. Various kernel framework used by NFS client like kernel VFS, paging, VM, NFS etc., are touched, though not in-depth. This write-up contains certain examples that explain NFS clients read/write behavior in different situations. Clients data and attributes caching is covered explaining in brief open-to-close consistency implementation.
This is helpful in understanding & tackling the read/write/caching and related issues associated with NFS client. Not only this, the document serves as a roadmap for NFS v3 read/write process at the client end. Last but not the least, this write-up doesn't cover each and every details of NFS client related to the subject. So, there is a great scope for anybody interested to add more to this. NFS v4 read/write architecture is not very different from v3 except for delegation feature(serialization of read & write) & compounded RPC calls but they have not changed the NFS read/write architecture and design. The comparative study of NFS v3/v4 can be the next step to strengthen our belief.
Note: Some more modifications are added to the original write-up to make it look more complete. These are related to
-NFS dirty pages
-linking of various kernel & NFS data structures with the help of schematic diagram.
Complete write-up can be downloaded from
- Pdf format :
nfs architecture.
( Jul 05 2005, 07:16:31 AM PDT )
Permalink