From 17a48dca5f1000e36682edbcce1e562cd76d30f8 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Fri, 28 Jun 2019 11:52:41 +0200 Subject: [PATCH] Reduce sunrpc.tcp_max_slot_table_entries PR #93 did not work as expected. Further analysis showed, that the parallelism of page io (which includes buffered reads) is not limit by nfs.max_session_slots but by sunrpc.tcp_max_slot_table_entries. The default value is 65536 ( RPC_MAX_SLOT_TABLE_LIMIT ). This parameter can be modified for the running system via /proc/sys/sunrpc/tcp_max_slot_table_entries and is applied to new server connections. Experiment (on simsalabimbambasaladusaladim) : # preload server cache ssh mrtorgue cat /project/stresser/files/random_10G.dat \> /dev/null umount /project/stresser echo 3 > /proc/sys/vm/drop_caches time cat /project/stresser/files/random_10G.dat > /dev/null # result: 0m11.429s ca. 14 nfsd visible active in `top` on server echo 4 > /proc/sys/sunrpc/tcp_max_slot_table_entries umount /project/stresser echo 3 > /proc/sys/vm/drop_caches time cat /project/stresser/files/random_10G.dat > /dev/null # 0m12.546s , 4 nfsd visible active in `top` on server echo 65536 > /proc/sys/sunrpc/tcp_max_slot_table_entries umount /project/stresser echo 3 > /proc/sys/vm/drop_caches time cat /project/stresser/files/random_10G.dat > /dev/null # result: 0m11.937s , ca. 16 nfsd visible active in `top` on server Reduce sunrpc.tcp_max_slot_table_entries to 4 instead of nfs.max_session_slots --- misc_etc_files/modprobe.d/nfs_slotlimit.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc_etc_files/modprobe.d/nfs_slotlimit.conf b/misc_etc_files/modprobe.d/nfs_slotlimit.conf index 6201cc0..5b98630 100644 --- a/misc_etc_files/modprobe.d/nfs_slotlimit.conf +++ b/misc_etc_files/modprobe.d/nfs_slotlimit.conf @@ -1 +1 @@ -options nfs max_session_slots=4 +options sunrpc tcp_max_slot_table_entries=4