Re: NFS limited to 4K reads/writes
Re: NFS limited to 4K reads/writes
- Subject: Re: NFS limited to 4K reads/writes
- From: Umesh Vaishamapayan <email@hidden>
- Date: Sun, 10 Feb 2002 00:47:51 -0800
On Thursday, January 31, 2002, at 08:52 AM, Andrew Gallatin wrote:
I was playing around with NFS. Darwin seems to perform well as a
server, but its performance leaves a lot to be desired as a client
because it appears to crippled by a 4k read and write size
limit. (verified w/tcpdump). I can reduce the size with mount_nfs,
but I cannot increase it over 4K
bsd/nfs/nfs_bio.c:
108 int
109 nfs_bioread(vp, uio, ioflag, cred, getpages)
110 register struct vnode *vp;
...
138 /*due to getblk/vm interractions, use vm page size or
less values */
139 biosize = min(vp->v_mount->mnt_stat.f_iosize, PAGE_SIZE);
...
pagein/pageout paths do not have this limitation...
By poor performnace, I mean that Darwin reads at 12MB/sec over a
2Gb/sec link. Tru64 and FreeBSD can both read at 50MB/sec. (this is
from a file warm in the server's cache; no disk I/O). Darwin performs
just as well as the competition when its the server...
Any chance of this 4K limit being lifted?
In order to enable larger read()/writes(), vnode_pageout() and following
NFS functions will needs some tweaks...
bsd/nfs/nfs_bio.c nfs_bioread 139 biosize =
min(vp->v_mount->mnt_stat.f_iosize, PAGE_SIZE);
bsd/nfs/nfs_bio.c nfs_write 543 biosize =
min(vp->v_mount->mnt_stat.f_iosize, PAGE_SIZE);
bsd/nfs/nfs_bio.c nfs_write 640 if (!ISSET(bp->b_flags, B_CACHE) && n <
PAGE_SIZE) {
bsd/nfs/nfs_bio.c nfs_write 645 auio.uio_resid = PAGE_SIZE;
bsd/nfs/nfs_bio.c nfs_write 650 iov.iov_len = PAGE_SIZE;
bsd/nfs/nfs_bio.c nfs_write 660 bp->b_validend = PAGE_SIZE -
auio.uio_resid;
bsd/nfs/nfs_bio.c nfs_write 663 PAGE_SIZE);
bsd/nfs/nfs_bio.c nfs_getcacheblk 849 int biosize =
min(vp->v_mount->mnt_stat.f_iosize, PAGE_SIZE);
bsd/nfs/nfs_vfsops.c nfs_iosize 223 if (iosize < PAGE_SIZE)
bsd/nfs/nfs_vfsops.c nfs_iosize 224 iosize = PAGE_SIZE;
bsd/nfs/nfs_vnops.c nfs_setattr 974 PAGE_SIZE);
bsd/nfs/nfs_vnops.c nfs_pageout 4402 lbn = f_offset / PAGE_SIZE;
bsd/nfs/nfs_vnops.c nfs_pageout 4404 for (iosize = size; iosize > 0;
iosize -= PAGE_SIZE, lbn++) {
bsd/nfs/nfs_vnops.c nfs_pageout 4450 pgsize = (iosize + (PAGE_SIZE -
1)) & ~PAGE_MASK;
bsd/nfs/nfs_vnops.c nfs_blktooff 4595 biosize =
min(vp->v_mount->mnt_stat.f_iosize, PAGE_SIZE);
bsd/nfs/nfs_vnops.c nfs_offtoblk 4613 biosize =
min(vp->v_mount->mnt_stat.f_iosize, PAGE_SIZE);
--Umesh
--
Umesh Vaishampayan
Mac OS X kernel group
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.