€•‰ÝŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ+/translations/zh_CN/filesystems/nfs/localio”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/zh_TW/filesystems/nfs/localio”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/it_IT/filesystems/nfs/localio”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/ja_JP/filesystems/nfs/localio”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/ko_KR/filesystems/nfs/localio”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/pt_BR/filesystems/nfs/localio”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/sp_SP/filesystems/nfs/localio”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ NFS LOCALIO”h]”hŒ NFS LOCALIO”…””}”(hh¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhh·h²hh³ŒE/var/lib/git/docbuild/linux/Documentation/filesystems/nfs/localio.rst”h´Kubh¶)”}”(hhh]”(h»)”}”(hŒOverview”h]”hŒOverview”…””}”(hhÎh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhhËh²hh³hÊh´KubhŒ paragraph”“”)”}”(hXKThe LOCALIO auxiliary RPC protocol allows the Linux NFS client and server to reliably handshake to determine if they are on the same host. Select "NFS client and server support for LOCALIO auxiliary protocol" in menuconfig to enable CONFIG_NFS_LOCALIO in the kernel config (both CONFIG_NFS_FS and CONFIG_NFSD must also be enabled).”h]”hXOThe LOCALIO auxiliary RPC protocol allows the Linux NFS client and server to reliably handshake to determine if they are on the same host. Select “NFS client and server support for LOCALIO auxiliary protocol†in menuconfig to enable CONFIG_NFS_LOCALIO in the kernel config (both CONFIG_NFS_FS and CONFIG_NFSD must also be enabled).”…””}”(hhÞh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KhhËh²hubhÝ)”}”(hŒÐOnce an NFS client and server handshake as "local", the client will bypass the network RPC protocol for read, write and commit operations. Due to this XDR and RPC bypass, these operations will operate faster.”h]”hŒÔOnce an NFS client and server handshake as “localâ€, the client will bypass the network RPC protocol for read, write and commit operations. Due to this XDR and RPC bypass, these operations will operate faster.”…””}”(hhìh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KhhËh²hubhÝ)”}”(hŒ¢The LOCALIO auxiliary protocol's implementation, which uses the same connection as NFS traffic, follows the pattern established by the NFS ACL protocol extension.”h]”hŒ¤The LOCALIO auxiliary protocol’s implementation, which uses the same connection as NFS traffic, follows the pattern established by the NFS ACL protocol extension.”…””}”(hhúh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KhhËh²hubhÝ)”}”(hXzThe LOCALIO auxiliary protocol is needed to allow robust discovery of clients local to their servers. In a private implementation that preceded use of this LOCALIO protocol, a fragile sockaddr network address based match against all local network interfaces was attempted. But unlike the LOCALIO protocol, the sockaddr-based matching didn't handle use of iptables or containers.”h]”hX|The LOCALIO auxiliary protocol is needed to allow robust discovery of clients local to their servers. In a private implementation that preceded use of this LOCALIO protocol, a fragile sockaddr network address based match against all local network interfaces was attempted. But unlike the LOCALIO protocol, the sockaddr-based matching didn’t handle use of iptables or containers.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KhhËh²hubhÝ)”}”(hXÝThe robust handshake between local client and server is just the beginning, the ultimate use case this locality makes possible is the client is able to open files and issue reads, writes and commits directly to the server without having to go over the network. The requirement is to perform these loopback NFS operations as efficiently as possible, this is particularly useful for container use cases (e.g. kubernetes) where it is possible to run an IO job local to the server.”h]”hXÝThe robust handshake between local client and server is just the beginning, the ultimate use case this locality makes possible is the client is able to open files and issue reads, writes and commits directly to the server without having to go over the network. The requirement is to perform these loopback NFS operations as efficiently as possible, this is particularly useful for container use cases (e.g. kubernetes) where it is possible to run an IO job local to the server.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KhhËh²hubhÝ)”}”(hŒ‰The performance advantage realized from LOCALIO's ability to bypass using XDR and RPC for reads, writes and commits can be extreme, e.g.:”h]”hŒ‹The performance advantage realized from LOCALIO’s ability to bypass using XDR and RPC for reads, writes and commits can be extreme, e.g.:”…””}”(hj$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K&hhËh²hubhŒdefinition_list”“”)”}”(hhh]”(hŒdefinition_list_item”“”)”}”(hXƒfio for 20 secs with directio, qd of 8, 16 libaio threads: - With LOCALIO: 4K read: IOPS=979k, BW=3825MiB/s (4011MB/s)(74.7GiB/20002msec) 4K write: IOPS=165k, BW=646MiB/s (678MB/s)(12.6GiB/20002msec) 128K read: IOPS=402k, BW=49.1GiB/s (52.7GB/s)(982GiB/20002msec) 128K write: IOPS=11.5k, BW=1433MiB/s (1503MB/s)(28.0GiB/20004msec) - Without LOCALIO: 4K read: IOPS=79.2k, BW=309MiB/s (324MB/s)(6188MiB/20003msec) 4K write: IOPS=59.8k, BW=234MiB/s (245MB/s)(4671MiB/20002msec) 128K read: IOPS=33.9k, BW=4234MiB/s (4440MB/s)(82.7GiB/20004msec) 128K write: IOPS=11.5k, BW=1434MiB/s (1504MB/s)(28.0GiB/20011msec) ”h]”(hŒterm”“”)”}”(hŒ:fio for 20 secs with directio, qd of 8, 16 libaio threads:”h]”hŒ:fio for 20 secs with directio, qd of 8, 16 libaio threads:”…””}”(hj?h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j=h³hÊh´K4hj9ubhŒ definition”“”)”}”(hhh]”hŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hXWith LOCALIO: 4K read: IOPS=979k, BW=3825MiB/s (4011MB/s)(74.7GiB/20002msec) 4K write: IOPS=165k, BW=646MiB/s (678MB/s)(12.6GiB/20002msec) 128K read: IOPS=402k, BW=49.1GiB/s (52.7GB/s)(982GiB/20002msec) 128K write: IOPS=11.5k, BW=1433MiB/s (1503MB/s)(28.0GiB/20004msec) ”h]”hÝ)”}”(hXWith LOCALIO: 4K read: IOPS=979k, BW=3825MiB/s (4011MB/s)(74.7GiB/20002msec) 4K write: IOPS=165k, BW=646MiB/s (678MB/s)(12.6GiB/20002msec) 128K read: IOPS=402k, BW=49.1GiB/s (52.7GB/s)(982GiB/20002msec) 128K write: IOPS=11.5k, BW=1433MiB/s (1503MB/s)(28.0GiB/20004msec)”h]”hXWith LOCALIO: 4K read: IOPS=979k, BW=3825MiB/s (4011MB/s)(74.7GiB/20002msec) 4K write: IOPS=165k, BW=646MiB/s (678MB/s)(12.6GiB/20002msec) 128K read: IOPS=402k, BW=49.1GiB/s (52.7GB/s)(982GiB/20002msec) 128K write: IOPS=11.5k, BW=1433MiB/s (1503MB/s)(28.0GiB/20004msec)”…””}”(hj]h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K*hjYubah}”(h]”h ]”h"]”h$]”h&]”uh1jWhjTubjX)”}”(hXWithout LOCALIO: 4K read: IOPS=79.2k, BW=309MiB/s (324MB/s)(6188MiB/20003msec) 4K write: IOPS=59.8k, BW=234MiB/s (245MB/s)(4671MiB/20002msec) 128K read: IOPS=33.9k, BW=4234MiB/s (4440MB/s)(82.7GiB/20004msec) 128K write: IOPS=11.5k, BW=1434MiB/s (1504MB/s)(28.0GiB/20011msec) ”h]”hÝ)”}”(hXWithout LOCALIO: 4K read: IOPS=79.2k, BW=309MiB/s (324MB/s)(6188MiB/20003msec) 4K write: IOPS=59.8k, BW=234MiB/s (245MB/s)(4671MiB/20002msec) 128K read: IOPS=33.9k, BW=4234MiB/s (4440MB/s)(82.7GiB/20004msec) 128K write: IOPS=11.5k, BW=1434MiB/s (1504MB/s)(28.0GiB/20011msec)”h]”hXWithout LOCALIO: 4K read: IOPS=79.2k, BW=309MiB/s (324MB/s)(6188MiB/20003msec) 4K write: IOPS=59.8k, BW=234MiB/s (245MB/s)(4671MiB/20002msec) 128K read: IOPS=33.9k, BW=4234MiB/s (4440MB/s)(82.7GiB/20004msec) 128K write: IOPS=11.5k, BW=1434MiB/s (1504MB/s)(28.0GiB/20011msec)”…””}”(hjuh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K0hjqubah}”(h]”h ]”h"]”h$]”h&]”uh1jWhjTubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1jRh³hÊh´K*hjOubah}”(h]”h ]”h"]”h$]”h&]”uh1jMhj9ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j7h³hÊh´K4hj4ubj8)”}”(hX‚fio for 20 secs with directio, qd of 8, 1 libaio thread: - With LOCALIO: 4K read: IOPS=230k, BW=898MiB/s (941MB/s)(17.5GiB/20001msec) 4K write: IOPS=22.6k, BW=88.3MiB/s (92.6MB/s)(1766MiB/20001msec) 128K read: IOPS=38.8k, BW=4855MiB/s (5091MB/s)(94.8GiB/20001msec) 128K write: IOPS=11.4k, BW=1428MiB/s (1497MB/s)(27.9GiB/20001msec) - Without LOCALIO: 4K read: IOPS=77.1k, BW=301MiB/s (316MB/s)(6022MiB/20001msec) 4K write: IOPS=32.8k, BW=128MiB/s (135MB/s)(2566MiB/20001msec) 128K read: IOPS=24.4k, BW=3050MiB/s (3198MB/s)(59.6GiB/20001msec) 128K write: IOPS=11.4k, BW=1430MiB/s (1500MB/s)(27.9GiB/20001msec) ”h]”(j>)”}”(hŒ8fio for 20 secs with directio, qd of 8, 1 libaio thread:”h]”hŒ8fio for 20 secs with directio, qd of 8, 1 libaio thread:”…””}”(hj¡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j=h³hÊh´KAhjubjN)”}”(hhh]”jS)”}”(hhh]”(jX)”}”(hXWith LOCALIO: 4K read: IOPS=230k, BW=898MiB/s (941MB/s)(17.5GiB/20001msec) 4K write: IOPS=22.6k, BW=88.3MiB/s (92.6MB/s)(1766MiB/20001msec) 128K read: IOPS=38.8k, BW=4855MiB/s (5091MB/s)(94.8GiB/20001msec) 128K write: IOPS=11.4k, BW=1428MiB/s (1497MB/s)(27.9GiB/20001msec) ”h]”hÝ)”}”(hXWith LOCALIO: 4K read: IOPS=230k, BW=898MiB/s (941MB/s)(17.5GiB/20001msec) 4K write: IOPS=22.6k, BW=88.3MiB/s (92.6MB/s)(1766MiB/20001msec) 128K read: IOPS=38.8k, BW=4855MiB/s (5091MB/s)(94.8GiB/20001msec) 128K write: IOPS=11.4k, BW=1428MiB/s (1497MB/s)(27.9GiB/20001msec)”h]”hXWith LOCALIO: 4K read: IOPS=230k, BW=898MiB/s (941MB/s)(17.5GiB/20001msec) 4K write: IOPS=22.6k, BW=88.3MiB/s (92.6MB/s)(1766MiB/20001msec) 128K read: IOPS=38.8k, BW=4855MiB/s (5091MB/s)(94.8GiB/20001msec) 128K write: IOPS=11.4k, BW=1428MiB/s (1497MB/s)(27.9GiB/20001msec)”…””}”(hj¹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K7hjµubah}”(h]”h ]”h"]”h$]”h&]”uh1jWhj²ubjX)”}”(hXWithout LOCALIO: 4K read: IOPS=77.1k, BW=301MiB/s (316MB/s)(6022MiB/20001msec) 4K write: IOPS=32.8k, BW=128MiB/s (135MB/s)(2566MiB/20001msec) 128K read: IOPS=24.4k, BW=3050MiB/s (3198MB/s)(59.6GiB/20001msec) 128K write: IOPS=11.4k, BW=1430MiB/s (1500MB/s)(27.9GiB/20001msec) ”h]”hÝ)”}”(hXWithout LOCALIO: 4K read: IOPS=77.1k, BW=301MiB/s (316MB/s)(6022MiB/20001msec) 4K write: IOPS=32.8k, BW=128MiB/s (135MB/s)(2566MiB/20001msec) 128K read: IOPS=24.4k, BW=3050MiB/s (3198MB/s)(59.6GiB/20001msec) 128K write: IOPS=11.4k, BW=1430MiB/s (1500MB/s)(27.9GiB/20001msec)”h]”hXWithout LOCALIO: 4K read: IOPS=77.1k, BW=301MiB/s (316MB/s)(6022MiB/20001msec) 4K write: IOPS=32.8k, BW=128MiB/s (135MB/s)(2566MiB/20001msec) 128K read: IOPS=24.4k, BW=3050MiB/s (3198MB/s)(59.6GiB/20001msec) 128K write: IOPS=11.4k, BW=1430MiB/s (1500MB/s)(27.9GiB/20001msec)”…””}”(hjÑh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K=hjÍubah}”(h]”h ]”h"]”h$]”h&]”uh1jWhj²ubeh}”(h]”h ]”h"]”h$]”h&]”jjuh1jRh³hÊh´K7hj¯ubah}”(h]”h ]”h"]”h$]”h&]”uh1jMhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j7h³hÊh´KAhj4h²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1j2hhËh²hh³Nh´Nubeh}”(h]”Œoverview”ah ]”h"]”Œoverview”ah$]”h&]”uh1hµhh·h²hh³hÊh´Kubh¶)”}”(hhh]”(h»)”}”(hŒFAQ”h]”hŒFAQ”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjh²hh³hÊh´KDubhŒenumerated_list”“”)”}”(hhh]”(jX)”}”(hX6What are the use cases for LOCALIO? a. Workloads where the NFS client and server are on the same host realize improved IO performance. In particular, it is common when running containerised workloads for jobs to find themselves running on the same host as the knfsd server being used for storage. ”h]”(hÝ)”}”(hŒ#What are the use cases for LOCALIO?”h]”hŒ#What are the use cases for LOCALIO?”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KFhjubj)”}”(hhh]”jX)”}”(hXWorkloads where the NFS client and server are on the same host realize improved IO performance. In particular, it is common when running containerised workloads for jobs to find themselves running on the same host as the knfsd server being used for storage. ”h]”hÝ)”}”(hXWorkloads where the NFS client and server are on the same host realize improved IO performance. In particular, it is common when running containerised workloads for jobs to find themselves running on the same host as the knfsd server being used for storage.”h]”hXWorkloads where the NFS client and server are on the same host realize improved IO performance. In particular, it is common when running containerised workloads for jobs to find themselves running on the same host as the knfsd server being used for storage.”…””}”(hj4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KHhj0ubah}”(h]”h ]”h"]”h$]”h&]”uh1jWhj-ubah}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œ loweralpha”Œprefix”hŒsuffix”Œ.”uh1jhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jWhjh²hh³Nh´NubjX)”}”(hXrWhat are the requirements for LOCALIO? a. Bypass use of the network RPC protocol as much as possible. This includes bypassing XDR and RPC for open, read, write and commit operations. b. Allow client and server to autonomously discover if they are running local to each other without making any assumptions about the local network topology. c. Support the use of containers by being compatible with relevant namespaces (e.g. network, user, mount). d. Support all versions of NFS. NFSv3 is of particular importance because it has wide enterprise usage and pNFS flexfiles makes use of it for the data path. ”h]”(hÝ)”}”(hŒ&What are the requirements for LOCALIO?”h]”hŒ&What are the requirements for LOCALIO?”…””}”(hj]h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KNhjYubj)”}”(hhh]”(jX)”}”(hŒŒBypass use of the network RPC protocol as much as possible. This includes bypassing XDR and RPC for open, read, write and commit operations.”h]”hÝ)”}”(hŒŒBypass use of the network RPC protocol as much as possible. This includes bypassing XDR and RPC for open, read, write and commit operations.”h]”hŒŒBypass use of the network RPC protocol as much as possible. This includes bypassing XDR and RPC for open, read, write and commit operations.”…””}”(hjrh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KPhjnubah}”(h]”h ]”h"]”h$]”h&]”uh1jWhjkubjX)”}”(hŒ™Allow client and server to autonomously discover if they are running local to each other without making any assumptions about the local network topology.”h]”hÝ)”}”(hŒ™Allow client and server to autonomously discover if they are running local to each other without making any assumptions about the local network topology.”h]”hŒ™Allow client and server to autonomously discover if they are running local to each other without making any assumptions about the local network topology.”…””}”(hjŠh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KShj†ubah}”(h]”h ]”h"]”h$]”h&]”uh1jWhjkubjX)”}”(hŒgSupport the use of containers by being compatible with relevant namespaces (e.g. network, user, mount).”h]”hÝ)”}”(hŒgSupport the use of containers by being compatible with relevant namespaces (e.g. network, user, mount).”h]”hŒgSupport the use of containers by being compatible with relevant namespaces (e.g. network, user, mount).”…””}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KVhjžubah}”(h]”h ]”h"]”h$]”h&]”uh1jWhjkubjX)”}”(hŒšSupport all versions of NFS. NFSv3 is of particular importance because it has wide enterprise usage and pNFS flexfiles makes use of it for the data path. ”h]”hÝ)”}”(hŒ™Support all versions of NFS. NFSv3 is of particular importance because it has wide enterprise usage and pNFS flexfiles makes use of it for the data path.”h]”hŒ™Support all versions of NFS. NFSv3 is of particular importance because it has wide enterprise usage and pNFS flexfiles makes use of it for the data path.”…””}”(hjºh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KXhj¶ubah}”(h]”h ]”h"]”h$]”h&]”uh1jWhjkubeh}”(h]”h ]”h"]”h$]”h&]”jNjOjPhjQjRuh1jhjYubeh}”(h]”h ]”h"]”h$]”h&]”uh1jWhjh²hh³Nh´NubjX)”}”(hX”Why doesn’t LOCALIO just compare IP addresses or hostnames when deciding if the NFS client and server are co-located on the same host? Since one of the main use cases is containerised workloads, we cannot assume that IP addresses will be shared between the client and server. This sets up a requirement for a handshake protocol that needs to go over the same connection as the NFS traffic in order to identify that the client and the server really are running on the same host. The handshake uses a secret that is sent over the wire, and can be verified by both parties by comparing with a value stored in shared kernel memory if they are truly co-located. ”h]”(hÝ)”}”(hŒˆWhy doesn’t LOCALIO just compare IP addresses or hostnames when deciding if the NFS client and server are co-located on the same host?”h]”hŒˆWhy doesn’t LOCALIO just compare IP addresses or hostnames when deciding if the NFS client and server are co-located on the same host?”…””}”(hjÞh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K\hjÚubhÝ)”}”(hX Since one of the main use cases is containerised workloads, we cannot assume that IP addresses will be shared between the client and server. This sets up a requirement for a handshake protocol that needs to go over the same connection as the NFS traffic in order to identify that the client and the server really are running on the same host. The handshake uses a secret that is sent over the wire, and can be verified by both parties by comparing with a value stored in shared kernel memory if they are truly co-located.”h]”hX Since one of the main use cases is containerised workloads, we cannot assume that IP addresses will be shared between the client and server. This sets up a requirement for a handshake protocol that needs to go over the same connection as the NFS traffic in order to identify that the client and the server really are running on the same host. The handshake uses a secret that is sent over the wire, and can be verified by both parties by comparing with a value stored in shared kernel memory if they are truly co-located.”…””}”(hjìh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K`hjÚubeh}”(h]”h ]”h"]”h$]”h&]”uh1jWhjh²hh³hÊh´NubjX)”}”(hX*Does LOCALIO improve pNFS flexfiles? Yes, LOCALIO complements pNFS flexfiles by allowing it to take advantage of NFS client and server locality. Policy that initiates client IO as closely to the server where the data is stored naturally benefits from the data path optimization LOCALIO provides. ”h]”(hÝ)”}”(hŒ$Does LOCALIO improve pNFS flexfiles?”h]”hŒ$Does LOCALIO improve pNFS flexfiles?”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KihjubhÝ)”}”(hXYes, LOCALIO complements pNFS flexfiles by allowing it to take advantage of NFS client and server locality. Policy that initiates client IO as closely to the server where the data is stored naturally benefits from the data path optimization LOCALIO provides.”h]”hXYes, LOCALIO complements pNFS flexfiles by allowing it to take advantage of NFS client and server locality. Policy that initiates client IO as closely to the server where the data is stored naturally benefits from the data path optimization LOCALIO provides.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kkhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jWhjh²hh³hÊh´NubjX)”}”(hXÅWhy not develop a new pNFS layout to enable LOCALIO? A new pNFS layout could be developed, but doing so would put the onus on the server to somehow discover that the client is co-located when deciding to hand out the layout. There is value in a simpler approach (as provided by LOCALIO) that allows the NFS client to negotiate and leverage locality without requiring more elaborate modeling and discovery of such locality in a more centralized manner. ”h]”(hÝ)”}”(hŒ4Why not develop a new pNFS layout to enable LOCALIO?”h]”hŒ4Why not develop a new pNFS layout to enable LOCALIO?”…””}”(hj*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kphj&ubhÝ)”}”(hXŽA new pNFS layout could be developed, but doing so would put the onus on the server to somehow discover that the client is co-located when deciding to hand out the layout. There is value in a simpler approach (as provided by LOCALIO) that allows the NFS client to negotiate and leverage locality without requiring more elaborate modeling and discovery of such locality in a more centralized manner.”h]”hXŽA new pNFS layout could be developed, but doing so would put the onus on the server to somehow discover that the client is co-located when deciding to hand out the layout. There is value in a simpler approach (as provided by LOCALIO) that allows the NFS client to negotiate and leverage locality without requiring more elaborate modeling and discovery of such locality in a more centralized manner.”…””}”(hj8h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Krhj&ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jWhjh²hh³hÊh´NubjX)”}”(hX„Why is having the client perform a server-side file OPEN, without using RPC, beneficial? Is the benefit pNFS specific? Avoiding the use of XDR and RPC for file opens is beneficial to performance regardless of whether pNFS is used. Especially when dealing with small files its best to avoid going over the wire whenever possible, otherwise it could reduce or even negate the benefits of avoiding the wire for doing the small file I/O itself. Given LOCALIO's requirements the current approach of having the client perform a server-side file open, without using RPC, is ideal. If in the future requirements change then we can adapt accordingly. ”h]”(hÝ)”}”(hŒwWhy is having the client perform a server-side file OPEN, without using RPC, beneficial? Is the benefit pNFS specific?”h]”hŒwWhy is having the client perform a server-side file OPEN, without using RPC, beneficial? Is the benefit pNFS specific?”…””}”(hjPh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KzhjLubhÝ)”}”(hX Avoiding the use of XDR and RPC for file opens is beneficial to performance regardless of whether pNFS is used. Especially when dealing with small files its best to avoid going over the wire whenever possible, otherwise it could reduce or even negate the benefits of avoiding the wire for doing the small file I/O itself. Given LOCALIO's requirements the current approach of having the client perform a server-side file open, without using RPC, is ideal. If in the future requirements change then we can adapt accordingly.”h]”hX Avoiding the use of XDR and RPC for file opens is beneficial to performance regardless of whether pNFS is used. Especially when dealing with small files its best to avoid going over the wire whenever possible, otherwise it could reduce or even negate the benefits of avoiding the wire for doing the small file I/O itself. Given LOCALIO’s requirements the current approach of having the client perform a server-side file open, without using RPC, is ideal. If in the future requirements change then we can adapt accordingly.”…””}”(hj^h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K}hjLubeh}”(h]”h ]”h"]”h$]”h&]”uh1jWhjh²hh³hÊh´NubjX)”}”(hX@Why is LOCALIO only supported with UNIX Authentication (AUTH_UNIX)? Strong authentication is usually tied to the connection itself. It works by establishing a context that is cached by the server, and that acts as the key for discovering the authorisation token, which can then be passed to rpc.mountd to complete the authentication process. On the other hand, in the case of AUTH_UNIX, the credential that was passed over the wire is used directly as the key in the upcall to rpc.mountd. This simplifies the authentication process, and so makes AUTH_UNIX easier to support. ”h]”(hÝ)”}”(hŒCWhy is LOCALIO only supported with UNIX Authentication (AUTH_UNIX)?”h]”hŒCWhy is LOCALIO only supported with UNIX Authentication (AUTH_UNIX)?”…””}”(hjvh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K†hjrubhÝ)”}”(hXúStrong authentication is usually tied to the connection itself. It works by establishing a context that is cached by the server, and that acts as the key for discovering the authorisation token, which can then be passed to rpc.mountd to complete the authentication process. On the other hand, in the case of AUTH_UNIX, the credential that was passed over the wire is used directly as the key in the upcall to rpc.mountd. This simplifies the authentication process, and so makes AUTH_UNIX easier to support.”h]”hXúStrong authentication is usually tied to the connection itself. It works by establishing a context that is cached by the server, and that acts as the key for discovering the authorisation token, which can then be passed to rpc.mountd to complete the authentication process. On the other hand, in the case of AUTH_UNIX, the credential that was passed over the wire is used directly as the key in the upcall to rpc.mountd. This simplifies the authentication process, and so makes AUTH_UNIX easier to support.”…””}”(hj„h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kˆhjrubeh}”(h]”h ]”h"]”h$]”h&]”uh1jWhjh²hh³hÊh´NubjX)”}”(hXZHow do export options that translate RPC user IDs behave for LOCALIO operations (eg. root_squash, all_squash)? Export options that translate user IDs are managed by nfsd_setuser() which is called by nfsd_setuser_and_check_port() which is called by __fh_verify(). So they get handled exactly the same way for LOCALIO as they do for non-LOCALIO. ”h]”(hÝ)”}”(hŒnHow do export options that translate RPC user IDs behave for LOCALIO operations (eg. root_squash, all_squash)?”h]”hŒnHow do export options that translate RPC user IDs behave for LOCALIO operations (eg. root_squash, all_squash)?”…””}”(hjœh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K‘hj˜ubhÝ)”}”(hŒéExport options that translate user IDs are managed by nfsd_setuser() which is called by nfsd_setuser_and_check_port() which is called by __fh_verify(). So they get handled exactly the same way for LOCALIO as they do for non-LOCALIO.”h]”hŒéExport options that translate user IDs are managed by nfsd_setuser() which is called by nfsd_setuser_and_check_port() which is called by __fh_verify(). So they get handled exactly the same way for LOCALIO as they do for non-LOCALIO.”…””}”(hjªh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K”hj˜ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jWhjh²hh³hÊh´NubjX)”}”(hŒ¾How does LOCALIO make certain that object lifetimes are managed properly given NFSD and NFS operate in different contexts? See the detailed "NFS Client and Server Interlock" section below. ”h]”(hÝ)”}”(hŒzHow does LOCALIO make certain that object lifetimes are managed properly given NFSD and NFS operate in different contexts?”h]”hŒzHow does LOCALIO make certain that object lifetimes are managed properly given NFSD and NFS operate in different contexts?”…””}”(hjÂh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K™hj¾ubhÝ)”}”(hŒASee the detailed "NFS Client and Server Interlock" section below.”h]”hŒESee the detailed “NFS Client and Server Interlock†section below.”…””}”(hjÐh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kœhj¾ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jWhjh²hh³hÊh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jNŒarabic”jPhjQjRuh1jhjh²hh³hÊh´KFubeh}”(h]”Œfaq”ah ]”h"]”Œfaq”ah$]”h&]”uh1hµhh·h²hh³hÊh´KDubh¶)”}”(hhh]”(h»)”}”(hŒRPC”h]”hŒRPC”…””}”(hjöh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjóh²hh³hÊh´KŸubhÝ)”}”(hXšThe LOCALIO auxiliary RPC protocol consists of a single "UUID_IS_LOCAL" RPC method that allows the Linux NFS client to verify the local Linux NFS server can see the nonce (single-use UUID) the client generated and made available in nfs_common. This protocol isn't part of an IETF standard, nor does it need to be considering it is Linux-to-Linux auxiliary RPC protocol that amounts to an implementation detail.”h]”hX The LOCALIO auxiliary RPC protocol consists of a single “UUID_IS_LOCAL†RPC method that allows the Linux NFS client to verify the local Linux NFS server can see the nonce (single-use UUID) the client generated and made available in nfs_common. This protocol isn’t part of an IETF standard, nor does it need to be considering it is Linux-to-Linux auxiliary RPC protocol that amounts to an implementation detail.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K¡hjóh²hubhÝ)”}”(hŒÛThe UUID_IS_LOCAL method encodes the client generated uuid_t in terms of the fixed UUID_SIZE (16 bytes). The fixed size opaque encode and decode XDR methods are used instead of the less efficient variable sized methods.”h]”hŒÛThe UUID_IS_LOCAL method encodes the client generated uuid_t in terms of the fixed UUID_SIZE (16 bytes). The fixed size opaque encode and decode XDR methods are used instead of the less efficient variable sized methods.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K¨hjóh²hubhÝ)”}”(hŒÂThe RPC program number for the NFS_LOCALIO_PROGRAM is 400122 (as assigned by IANA, see https://www.iana.org/assignments/rpc-program-numbers/ ): Linux Kernel Organization 400122 nfslocalio”h]”(hŒWThe RPC program number for the NFS_LOCALIO_PROGRAM is 400122 (as assigned by IANA, see ”…””}”(hj h²hh³Nh´NubhŒ reference”“”)”}”(hŒ5https://www.iana.org/assignments/rpc-program-numbers/”h]”hŒ5https://www.iana.org/assignments/rpc-program-numbers/”…””}”(hj*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”j,uh1j(hj ubhŒ6 ): Linux Kernel Organization 400122 nfslocalio”…””}”(hj h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K­hjóh²hubhÝ)”}”(hŒ/The LOCALIO protocol spec in rpcgen syntax is::”h]”hŒ.The LOCALIO protocol spec in rpcgen syntax is:”…””}”(hjCh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K±hjóh²hubhŒ literal_block”“”)”}”(hŒ÷/* raw RFC 9562 UUID */ #define UUID_SIZE 16 typedef u8 uuid_t; program NFS_LOCALIO_PROGRAM { version LOCALIO_V1 { void NULL(void) = 0; void UUID_IS_LOCAL(uuid_t) = 1; } = 1; } = 400122;”h]”hŒ÷/* raw RFC 9562 UUID */ #define UUID_SIZE 16 typedef u8 uuid_t; program NFS_LOCALIO_PROGRAM { version LOCALIO_V1 { void NULL(void) = 0; void UUID_IS_LOCAL(uuid_t) = 1; } = 1; } = 400122;”…””}”hjSsbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1jQh³hÊh´K³hjóh²hubhÝ)”}”(hŒkLOCALIO uses the same transport connection as NFS traffic. As such, LOCALIO is not registered with rpcbind.”h]”hŒkLOCALIO uses the same transport connection as NFS traffic. As such, LOCALIO is not registered with rpcbind.”…””}”(hjch²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KÁhjóh²hubeh}”(h]”Œrpc”ah ]”h"]”Œrpc”ah$]”h&]”uh1hµhh·h²hh³hÊh´KŸubh¶)”}”(hhh]”(h»)”}”(hŒ&NFS Common and Client/Server Handshake”h]”hŒ&NFS Common and Client/Server Handshake”…””}”(hj|h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjyh²hh³hÊh´KÅubhÝ)”}”(hXúfs/nfs_common/nfslocalio.c provides interfaces that enable an NFS client to generate a nonce (single-use UUID) and associated short-lived nfs_uuid_t struct, register it with nfs_common for subsequent lookup and verification by the NFS server and if matched the NFS server populates members in the nfs_uuid_t struct. The NFS client then uses nfs_common to transfer the nfs_uuid_t from its nfs_uuids to the nn->nfsd_serv clients_list from the nfs_common's uuids_list. See: fs/nfs/localio.c:nfs_local_probe()”h]”hXüfs/nfs_common/nfslocalio.c provides interfaces that enable an NFS client to generate a nonce (single-use UUID) and associated short-lived nfs_uuid_t struct, register it with nfs_common for subsequent lookup and verification by the NFS server and if matched the NFS server populates members in the nfs_uuid_t struct. The NFS client then uses nfs_common to transfer the nfs_uuid_t from its nfs_uuids to the nn->nfsd_serv clients_list from the nfs_common’s uuids_list. See: fs/nfs/localio.c:nfs_local_probe()”…””}”(hjŠh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KÇhjyh²hubhÝ)”}”(hXónfs_common's nfs_uuids list is the basis for LOCALIO enablement, as such it has members that point to nfsd memory for direct use by the client (e.g. 'net' is the server's network namespace, through it the client can access nn->nfsd_serv with proper rcu read access). It is this client and server synchronization that enables advanced usage and lifetime of objects to span from the host kernel's nfsd to per-container knfsd instances that are connected to nfs client's running on the same local host.”h]”hXÿnfs_common’s nfs_uuids list is the basis for LOCALIO enablement, as such it has members that point to nfsd memory for direct use by the client (e.g. ‘net’ is the server’s network namespace, through it the client can access nn->nfsd_serv with proper rcu read access). It is this client and server synchronization that enables advanced usage and lifetime of objects to span from the host kernel’s nfsd to per-container knfsd instances that are connected to nfs client’s running on the same local host.”…””}”(hj˜h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KÐhjyh²hubeh}”(h]”Œ&nfs-common-and-client-server-handshake”ah ]”h"]”Œ&nfs common and client/server handshake”ah$]”h&]”uh1hµhh·h²hh³hÊh´KÅubh¶)”}”(hhh]”(h»)”}”(hŒNFS Client and Server Interlock”h]”hŒNFS Client and Server Interlock”…””}”(hj±h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj®h²hh³hÊh´KÚubhÝ)”}”(hŒˆLOCALIO provides the nfs_uuid_t object and associated interfaces to allow proper network namespace (net-ns) and NFSD object refcounting.”h]”hŒˆLOCALIO provides the nfs_uuid_t object and associated interfaces to allow proper network namespace (net-ns) and NFSD object refcounting.”…””}”(hj¿h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KÜhj®h²hubhÝ)”}”(hŒùLOCALIO required the introduction and use of NFSD's percpu nfsd_net_ref to interlock nfsd_shutdown_net() and nfsd_open_local_fh(), to ensure each net-ns is not destroyed while in use by nfsd_open_local_fh(), and warrants a more detailed explanation:”h]”hŒûLOCALIO required the introduction and use of NFSD’s percpu nfsd_net_ref to interlock nfsd_shutdown_net() and nfsd_open_local_fh(), to ensure each net-ns is not destroyed while in use by nfsd_open_local_fh(), and warrants a more detailed explanation:”…””}”(hjÍh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kßhj®h²hubhŒ block_quote”“”)”}”(hXçnfsd_open_local_fh() uses nfsd_net_try_get() before opening its nfsd_file handle and then the caller (NFS client) must drop the reference for the nfsd_file and associated net-ns using nfsd_file_put_local() once it has completed its IO. This interlock working relies heavily on nfsd_open_local_fh() being afforded the ability to safely deal with the possibility that the NFSD's net-ns (and nfsd_net by association) may have been destroyed by nfsd_destroy_serv() via nfsd_shutdown_net(). ”h]”(hÝ)”}”(hŒënfsd_open_local_fh() uses nfsd_net_try_get() before opening its nfsd_file handle and then the caller (NFS client) must drop the reference for the nfsd_file and associated net-ns using nfsd_file_put_local() once it has completed its IO.”h]”hŒënfsd_open_local_fh() uses nfsd_net_try_get() before opening its nfsd_file handle and then the caller (NFS client) must drop the reference for the nfsd_file and associated net-ns using nfsd_file_put_local() once it has completed its IO.”…””}”(hjáh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KähjÝubhÝ)”}”(hŒùThis interlock working relies heavily on nfsd_open_local_fh() being afforded the ability to safely deal with the possibility that the NFSD's net-ns (and nfsd_net by association) may have been destroyed by nfsd_destroy_serv() via nfsd_shutdown_net().”h]”hŒûThis interlock working relies heavily on nfsd_open_local_fh() being afforded the ability to safely deal with the possibility that the NFSD’s net-ns (and nfsd_net by association) may have been destroyed by nfsd_destroy_serv() via nfsd_shutdown_net().”…””}”(hjïh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KéhjÝubeh}”(h]”h ]”h"]”h$]”h&]”uh1jÛh³hÊh´Kähj®h²hubhÝ)”}”(hX¶This interlock of the NFS client and server has been verified to fix an easy to hit crash that would occur if an NFSD instance running in a container, with a LOCALIO client mounted, is shutdown. Upon restart of the container and associated NFSD, the client would go on to crash due to NULL pointer dereference that occurred due to the LOCALIO client's attempting to nfsd_open_local_fh() without having a proper reference on NFSD's net-ns.”h]”hXºThis interlock of the NFS client and server has been verified to fix an easy to hit crash that would occur if an NFSD instance running in a container, with a LOCALIO client mounted, is shutdown. Upon restart of the container and associated NFSD, the client would go on to crash due to NULL pointer dereference that occurred due to the LOCALIO client’s attempting to nfsd_open_local_fh() without having a proper reference on NFSD’s net-ns.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kîhj®h²hubeh}”(h]”Œnfs-client-and-server-interlock”ah ]”h"]”Œnfs client and server interlock”ah$]”h&]”uh1hµhh·h²hh³hÊh´KÚubh¶)”}”(hhh]”(h»)”}”(hŒ&NFS Client issues IO instead of Server”h]”hŒ&NFS Client issues IO instead of Server”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjh²hh³hÊh´K÷ubhÝ)”}”(hŒÈBecause LOCALIO is focused on protocol bypass to achieve improved IO performance, alternatives to the traditional NFS wire protocol (SUNRPC with XDR) must be provided to access the backing filesystem.”h]”hŒÈBecause LOCALIO is focused on protocol bypass to achieve improved IO performance, alternatives to the traditional NFS wire protocol (SUNRPC with XDR) must be provided to access the backing filesystem.”…””}”(hj*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kùhjh²hubhÝ)”}”(hŒüSee fs/nfs/localio.c:nfs_local_open_fh() and fs/nfsd/localio.c:nfsd_open_local_fh() for the interface that makes focused use of select nfs server objects to allow a client local to a server to open a file pointer without needing to go over the network.”h]”hŒüSee fs/nfs/localio.c:nfs_local_open_fh() and fs/nfsd/localio.c:nfsd_open_local_fh() for the interface that makes focused use of select nfs server objects to allow a client local to a server to open a file pointer without needing to go over the network.”…””}”(hj8h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kýhjh²hubhÝ)”}”(hX^The client's fs/nfs/localio.c:nfs_local_open_fh() will call into the server's fs/nfsd/localio.c:nfsd_open_local_fh() and carefully access both the associated nfsd network namespace and nn->nfsd_serv in terms of RCU. If nfsd_open_local_fh() finds that the client no longer sees valid nfsd objects (be it struct net or nn->nfsd_serv) it returns -ENXIO to nfs_local_open_fh() and the client will try to reestablish the LOCALIO resources needed by calling nfs_local_probe() again. This recovery is needed if/when an nfsd instance running in a container were to reboot while a LOCALIO client is connected to it.”h]”hXbThe client’s fs/nfs/localio.c:nfs_local_open_fh() will call into the server’s fs/nfsd/localio.c:nfsd_open_local_fh() and carefully access both the associated nfsd network namespace and nn->nfsd_serv in terms of RCU. If nfsd_open_local_fh() finds that the client no longer sees valid nfsd objects (be it struct net or nn->nfsd_serv) it returns -ENXIO to nfs_local_open_fh() and the client will try to reestablish the LOCALIO resources needed by calling nfs_local_probe() again. This recovery is needed if/when an nfsd instance running in a container were to reboot while a LOCALIO client is connected to it.”…””}”(hjFh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Mhjh²hubhÝ)”}”(hX{Once the client has an open nfsd_file pointer it will issue reads, writes and commits directly to the underlying local filesystem (normally done by the nfs server). As such, for these operations, the NFS client is issuing IO to the underlying local filesystem that it is sharing with the NFS server. See: fs/nfs/localio.c:nfs_local_doio() and fs/nfs/localio.c:nfs_local_commit().”h]”hX{Once the client has an open nfsd_file pointer it will issue reads, writes and commits directly to the underlying local filesystem (normally done by the nfs server). As such, for these operations, the NFS client is issuing IO to the underlying local filesystem that it is sharing with the NFS server. See: fs/nfs/localio.c:nfs_local_doio() and fs/nfs/localio.c:nfs_local_commit().”…””}”(hjTh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´M hjh²hubhÝ)”}”(hXGWith normal NFS that makes use of RPC to issue IO to the server, if an application uses O_DIRECT the NFS client will bypass the pagecache but the NFS server will not. The NFS server's use of buffered IO affords applications to be less precise with their alignment when issuing IO to the NFS client. But if all applications properly align their IO, LOCALIO can be configured to use end-to-end O_DIRECT semantics from the NFS client to the underlying local filesystem, that it is sharing with the NFS server, by setting the 'localio_O_DIRECT_semantics' nfs module parameter to Y, e.g.:”h]”hXMWith normal NFS that makes use of RPC to issue IO to the server, if an application uses O_DIRECT the NFS client will bypass the pagecache but the NFS server will not. The NFS server’s use of buffered IO affords applications to be less precise with their alignment when issuing IO to the NFS client. But if all applications properly align their IO, LOCALIO can be configured to use end-to-end O_DIRECT semantics from the NFS client to the underlying local filesystem, that it is sharing with the NFS server, by setting the ‘localio_O_DIRECT_semantics’ nfs module parameter to Y, e.g.:”…””}”(hjbh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Mhjh²hubjÜ)”}”(hŒ?echo Y > /sys/module/nfs/parameters/localio_O_DIRECT_semantics ”h]”hÝ)”}”(hŒ>echo Y > /sys/module/nfs/parameters/localio_O_DIRECT_semantics”h]”hŒ>echo Y > /sys/module/nfs/parameters/localio_O_DIRECT_semantics”…””}”(hjth²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Mhjpubah}”(h]”h ]”h"]”h$]”h&]”uh1jÛh³hÊh´Mhjh²hubhÝ)”}”(hŒŸOnce enabled, it will cause LOCALIO to use end-to-end O_DIRECT semantics (but again, this may cause IO to fail if applications do not properly align their IO).”h]”hŒŸOnce enabled, it will cause LOCALIO to use end-to-end O_DIRECT semantics (but again, this may cause IO to fail if applications do not properly align their IO).”…””}”(hjˆh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Mhjh²hubeh}”(h]”Œ&nfs-client-issues-io-instead-of-server”ah ]”h"]”Œ&nfs client issues io instead of server”ah$]”h&]”uh1hµhh·h²hh³hÊh´K÷ubh¶)”}”(hhh]”(h»)”}”(hŒSecurity”h]”hŒSecurity”…””}”(hj¡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjžh²hh³hÊh´M$ubhÝ)”}”(hŒ[LOCALIO is only supported when UNIX-style authentication (AUTH_UNIX, aka AUTH_SYS) is used.”h]”hŒ[LOCALIO is only supported when UNIX-style authentication (AUTH_UNIX, aka AUTH_SYS) is used.”…””}”(hj¯h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´M&hjžh²hubhÝ)”}”(hX Care is taken to ensure the same NFS security mechanisms are used (authentication, etc) regardless of whether LOCALIO or regular NFS access is used. The auth_domain established as part of the traditional NFS client access to the NFS server is also used for LOCALIO.”h]”hX Care is taken to ensure the same NFS security mechanisms are used (authentication, etc) regardless of whether LOCALIO or regular NFS access is used. The auth_domain established as part of the traditional NFS client access to the NFS server is also used for LOCALIO.”…””}”(hj½h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´M)hjžh²hubhÝ)”}”(hX¢Relative to containers, LOCALIO gives the client access to the network namespace the server has. This is required to allow the client to access the server's per-namespace nfsd_net struct. With traditional NFS, the client is afforded this same level of access (albeit in terms of the NFS protocol via SUNRPC). No other namespaces (user, mount, etc) have been altered or purposely extended from the server to the client.”h]”hX¤Relative to containers, LOCALIO gives the client access to the network namespace the server has. This is required to allow the client to access the server’s per-namespace nfsd_net struct. With traditional NFS, the client is afforded this same level of access (albeit in terms of the NFS protocol via SUNRPC). No other namespaces (user, mount, etc) have been altered or purposely extended from the server to the client.”…””}”(hjËh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´M.hjžh²hubeh}”(h]”Œsecurity”ah ]”h"]”Œsecurity”ah$]”h&]”uh1hµhh·h²hh³hÊh´M$ubh¶)”}”(hhh]”(h»)”}”(hŒModule Parameters”h]”hŒModule Parameters”…””}”(hjäh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjáh²hh³hÊh´M6ubhÝ)”}”(hŒÀ/sys/module/nfs/parameters/localio_enabled (bool) controls if LOCALIO is enabled, defaults to Y. If client and server are local but 'localio_enabled' is set to N then LOCALIO will not be used.”h]”hŒÄ/sys/module/nfs/parameters/localio_enabled (bool) controls if LOCALIO is enabled, defaults to Y. If client and server are local but ‘localio_enabled’ is set to N then LOCALIO will not be used.”…””}”(hjòh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´M8hjáh²hubhÝ)”}”(hŒÛ/sys/module/nfs/parameters/localio_O_DIRECT_semantics (bool) controls if O_DIRECT extends down to the underlying filesystem, defaults to N. Application IO must be logical blocksize aligned, otherwise O_DIRECT will fail.”h]”hŒÛ/sys/module/nfs/parameters/localio_O_DIRECT_semantics (bool) controls if O_DIRECT extends down to the underlying filesystem, defaults to N. Application IO must be logical blocksize aligned, otherwise O_DIRECT will fail.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´M<hjáh²hubhÝ)”}”(hX7/sys/module/nfsv3/parameters/nfs3_localio_probe_throttle (uint) controls if NFSv3 read and write IOs will trigger (re)enabling of LOCALIO every N (nfs3_localio_probe_throttle) IOs, defaults to 0 (disabled). Must be power-of-2, admin keeps all the pieces if they misconfigure (too low a value or non-power-of-2).”h]”hX7/sys/module/nfsv3/parameters/nfs3_localio_probe_throttle (uint) controls if NFSv3 read and write IOs will trigger (re)enabling of LOCALIO every N (nfs3_localio_probe_throttle) IOs, defaults to 0 (disabled). Must be power-of-2, admin keeps all the pieces if they misconfigure (too low a value or non-power-of-2).”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´MAhjáh²hubeh}”(h]”Œmodule-parameters”ah ]”h"]”Œmodule parameters”ah$]”h&]”uh1hµhh·h²hh³hÊh´M6ubh¶)”}”(hhh]”(h»)”}”(hŒTesting”h]”hŒTesting”…””}”(hj'h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj$h²hh³hÊh´MHubhÝ)”}”(hŒŠThe LOCALIO auxiliary protocol and associated NFS LOCALIO read, write and commit access have proven stable against various test scenarios:”h]”hŒŠThe LOCALIO auxiliary protocol and associated NFS LOCALIO read, write and commit access have proven stable against various test scenarios:”…””}”(hj5h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´MJhj$h²hubjS)”}”(hhh]”(jX)”}”(hŒ)Client and server both on the same host. ”h]”hÝ)”}”(hŒ(Client and server both on the same host.”h]”hŒ(Client and server both on the same host.”…””}”(hjJh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´MMhjFubah}”(h]”h ]”h"]”h$]”h&]”uh1jWhjCh²hh³hÊh´NubjX)”}”(hŒfAll permutations of client and server support enablement for both local and remote client and server. ”h]”hÝ)”}”(hŒeAll permutations of client and server support enablement for both local and remote client and server.”h]”hŒeAll permutations of client and server support enablement for both local and remote client and server.”…””}”(hjbh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´MOhj^ubah}”(h]”h ]”h"]”h$]”h&]”uh1jWhjCh²hh³hÊh´NubjX)”}”(hŒaTesting against NFS storage products that don't support the LOCALIO protocol was also performed. ”h]”hÝ)”}”(hŒ`Testing against NFS storage products that don't support the LOCALIO protocol was also performed.”h]”hŒbTesting against NFS storage products that don’t support the LOCALIO protocol was also performed.”…””}”(hjzh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´MRhjvubah}”(h]”h ]”h"]”h$]”h&]”uh1jWhjCh²hh³hÊh´NubjX)”}”(hŒ»Client on host, server within a container (for both v3 and v4.2). The container testing was in terms of podman managed containers and includes successful container stop/restart scenario. ”h]”hÝ)”}”(hŒºClient on host, server within a container (for both v3 and v4.2). The container testing was in terms of podman managed containers and includes successful container stop/restart scenario.”h]”hŒºClient on host, server within a container (for both v3 and v4.2). The container testing was in terms of podman managed containers and includes successful container stop/restart scenario.”…””}”(hj’h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´MUhjŽubah}”(h]”h ]”h"]”h$]”h&]”uh1jWhjCh²hh³hÊh´NubjX)”}”(hX}Formalizing these test scenarios in terms of existing test infrastructure is on-going. Initial regular coverage is provided in terms of ktest running xfstests against a LOCALIO-enabled NFS loopback mount configuration, and includes lockdep and KASAN coverage, see: https://evilpiepirate.org/~testdashboard/ci?user=snitzer&branch=snitm-nfs-next https://github.com/koverstreet/ktest ”h]”hÝ)”}”(hX|Formalizing these test scenarios in terms of existing test infrastructure is on-going. Initial regular coverage is provided in terms of ktest running xfstests against a LOCALIO-enabled NFS loopback mount configuration, and includes lockdep and KASAN coverage, see: https://evilpiepirate.org/~testdashboard/ci?user=snitzer&branch=snitm-nfs-next https://github.com/koverstreet/ktest”h]”(hX Formalizing these test scenarios in terms of existing test infrastructure is on-going. Initial regular coverage is provided in terms of ktest running xfstests against a LOCALIO-enabled NFS loopback mount configuration, and includes lockdep and KASAN coverage, see: ”…””}”(hjªh²hh³Nh´Nubj))”}”(hŒNhttps://evilpiepirate.org/~testdashboard/ci?user=snitzer&branch=snitm-nfs-next”h]”hŒNhttps://evilpiepirate.org/~testdashboard/ci?user=snitzer&branch=snitm-nfs-next”…””}”(hj²h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”j´uh1j(hjªubhŒ ”…””}”(hjªh²hh³Nh´Nubj))”}”(hŒ$https://github.com/koverstreet/ktest”h]”hŒ$https://github.com/koverstreet/ktest”…””}”(hjÅh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jÇuh1j(hjªubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´MYhj¦ubah}”(h]”h ]”h"]”h$]”h&]”uh1jWhjCh²hh³hÊh´NubjX)”}”(hŒ±Various kdevops testing (in terms of "Chuck's BuildBot") has been performed to regularly verify the LOCALIO changes haven't caused any regressions to non-LOCALIO NFS use cases. ”h]”hÝ)”}”(hŒ°Various kdevops testing (in terms of "Chuck's BuildBot") has been performed to regularly verify the LOCALIO changes haven't caused any regressions to non-LOCALIO NFS use cases.”h]”hŒ¸Various kdevops testing (in terms of “Chuck’s BuildBotâ€) has been performed to regularly verify the LOCALIO changes haven’t caused any regressions to non-LOCALIO NFS use cases.”…””}”(hjäh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´M`hjàubah}”(h]”h ]”h"]”h$]”h&]”uh1jWhjCh²hh³hÊh´NubjX)”}”(hŒvAll of Hammerspace's various sanity tests pass with LOCALIO enabled (this includes numerous pNFS and flexfiles tests).”h]”hÝ)”}”(hŒvAll of Hammerspace's various sanity tests pass with LOCALIO enabled (this includes numerous pNFS and flexfiles tests).”h]”hŒxAll of Hammerspace’s various sanity tests pass with LOCALIO enabled (this includes numerous pNFS and flexfiles tests).”…””}”(hjüh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Mdhjøubah}”(h]”h ]”h"]”h$]”h&]”uh1jWhjCh²hh³hÊh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jjuh1jRh³hÊh´MMhj$h²hubeh}”(h]”Œtesting”ah ]”h"]”Œtesting”ah$]”h&]”uh1hµhh·h²hh³hÊh´MHubeh}”(h]”Œ nfs-localio”ah ]”h"]”Œ nfs localio”ah$]”h&]”uh1hµhhh²hh³hÊh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÊuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hºNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jIŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÊŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(j#j jjÿjðjíjvjsj«j¨jjj›j˜jÞjÛj!jjjuŒ nametypes”}”(j#‰j‰jð‰jv‰j«‰j‰j›‰jÞ‰j!‰j‰uh}”(j h·jÿhËjíjjsjój¨jyjj®j˜jjÛjžjjájj$uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.