Mailing List Archive

Minor A/UX patches [Jim Jagielski <jim@shado.jaguNET.com>] (fwd)
---------- Forwarded message ----------
From: Jim Jagielski <jim@shado.jaguNET.com>
Subject: Minor A/UX patches
To: new-httpd@hyperreal.com
Date: Mon, 7 Aug 1995 13:20:10 -0400 (EDT)

In the 0.8.8 release there a few minor A/UX-specific "errors" (although
that's too strong).

The first is that -lbsd is searched before lposix, which should not be the
case since we use the _POSIX_SOURCE define. Secondly, it's better to put
the _POSIX_SOURCE define in CFLAGS rather than in conf.h so that no matter
when or where conf.h is included, we are assured that POSIX mode is assumed.

Minor patch-file included below.

Finally, on some platforms, the use of fcntl or flock file-locking causes
a noticable performance hit when NFS is enabled (since fcntl locks
are handled via the NFS lock-daemon). Is this really required? If the log-file
that we lock is on the same host as httpd itself, then the use of fcntl
appears to be overkill. Maybe I'll just add another option and submit the
patches for that as well.


*** OConfiguration Mon Aug 7 12:13:41 1995
--- Configuration Mon Aug 7 12:17:54 1995
***************
*** 72,79 ****
# For Linux -m486 ONLY IF YOU HAVE 486 BINARY SUPPORT IN KERNEL
#AUX_CFLAGS= -DLINUX
# For A/UX
! #AUX_CFLAGS= -DAUX
! #EXTRA_LIBS= -lbsd -lposix -s
# For SCO ODT
# libcrypt_i available from sosco.sco.com, files /SLS/lng225b.Z and
# /SLS/lng225b.ltr.Z
--- 72,79 ----
# For Linux -m486 ONLY IF YOU HAVE 486 BINARY SUPPORT IN KERNEL
#AUX_CFLAGS= -DLINUX
# For A/UX
! #AUX_CFLAGS= -DAUX -D_POSIX_SOURCE
! #EXTRA_LIBS= -lposix -lbsd -s
# For SCO ODT
# libcrypt_i available from sosco.sco.com, files /SLS/lng225b.Z and
# /SLS/lng225b.ltr.Z
*** Oconf.h Mon Aug 7 12:12:18 1995
--- conf.h Mon Aug 7 12:13:07 1995
***************
*** 208,214 ****
#undef NO_KILLPG
#undef NO_SETSID
#define NEED_STRDUP
- #define _POSIX_SOURCE
#define JMP_BUF sigjmp_buf
#define FCNTL_SERIALIZED_ACCEPT

--- 208,213 ----

--
Jim Jagielski << jim@jaguNET.com >> | "Stwike him Centuwian, vewy woughwy!"
** jaguNET Access Services ** | - Pontius Piwate
++ Email: info@jaguNET.com +++ Voice: 410-931-3157 ++
++ http://www.jaguNET.com/ +++ Data: 931-7060 ("guest") ++
Re: Minor A/UX patches [Jim Jagielski <jim@shado.jaguNET.com>] (fwd) [ In reply to ]
---------- Forwarded message ----------
From: Jim Jagielski <jim@shado.jaguNET.com>
Subject: Re: Minor A/UX patches [Jim Jagielski <jim@shado.jaguNET.com>] (fwd)
To: new-httpd@hyperreal.com
Date: Mon, 7 Aug 1995 20:30:13 -0400 (EDT)

Robert S. Thau writes:
>
> FYI, Eric Hagberg (our other A/UX user) seems to have determined that
> FCNTL locking is not required at all on A/UX (he tested it at 10 hits/sec
> without the locking, and it didn't crash), so I've already removed it
> completely in my sandbox.
>

I've seen the same behavior. I've tested 0.8.8 both on jagubox and jaguNET
and noticed that:

1. FCNTL didn't appear to be needed
2. that using FCNTL caused a major performance hit
3. using FLOCK added no performance hit but still allowed
serialization if desired.

No matter what, FLOCK seems like a Good Idea and a worthwhile alternative.

PS: The conf.h file in 0.8.8 still has FCNTL_... in the section for A/UX
--
Jim Jagielski << jim@jaguNET.com >> | "Stwike him Centuwian, vewy woughwy!"
** jaguNET Access Services ** | - Pontius Piwate
++ Email: info@jaguNET.com +++ Voice: 410-931-3157 ++
++ http://www.jaguNET.com/ +++ Data: 931-7060 ("guest") ++
Re: Minor A/UX patches [Jim Jagielski <jim@shado.jaguNET.com>] (fwd) [ In reply to ]
> ---------- Forwarded message ----------
> From: Jim Jagielski <jim@shado.jaguNET.com>

> I've seen the same behavior. I've tested 0.8.8 both on jagubox and jaguNET
> and noticed that:
>
> 1. FCNTL didn't appear to be needed
> 2. that using FCNTL caused a major performance hit
> 3. using FLOCK added no performance hit but still allowed
> serialization if desired.
>
> No matter what, FLOCK seems like a Good Idea and a worthwhile alternative.

Actually, when I pounded our server using webmonkey, I saw about a 20%
faster average time when _not_ using FLOCK (ie, no locking on accept), so
though there might not be noticable load average clobbering going on, there
is a performance boost to be seen when not using any locking around accept.

Of course, now I've noticed that under A/UX, scripts which have data
"POST"ed to them under A/UX are broken totally... ugh. (Should've noticed
that a while back)

-ech

______________________________________________________
Eric Hagberg Phone: 212-746-6387
User Services Manager, CUMC/OAC Fax: 212-746-8161
Re: Minor A/UX patches [Jim Jagielski <jim@shado.jaguNET.com>] (fwd) [ In reply to ]
FYI, Eric Hagberg (our other A/UX user) seems to have determined that
FCNTL locking is not required at all on A/UX (he tested it at 10 hits/sec
without the locking, and it didn't crash), so I've already removed it
completely in my sandbox.

rst