From: Frank Schlottmann-G. <fs...@us...> - 2001-03-16 14:53:25
|
Update of /cvsroot/firebird/interbase/utilities In directory usw-pr-cvs1:/tmp/cvs-serv21967/interbase/utilities Modified Files: guard.c ibmgr.c ibmgr.h ibmgrswi.h srvrmgr.c Removed Files: tcp_nd.h Log Message: Second attempt to enable TCP_NO_DELAY for superserver on linux fsg Index: guard.c =================================================================== RCS file: /cvsroot/firebird/interbase/utilities/guard.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** guard.c 2000/12/27 16:47:14 1.4 --- guard.c 2001/03/16 14:55:31 1.5 *************** *** 33,43 **** #include "../jrd/ib_stdio.h" #include <sys/types.h> - #include "../utilities/tcp_nd.h" - #ifdef SET_TCP_NODELAY - #include <sys/socket.h> - #include <netinet/in.h> - #include <netinet/tcp.h> - #endif --- 33,37 ---- *************** *** 68,74 **** TEXT **end, *p, c; USHORT option = FOREVER; /* holds FOREVER or ONETIME */ - #ifdef SET_TCP_NODELAY - USHORT no_nagle = FALSE; - #endif TEXT user_name[256]; /* holds the user name */ USHORT done = TRUE, fd_guard; --- 62,65 ---- *************** *** 98,106 **** option = IGNORE; break; - #ifdef SET_TCP_NODELAY - case 'N': - no_nagle=TRUE; - break; - #endif default : ib_fprintf (ib_stderr, "Usage: %s [-signore | -onetime | -forever (default)]\n", --- 89,92 ---- *************** *** 150,165 **** gds__log ("%s: guardian starting %s\n", prog_name, SUPER_SERVER_BINARY); - #ifdef SET_TCP_NODELAY - if (no_nagle) - { - int value = 1; - setsockopt(0, IPPROTO_TCP, TCP_NODELAY, (char *)&value,sizeof(int)); - setsockopt(1, IPPROTO_TCP, TCP_NODELAY, (char *)&value,sizeof(int)); - setsockopt(2, IPPROTO_TCP, TCP_NODELAY, (char *)&value,sizeof(int)); - gds__log ("%s: disabled Nagle algorithm for %s\n", prog_name, - server_args [1] ? server_args [1] : SUPER_SERVER_BINARY); - - } - #endif child_pid = UTIL_start_process (SUPER_SERVER_BINARY, server_args); if (child_pid == -1) --- 136,139 ---- Index: ibmgr.c =================================================================== RCS file: /cvsroot/firebird/interbase/utilities/ibmgr.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** ibmgr.c 2000/12/27 16:47:14 1.4 --- ibmgr.c 2001/03/16 14:55:31 1.5 *************** *** 35,39 **** #include "../jrd/license.h" #include "../utilities/srvrmgr_proto.h" - #include "../utilities/tcp_nd.h" --- 35,38 ---- *************** *** 163,169 **** ibmgr_data.reattach |= (REA_HOST | REA_USER | REA_PASSWORD); - #ifdef SET_TCP_NODELAY - ibmgr_data.nonagle = FALSE; - #endif --- 162,165 ---- *************** *** 434,440 **** case IN_SW_IBMGR_HELP: case IN_SW_IBMGR_Z: - #ifdef SET_TCP_NODELAY - case IN_SW_IBMGR_NONAGLE: - #endif SRVRMGR_msg_get (MSG_SWNOPAR, msg); ib_fprintf (OUTFILE, "%s\n", msg); --- 430,433 ---- *************** *** 721,731 **** break; - #ifdef SET_TCP_NODELAY - - case IN_SW_IBMGR_NONAGLE: - ibmgr_data->nonagle = TRUE; - - break; - #endif case IN_SW_IBMGR_0: SRVRMGR_msg_get (MSG_INVSW, msg); --- 714,717 ---- *************** *** 822,830 **** ib_fprintf (OUTFILE, "or ibmgr<RETURN>\n"); ib_fprintf (OUTFILE, " IBMGR> command [-option [parameter]]\n\n"); - #ifdef SET_TCP_NODELAY - ib_fprintf (OUTFILE, "Commands are: start [-once|-signore|-forever] [-nonagle] start server\n"); - #else - ib_fprintf (OUTFILE, "Commands are: start [-once|-signore|-forever] start server\n"); - #endif ib_fprintf (OUTFILE, " shut [-now] shutdown server\n"); ib_fprintf (OUTFILE, " show show host and user\n"); --- 808,811 ---- Index: ibmgr.h =================================================================== RCS file: /cvsroot/firebird/interbase/utilities/ibmgr.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** ibmgr.h 2000/12/27 16:47:14 1.4 --- ibmgr.h 2001/03/16 14:55:31 1.5 *************** *** 26,30 **** #define _UTILITIES_IBMGR_H_ - #include "../utilities/tcp_nd.h" #ifdef APOLLO --- 26,29 ---- *************** *** 106,112 **** TEXT password[32]; /* user's passwd */ BOOLEAN shutdown; /* shutdown is in progress */ - #ifdef SET_TCP_NODELAY - BOOLEAN nonagle; /*disable Nagle algorithm */ - #endif USHORT reattach; /* need to reattach because host, passwd or user has been changed */ --- 105,108 ---- Index: ibmgrswi.h =================================================================== RCS file: /cvsroot/firebird/interbase/utilities/ibmgrswi.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** ibmgrswi.h 2000/12/27 16:47:14 1.3 --- ibmgrswi.h 2001/03/16 14:55:31 1.4 *************** *** 27,31 **** #include "../jrd/common.h" - #include "../utilities/tcp_nd.h" /* Switch constants */ --- 27,30 ---- *************** *** 57,68 **** #define IN_SW_IBMGR_SIGNORE 19 /* start server, restart when it dies, even if it was a start up error */ - #ifdef SET_TCP_NODELAY - /* as some Linux users report that disabling Nagle algorithm will result in - better performance, I decided to add this option to ibmgr and ibguard - on Linux - FSG 26.Dez.2000 - */ - #define IN_SW_IBMGR_NONAGLE 20 /* disable Nagle algorithm */ - #endif #define IN_SW_IBMGR_AMBIG 99 /* ambiguous switch */ --- 56,59 ---- *************** *** 73,79 **** IN_SW_IBMGR_FOREVER, 0, "FOREVER", 0, 0, 0, FALSE, 0, 1, NULL, /* restart when server dies */ IN_SW_IBMGR_SIGNORE, 0, "SIGNORE", 0, 0, 0, FALSE, 0, 1, NULL, /* dito, ignore start up error */ - #ifdef SET_TCP_NODELAY - IN_SW_IBMGR_NONAGLE, 0, "NONAGLE", 0, 0, 0, FALSE, 0, 3, NULL, /* disable Nagle algorithm */ - #endif IN_SW_IBMGR_SHUT, 0, "SHUT", 0, 0, 0, FALSE, 0, 3, NULL, /* shutdown server */ IN_SW_IBMGR_NOW, 0, "NOW", 0, 0, 0, FALSE, 0, 3, NULL, /* immidiate shutdown */ --- 64,67 ---- Index: srvrmgr.c =================================================================== RCS file: /cvsroot/firebird/interbase/utilities/srvrmgr.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** srvrmgr.c 2000/12/27 16:47:14 1.3 --- srvrmgr.c 2001/03/16 14:55:31 1.4 *************** *** 31,35 **** #include <sys/types.h> #include <sys/wait.h> - #include "../utilities/tcp_nd.h" --- 31,34 ---- *************** *** 493,505 **** else argv[1] = "-f"; - - #ifdef SET_TCP_NODELAY - if (data->nonagle) - { - argv[2] = "-n"; /*tell ibguard to disable Nagle algorithm FSG 27.Dez.2000*/ - argv[3] = NULL; - } - else - #endif argv[2] = NULL; --- 492,495 ---- --- tcp_nd.h DELETED --- |