httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kraemer <Martin.Krae...@mch.sni.de>
Subject Re: [PATCH] Break everything
Date Fri, 24 Oct 1997 13:27:21 GMT
On Fri, Oct 24, 1997 at 12:48:48AM -0700, Dean Gaudet wrote:
> 
> All SVR4 systems have really similar headers, so NET_SIZE_T = size_t
> is probably correct for all of them.  Similarly they're supposed to
> have shmget().  Given that shmget() means better reliability let's
> try defining it for all of them.  (Martin, ISTR you saying that
> either shmget or mmap worked for you, I think shmget is more
> conservative given that it works on solaris and hpux too.)

First of all, no compile problems here after applying your patches.

> +     PORT: All SVR4 systems now use NET_SIZE_T = size_t, and

+1 for that.

> +	    use HAVE_SHMGET.

Some months ago, one of you (Jim? you?) said that when both MMAP and
SHMGET were available, then mmap() was the better choice. But I don't
recall the reasoning behind it.
Anyway: The shmget version runs just as good as the mmap version.

> @@ -419,7 +422,7 @@
>  	;;
>      *-sni-sysv4*)
>  	OS='SVR4'
> -	CFLAGS="$CFLAGS -DSVR4 -D_XPG_IV -DHAVE_MMAP"
> +	CFLAGS="$CFLAGS -DSVR4 -D_XPG_IV"
>  	DEF_WANTHSREGEX=yes
>  	LIBS="$LIBS -lsocket -lnsl -lc"
>  	;;
If it's true that mmap() is the better choice, I'd rather leave it in.
And, after looking at your misc/perf-tune.html document, I tried
USE_MMAP_FILES. Works perfectly, even on my 1992 i386-SVR4.0 (deejai).

So I'd even suggest
> +     CFLAGS="$CFLAGS -DSVR4 -D_XPG_IV -DUSE_MMAP_FILES"

but I cannot say if it works for all SVR4's out there. Anyone?

    Martin

PS: For you SVR4 users on this list: here's an edited sdiff of apache
serving one request. The right column shows the system calls for apache
with USE_MMAP_FILES defined. Where the left column shows a system call
and the right column is empty, using USE_MMAP_FILES saved a system call.

...many streams initializations deleted...
read(3, "GET /Welcome.shtml.de HTTP/1.0\r"..., 4096) = 32       read(3, "GET /Welcome.shtml.de
HTTP/1.0\r"..., 4096) = 32
sigaction(SIGUSR1, {SIG_IGN}, {SIG_IGN}) = 0                    sigaction(SIGUSR1, {SIG_IGN},
{SIG_IGN}) = 0
time()                                  = 877695777           | time()                   
              = ....
read(3, "\r\n", 4096)                   = 2			read(3, "\r\n", 4096)                   = 2
xstat(2, "/var/WWW/Web//Welcome.shtml.de", {st_mode=S_IFREG|0	xstat(2, "/var/WWW/Web//Welcome.shtml.de",
{st_mode=S_IFREG|0
open("/var/WWW/Web//Welcome.shtml.de", O_RDONLY) = 4		open("/var/WWW/Web//Welcome.shtml.de",
O_RDONLY) = 4
fstatvfs(0x4, 0x8045350, 0x8002e14c, 0x8085e9c, 0x8085e9c) =  <
ioctl(4, TCGETA, 0x8045322)             = -1 ENOTTY (Not a ty <
read(4, "<!DOCTYPE HTML PUBLIC \"-//W3C//"..., 8192) = 8192   | mmap(0, 8457, PROT_READ,
MAP_PRIVATE, 4, 0) = 0x8007c000
writev(3, [{"HTTP/1.1 200 OK\r\nDate: Fri, 24"..., 265}, {"<! | writev(3, [{"HTTP/1.1 200
OK\r\nDate: Fri, 24"..., 265}, {"<!
read(4, "Dokument!!\" -->\n  <H6>Diese Se"..., 8192) = 265    <
fxstat(2, 0, {st_mode=S_IFCHR|0622, st_rdev=makedev(12, 14),  <
read(4, "", 8192)                       = 0		      <
close(4)                                = 0			close(4)                                = 0
poll([{fd=3, events=POLLRDNORM}], 1, 0) = 0                   <
write(3, "Dokument!!\" -->\n  <H6>Diese Se"..., 265) = 265    <
time()                                  = 8776.....             time()                   
              = 877695778
write(20, "127.0.0.1 - - [24/Oct/1997:10:46"..., 85) = 85     | write(20, "127.0.0.1 - - [24/Oct/1997:12:22"...,
85) = 85
...
close(3)                                = 0			close(3)                                = 0
sigaction(SIGUSR1, {0x8001a198, [], 0}, {SIG_IGN}) = 0		sigaction(SIGUSR1, {0x8001a198, [],
0}, {SIG_IGN}) = 0
							      >	munmap(0x8007c000, 8457)                = 0
ioctl(23, I_FIND, "sockmod")            = -1 ENOTTY (Not a ty	ioctl(23, I_FIND, "sockmod")
           = -1 ENOTTY (Not a ty

-- 
| S I E M E N S |  <Martin.Kraemer@mch.sni.de>  |      Siemens Nixdorf
| ------------- |   Voice: +49-89-636-46021     |  Informationssysteme AG
| N I X D O R F |   FAX:   +49-89-636-44994     |   81730 Munich, Germany
~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request

Mime
View raw message