FYI larger size for NFS read and and write buffers are supported at V7R5 and above.
Original Message:
Sent: Fri December 19, 2025 03:23 AM
From: Falko Huetter
Subject: IBMi Performance Problems with NFS (Client)
Thanks a lot, the NFS client now works with TCP and is significantly faster.
------------------------------
Falko Huetter
Consultant
PROFI Engineering Systems AG
Darmstadt
0049 6151 82900
Original Message:
Sent: Thu December 18, 2025 03:18 PM
From: Roman Chloupek
Subject: IBMi Performance Problems with NFS (Client)
Hello Falco,
You might be in the same situation I was a few years back: facing inexplicably poor performance of NFS transfers.
After a long winded research, what ultimately made a night-and-day difference was forcing all NFS transfers to use TCP instead of UDP (which is how NFS protocol was originally designed). There were multiple reasons why NFS had subpar performance and reliability issues with UDP. Some lay within the NFS client implementation (UPD transfers use single connection/single thread while TCP ones do not have that restriction), while some others are outside of our control (i.e. poor UDP packet handling and reliability when they pass through managed switches and especially security appliances/routers as our packet captures revealed, while TCP transfers do generally get treated better).
Once switched to TCP, the business with NFS transfers became rock solid with zero issues and we pretty much use them now in "set it and forget it" fashion.
Here is an example of a CLP code I execute once upon every IPL to force any consequently issued ADDMFS commands to use TCP rather than UDP:
/* ========================================================================= *//* =========*/ subr ForceTCP /*======================================= *//* ========================================================================= */ /* Forcing TCP instead of UDP as the transport protocol */ /* At R730 and NFSV3 you can force NFS to use TCP instead of UDP but it will *//* be for all NFS traffic not just this one nfs mount command or one server. */ /* To utilize TCP as an NFS client, you will need to do the following: */ /* 0. Make sure the user profile executing the following commands is *//* enrolled in system directory. Verify with WRKDIRE command beforehand.*/ /* 1. Start the BIO daemon on the client */ STRNFSSVR SERVER(*BIO) /* 2. At each IPL prior to mounting the NFS paths: */ CALL PGM(QP0FPTOS) PARM(*NFSFORCE UDP OFF) endsubr
For your inspiration, here are ADDMFS parameters I use on all mount commands. Note that the 32768 size for both send and receive buffers is the maximum design value, and that is also what IBM Support recommended for optimum performance.
OPTIONS('RW,SUID,RETRY=5,RSIZE=32768,WSIZE=32768,TIMEO=20,RETRANS=5,ACREGMIN=30,ACREGMAX=60,ACDIRMIN=30,ACDIRMAX=60,SOFT') CCSID(*BINARY *ASCII)
Hope this helps,
Roman
------------------------------
Roman Chloupek
Original Message:
Sent: Wed December 17, 2025 10:23 AM
From: Falko Huetter
Subject: IBMi Performance Problems with NFS (Client)
Hi together,
I'm experiencing performance issues with the NFS client on IBM i with V7R4 TR11.
I want to use the following options in the mount command:
===> ADDMFS TYPE(*NFS) MFS('nfs-server:/') MNTOVRDIR('/nfs') OPTIONS('rsize=524288,wsize=524288')
I'm getting CPFA1BB back with the option keyword "rsize not within the range".
1. However, these options are not being accepted. What would be the correct values for rsize/wsize?
2. Can I force the client to use TCP instead of UDP?
3. Does anyone have a better idea how I can optimize NFS on my IBM i?
Thanks in advanced
Falko
------------------------------
Falko Huetter
Consultant
PROFI Engineering Systems AG
Darmstadt
0049 6151 82900
------------------------------