[PATCH 1/2] testparm: Add warning for socket options.
Andreas Schneider
asn at samba.org
Mon Oct 21 03:42:35 MDT 2013
Signed-off-by: Andreas Schneider <asn at samba.org>
---
source3/utils/testparm.c | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c
index a9793ab..598f589d 100644
--- a/source3/utils/testparm.c
+++ b/source3/utils/testparm.c
@@ -126,6 +126,29 @@ cannot be set in the smb.conf file. nmbd will abort with this setting.\n");
}
/*
+ * Socket options.
+ */
+ if (lp_socket_options()) {
+ fprintf(stderr,
+ "WARNING: socket options = %s\n"
+ "Modern server operating systems are tuned for\n"
+ "high network performance in the majority of situations;\n"
+ "when you set 'socket options' you are overriding those\n"
+ "settings.\n"
+ "Linux in particular has an auto-tuning mechanism for\n"
+ "buffer sizes that will be disabled if you specify a\n"
+ "socket buffer size. This can potentially cripple your\n"
+ "TCP/IP stack!!!\n\n"
+ "Getting the 'socket options' correct can make a big\n"
+ "difference to your performance, but getting them wrong\n"
+ "can degrade it by just as much. As with any other low\n"
+ "level setting, if you must make changes to it, make\n "
+ "small changes and test the effect before making any\n"
+ "large changes.\n\n",
+ lp_socket_options());
+ }
+
+ /*
* Password server sanity checks.
*/
@@ -438,7 +461,9 @@ rameter is ignored when using CUPS libraries.\n",
if (!section_name && !parameter_name) {
- fprintf(stderr,"Server role: %s\n", server_role_str(lp_server_role()));
+ fprintf(stderr,
+ "Server role: %s\n\n",
+ server_role_str(lp_server_role()));
}
if (!cname) {
--
1.8.4
More information about the samba-technical
mailing list