(Fwd) Re: Solaris HTTP server performance... (fwd)

Beth Frank (efrank@ncsa.uiuc.edu)
Tue, 19 Dec 1995 10:56:53 -0600 (CST)


At the Boston conf., I had a couple of requests for the
patch which significantly improved the TCP/IP performance
of the NCSA HTTPd on Solaris machines. It is included
below. It was submitted to us by Bob McGrath, the NCSA main
web site Webmaster, who had been working wih Sun.

- Beth Frank
efrank@ncsa.uiuc.edu

Forwarded message:
>
> --- Forwarded mail from Steve Parker <sparker@jurassic-248.eng.sun.com>
>
> To: "Robert McGrath" <mcgrath@ncsa.uiuc.edu>
> Cc: nordmark@jurassic-248.eng.sun.com
> Subject: Re: Solaris HTTP server performance...
> Date: Wed, 06 Sep 1995 17:27:30 -0700
> From: Steve Parker <sparker@jurassic-248.eng.sun.com>
>
>
> - I grabbed a fresh copy of the distribution this AM from:
> -
> - ftp://ftp.ncsa.uiuc.edu/Web/httpd/Unix/ncsa_httpd/httpd_1.4
> -
> - I made the following changes and then compiled as you see
> - below.
>
> So, as Erik pointed out we still see Nagle behavior in the set of
> changes you made, I made a corrected context diff. This sets the
> socket option on the accepted socket to suppress this.
>
> We think this will improve the performance you see...
>
> Thanks,
>
> ~sparker
>
> *** httpd.c.orig Wed Sep 6 17:11:30 1995
> --- httpd.c Wed Sep 6 17:19:36 1995
> ***************
> *** 32,37 ****
> --- 32,41 ----
> #include <sys/types.h>
> #include <sys/param.h>
> #include "new.h"
> + #include <sys/socket.h>
> + #include <netinet/in.h>
> + #include <netinet/tcp.h>
> + #include <arpa/inet.h>
>
>
> JMP_BUF jmpbuffer;
> ***************
> *** 306,311 ****
> --- 310,316 ----
> #ifndef NO_PASS
> void child_main(int parent_pipe, struct sockaddr_in *sa_server) {
> int x;
> + int one = 1;
>
> /* struct passwd* pwent; */
>
> ***************
> *** 564,569 ****
> --- 569,576 ----
> log_error("socket error: accept failed");
> }
> } else { /* connection accepted */
> + setsockopt(csd, IPPROTO_TCP, TCP_NODELAY, (void *)
> &one,
> + sizeof(one));
> #ifndef NO_PASS
> if (num_children) {
> /*free_child = 0;*/
>
>
> ---End of forwarded mail from Steve Parker
> <sparker@jurassic-248.eng.sun.com>
>
> --
> Robert E. McGrath
> National Center for Supercomputing Applications
> University of Illinois, Urbana-Champaign
> Champaign, Illinois 61820
> (217)-333-6549
>
> mcgrath@ncsa.uiuc.edu
>

-- 
		Elizabeth(Beth) Frank
		NCSA Server Development Team
		efrank@ncsa.uiuc.edu