cvs commit: apache-2.0/mpm/src/modules/mpm MPM.NAMING

1999-08-12 Thread manoj
manoj   99/08/12 11:47:12

  Modified:mpm/src/modules/mpm MPM.NAMING
  Log:
  Flesh out the descriptions of dexter and mpmt_pthread a bit.
  
  Revision  ChangesPath
  1.3   +5 -2  apache-2.0/mpm/src/modules/mpm/MPM.NAMING
  
  Index: MPM.NAMING
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/modules/mpm/MPM.NAMING,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -d -u -r1.2 -r1.3
  --- MPM.NAMING1999/08/12 08:20:07 1.2
  +++ MPM.NAMING1999/08/12 18:47:11 1.3
  @@ -24,8 +24,11 @@
   The following MPMs currently exist:
   
 prefork ... Multi  Process Model with Preforking (Apache 1.3)
  -  dexter  Multi  Process Model with Threading via Pthreads (v2)
  -  mpmt_pthread .. Multi  Process Model with Threading via Pthreads (v1 = 
Apache/pthread)
  +  dexter  Multi  Process Model with Threading via Pthreads
  +  Constant number of processes, variable number of threads
  +  mpmt_pthread .. Multi  Process Model with Threading via Pthreads
  +  Variable number of processes, constant number of
  +  threads/child (= Apache/pthread)
 spmt_os2 .. Single Process Model with Threading on OS/2
 winnt . Single Process Model with Threading on Windows NT
   
  
  
  


cvs commit: apache-1.3/src/main util_script.c

1999-08-12 Thread stoddard
stoddard99/08/12 11:34:16

  Modified:src/main util_script.c
  Log:
  Win32: Create the CGI script proces as DETACHED. Tested in WinNT and Win98. 
This MAY solve the problem observed by some Win95/98 users where they get CGI 
script output sent to the console.
  
  Revision  ChangesPath
  1.144 +1 -1  apache-1.3/src/main/util_script.c
  
  Index: util_script.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/util_script.c,v
  retrieving revision 1.143
  retrieving revision 1.144
  diff -u -r1.143 -r1.144
  --- util_script.c 1999/07/19 09:48:27 1.143
  +++ util_script.c 1999/08/12 18:34:15 1.144
  @@ -1019,7 +1019,7 @@
   i++;
   }
   
  -if (CreateProcess(NULL, pCommand, NULL, NULL, TRUE, 0, pEnvBlock,
  +if (CreateProcess(NULL, pCommand, NULL, NULL, TRUE, 
DETACHED_PROCESS, pEnvBlock,
 ap_make_dirstr_parent(r->pool, r->filename),
 &si, &pi)) {
   if (fileType == eFileTypeEXE16) {
  
  
  


cvs commit: apache-1.3/src CHANGES

1999-08-12 Thread dirkx
dirkx   99/08/12 11:10:02

  Modified:src  CHANGES
  Log:
  Changes
  
  Revision  ChangesPath
  1.1416+7 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /x3/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1415
  retrieving revision 1.1416
  diff -u -r1.1415 -r1.1416
  --- CHANGES   1999/08/09 17:46:24 1.1415
  +++ CHANGES   1999/08/12 18:09:58 1.1416
  @@ -1,5 +1,12 @@
   Changes with Apache 1.3.9
   
  + *) Roll back (re)naming in the uuencode/decode section. The ap/ap_
  +routines are now called ap_base64* and are 'plain'. I.e. no 
  +pool access or anything clever. Inside apache the routines 
  +acting like pstrdup are called ap_puuencode() and ap_uudecode().
  +The odly named ap_uuencode(), ap_uudecode() is kept around for
  +now but depricated.  [dirkx]
  +
   Changes with Apache 1.3.8
   
 *) Flush the output buffer immediately after sending an error or redirect
  
  
  


cvs commit: apache-1.3/src/support ab.c

1999-08-12 Thread dirkx
dirkx   99/08/12 11:06:30

  Modified:src/ap   ap_base64.c ap_sha1.c
   src/include ap.h httpd.h
   src/main util.c
   src/support ab.c
  Log:
  Resolution naming problems,
  
  Rename of
*uuXXcode -> base64
  
  rename of the old routines
  
ap_uuXXcode -> ap_puuXXcode
  
  to signal that they are 'pool'ing.
  
  Plus a wrapper to maintain the old name;
  
ap_uuencode
  
  which just calls ap_puuencode. Used a wrapper rather than
  a #define to faciliate linkers.
  
  Revision  ChangesPath
  1.3   +10 -10apache-1.3/src/ap/ap_base64.c
  
  Index: ap_base64.c
  ===
  RCS file: /x3/home/cvs/apache-1.3/src/ap/ap_base64.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ap_base64.c   1999/08/08 17:38:45 1.2
  +++ ap_base64.c   1999/08/12 18:06:17 1.3
  @@ -111,7 +111,7 @@
   #endif /*CHARSET_EBCDIC*/
   };
   
  -API_EXPORT(int) ap_uudecode_len(const char *bufcoded)
  +API_EXPORT(int) ap_base64decode_len(const char *bufcoded)
   {
   int nbytesdecoded;
   register const unsigned char *bufin;
  @@ -126,14 +126,14 @@
   return nbytesdecoded + 1;
   }
   
  -API_EXPORT(int) ap_uudecode(char *bufplain, const char *bufcoded)
  +API_EXPORT(int) ap_base64decode(char *bufplain, const char *bufcoded)
   {
   #ifdef CHARSET_EBCDIC
   int i;
   #endif   /* CHARSET_EBCDIC */
   int len;
   
  -len = ap_uudecode_binary((unsigned char *) bufplain, bufcoded);
  +len = ap_base64decode_binary((unsigned char *) bufplain, bufcoded);
   #ifdef CHARSET_EBCDIC
   for (i=0; i

cvs commit: apache-1.3/src/os/win32/installer/installdll install.c

1999-08-12 Thread randy
randy   99/08/12 09:22:35

  Modified:src/os/win32/installer/installdll install.c
  Log:
  Changes to migrate to InstallShield 5.5 and provide a bit more error
  checking.
  Changes to allow compiling on VS 6.0.
  
  Revision  ChangesPath
  1.5   +28 -29apache-1.3/src/os/win32/installer/installdll/install.c
  
  Index: install.c
  ===
  RCS file: /home/cvs/apache-1.3/src/os/win32/installer/installdll/install.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- install.c 1999/02/16 12:28:10 1.4
  +++ install.c 1999/08/12 16:22:34 1.5
  @@ -9,8 +9,7 @@
   
   #define VERSION ( "1.003 " __DATE__ " " __TIME__ )
   
  -#include 
  -#include 
  +#include 
   #include 
   #include 
   #include 
  @@ -23,20 +22,14 @@
   #undef strftime
   #endif
   
  +#define AP_WIN32ERROR 1
  +
   /* Global to store the instance handle */
   HINSTANCE hInstance = NULL;
   
   static char *szLogFilename = NULL;
   static FILE *fpLog = NULL;
   
  -void OpenLog(char *dir, char *fn)
  -{
  -szLogFilename = malloc(strlen(dir) + 1 + strlen(fn) + 1);
  -sprintf(szLogFilename, "%s/%s", dir, fn);
  -
  -fpLog = fopen(szLogFilename, "a+");
  -}
  -
   void LogMessage(char *fmt, ...)
   {
   char buf[4000];
  @@ -70,13 +63,6 @@
   fprintf(fpLog, "%s\n", buf);
   }
   
  -void CloseLog(void)
  -{
  -if (fpLog) {
  - fclose(fpLog);
  -}
  -}
  -
   /*
* MessageBox_error() is a helper function to display an error in a 
* message box, optionally including a Win32 error message. If
  @@ -87,8 +73,6 @@
* passed on to the Win32 MessageBox() call.
*/
   
  -#define AP_WIN32ERROR 1
  -
   int MessageBox_error(HWND hWnd, int opt, char *title, 
 int mb_opt, char *fmt, ...)
   {
  @@ -162,6 +146,29 @@
   return MessageBox(hWnd, buf, title, mb_opt);
   }
   
  +int OpenLog(HWND hwnd, char *dir, char *fn)
  +{
  +szLogFilename = malloc(strlen(dir) + 1 + strlen(fn) + 1);
  +sprintf(szLogFilename, "%s\\%s", dir, fn);
  +
  +if ((fpLog = fopen(szLogFilename, "a+")) == NULL) {
  + MessageBox_error(hwnd, 
  +  AP_WIN32ERROR,
  +  "Installation Problem",
  +  MB_OK | MB_ICONSTOP,
  +  "Cannot open log file %s", szLogFilename);
  + return -1;
  +}
  +return 0;
  +}
  +
  +void CloseLog(void)
  +{
  +if (fpLog) {
  + fclose(fpLog);
  +}
  +}
  +
   /*
* The next few functions handle expanding the @@ServerRoot@@ type
* sequences found in the distribution files. The main entry point
  @@ -558,14 +565,6 @@
   { CMD_COPY, ".tmp\\highperformance.conf-dist", 
"conf\\highperformance.conf-dist", 
OPT_EXPAND|OPT_OVERWRITE|OPT_DELETESOURCE },
   
  -/* Move the default htdocs files into place, provided they don't already
  - * exist.
  - */
  -{ CMD_COPY, ".tmp\\index.html", "htdocs\\index.html", 
OPT_DELETESOURCE|OPT_SILENT },
  -{ CMD_RM, ".tmp\\index.html", NULL, OPT_SILENT },
  -{ CMD_COPY, ".tmp\\apache_pb.gif", "htdocs\\apache_pb.gif", 
OPT_DELETESOURCE|OPT_SILENT },
  -{ CMD_RM, ".tmp\\apache_pb.gif", NULL, OPT_SILENT },
  -
   { CMD_RMDIR, ".tmp", NULL },
   
   { CMD_END, NULL, NULL, OPT_NONE }
  @@ -583,7 +582,7 @@
   ACTIONITEM *pactionItem;
   int end = 0;
   
  -OpenLog(szInst, "install.log");
  +OpenLog(hwnd, szInst, "install.log");
   LogMessage("STARTED %s", VERSION);
   LogMessage("src=%s support=%s inst=%s",
szSrcDir, szSupport, szInst);
  @@ -593,7 +592,7 @@
   pactionItem = actionTable;
   while (!end) {
   
  - LogMessage("command=%d in=%s out=%s options=%d",
  + LogMessage("command=%d 1in=%s out=%s options=%d",
   pactionItem->command,
   pactionItem->in ? pactionItem->in : "NULL",
   pactionItem->out ? pactionItem->out : "NULL",
  
  
  


cvs commit: apache-1.3/src/support htpasswd.c

1999-08-12 Thread coar
coar99/08/12 07:15:23

  Modified:src/support htpasswd.c
  Log:
'Force NO encryption' alongside 'Force SHA' made it sound like
NO was another algorithm.
  
  Revision  ChangesPath
  1.35  +1 -1  apache-1.3/src/support/htpasswd.c
  
  Index: htpasswd.c
  ===
  RCS file: /home/cvs/apache-1.3/src/support/htpasswd.c,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- htpasswd.c1999/08/12 12:10:38 1.34
  +++ htpasswd.c1999/08/12 14:15:22 1.35
  @@ -245,7 +245,7 @@
" (default)"
   #endif
".\n");
  -fprintf(stderr, " -p  Force NO encryption of the password.\n");
  +fprintf(stderr, " -p  Do not encrypt the password (plaintext).\n");
   fprintf(stderr, " -s  Force SHA encryption of the password.\n");
   fprintf(stderr, " -b  Use the password from the command line rather "
"than prompting for it.\n");
  
  
  


cvs commit: apache-2.0/mpm/conf httpd.conf-dist

1999-08-12 Thread rse
rse 99/08/12 06:53:49

  Modified:mpm/conf httpd.conf-dist
  Log:
  Add a little bit of info for the MPM directives, because
  dexters directives are confusing.
  
  My proposal for Manoj:
  
  NumServers  => StartServers
  MaxThreadsPerChild  => MaxThreadsPerServer or just MaxThreads
  MaxRequestsPerChild => MaxRequestsPerThread
  
  Revision  ChangesPath
  1.5   +13 -2 apache-2.0/mpm/conf/httpd.conf-dist
  
  Index: httpd.conf-dist
  ===
  RCS file: /home/cvs/apache-2.0/mpm/conf/httpd.conf-dist,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- httpd.conf-dist   1999/08/12 11:39:16 1.4
  +++ httpd.conf-dist   1999/08/12 13:53:48 1.5
  @@ -128,21 +128,32 @@
   # 
   
   # prefork MPM
  +# StartServers . number of server processes to start
  +# MinSpareServers .. minimum number of server processes which are kept 
spare
  +# MaxSpareServers .. maximum number of server processes which are kept 
spare
  +# MaxClients ... maximum number of server processes allowed to start
  +# MaxRequestsPerChild .. maximum number of requests a server process serves
   
   StartServers 5
   MinSpareServers  5
   MaxSpareServers 10
  -MaxClients   8 
  +MaxClients  20
   MaxRequestsPerChild  0
   
   
   # dexter MPM
  +# NumServers ... number of server processes to start
  +# StartThreads . number of worker threads to start in each server 
process
  +# MinSpareThreads .. minimum number of worker threads which are kept 
spare
  +# MaxSpareThreads .. maximum number of worker threads which are kept 
spare
  +# MaxThreadsPerChild ... maximum number of worker threads allowed to start
  +# MaxRequestsPerChild .. maximum number of requests a worker thread serves
   
   NumServers   5
   StartThreads 5
   MinSpareThreads  5
   MaxSpareThreads 10
  -MaxThreadsPerChild   8
  +MaxThreadsPerChild  20
   MaxRequestsPerChild  0
   
   
  
  
  


cvs commit: apache-1.3 configure

1999-08-12 Thread martin
martin  99/08/12 06:39:34

  Modified:.configure
  Log:
  Undo last change. People will have to make sure
  that the same $DBM_LIB is in effect  as was during the original
  configure invocation when executing config.status
  
  Revision  ChangesPath
  1.99  +1 -1  apache-1.3/configure
  
  Index: configure
  ===
  RCS file: /home/cvs/apache-1.3/configure,v
  retrieving revision 1.98
  retrieving revision 1.99
  diff -u -r1.98 -r1.99
  --- configure 1999/08/10 14:55:20 1.98
  +++ configure 1999/08/12 13:39:33 1.99
  @@ -968,7 +968,7 @@
   echo "##" >>$configstatus
   echo "" >>$configstatus
   for var in CC CPP OPTIM CFLAGS CFLAGS_SHLIB LDFLAGS LD_SHLIB LDFLAGS_SHLIB \
  -   LDFLAGS_SHLIB_EXPORT LIBS DBM_LIB INCLUDES RANLIB DEPS TARGET; do
  +   LDFLAGS_SHLIB_EXPORT LIBS INCLUDES RANLIB DEPS TARGET; do
   eval "val=\"\$$var\""
   if [ "x$val" != "x" ]; then
   echo "$var=$val" |\
  
  
  


Re: cvs commit: apache-2.0/mpm README.rse

1999-08-12 Thread Ryan Bloom

Not to sound pushy or anything, but any chance you'll run the same test
for either apache-apr or the pthread-mpm.  They are basically the same
code, so there is really no need to run the test on both servers.  I would
be interested to see if the static number of processes/ dynamic threads 
is really a big win though.

Ryan

On 12 Aug 1999 [EMAIL PROTECTED] wrote:

> rse 99/08/12 06:25:26
> 
>   Modified:mpm  README.rse
>   Log:
>   Give more details
>   
>   Revision  ChangesPath
>   1.5   +3 -2  apache-2.0/mpm/README.rse
>   
>   Index: README.rse
>   ===
>   RCS file: /home/cvs/apache-2.0/mpm/README.rse,v
>   retrieving revision 1.4
>   retrieving revision 1.5
>   diff -u -r1.4 -r1.5
>   --- README.rse  1999/08/12 12:09:29 1.4
>   +++ README.rse  1999/08/12 13:25:26 1.5
>   @@ -98,8 +98,9 @@
> $ make 
> $ make install
>
>   -  Some quick tests with the dexter MPM and both GNU Pth and FreeBSD uthread
>   -  showed the not too bad results with ApacheBench under the following 
> config:
>   +  Some quick tests with the dexter MPM and both GNU Pth and FreeBSD 
> uthread on
>   +  a PII/400 under FreeBSD 3.1 showed the not too bad results with 
> ApacheBench
>   +  under the following config:
>
>  NumServers   1
>  StartThreads32
>   
>   
>   
> 

___
Ryan Bloom  [EMAIL PROTECTED]
4205 S Miami Blvd   
RTP, NC 27709   It's a beautiful sight to see good dancers 
doing simple steps.  It's a painful sight to
see beginners doing complicated patterns.   



cvs commit: apache-2.0/mpm README.rse

1999-08-12 Thread rse
rse 99/08/12 06:25:26

  Modified:mpm  README.rse
  Log:
  Give more details
  
  Revision  ChangesPath
  1.5   +3 -2  apache-2.0/mpm/README.rse
  
  Index: README.rse
  ===
  RCS file: /home/cvs/apache-2.0/mpm/README.rse,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- README.rse1999/08/12 12:09:29 1.4
  +++ README.rse1999/08/12 13:25:26 1.5
  @@ -98,8 +98,9 @@
$ make 
$ make install
   
  -  Some quick tests with the dexter MPM and both GNU Pth and FreeBSD uthread
  -  showed the not too bad results with ApacheBench under the following config:
  +  Some quick tests with the dexter MPM and both GNU Pth and FreeBSD uthread 
on
  +  a PII/400 under FreeBSD 3.1 showed the not too bad results with ApacheBench
  +  under the following config:
   
 NumServers   1
 StartThreads32
  
  
  


cvs commit: apache-1.3/src/support htpasswd.c

1999-08-12 Thread coar
coar99/08/12 05:10:39

  Modified:src/support htpasswd.c
  Log:
Fix a typo and some line-wraps.  (All cosmetic.)
  
  Revision  ChangesPath
  1.34  +8 -6  apache-1.3/src/support/htpasswd.c
  
  Index: htpasswd.c
  ===
  RCS file: /home/cvs/apache-1.3/src/support/htpasswd.c,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- htpasswd.c1999/08/07 20:34:14 1.33
  +++ htpasswd.c1999/08/12 12:10:38 1.34
  @@ -242,15 +242,17 @@
".\n");
   fprintf(stderr, " -d  Force CRYPT encryption of the password"
   #if (!(defined(WIN32) || defined(TPF)))
  - " (default)"
  + " (default)"
   #endif
  - ".\n");
  + ".\n");
   fprintf(stderr, " -p  Force NO encryption of the password.\n");
   fprintf(stderr, " -s  Force SHA encryption of the password.\n");
  -fprintf(stderr, " -b  Use the password from the command line rather ");
  -fprintf(stderr, "than prompting for it.\n");
  -fprintf(stderr, "On Windows and TPF systems the '-m' flag is used by 
default.\n");
  -fprintf(stderr, "On all other systems, the '-p' will propably not 
work.\n");
  +fprintf(stderr, " -b  Use the password from the command line rather "
  + "than prompting for it.\n");
  +fprintf(stderr,
  + "On Windows and TPF systems the '-m' flag is used by default.\n");
  +fprintf(stderr,
  + "On all other systems, the '-p' flag will probably not work.\n");
   return ERR_SYNTAX;
   }
   
  
  
  


cvs commit: apache-2.0/mpm/conf httpd.conf-dist

1999-08-12 Thread Ralf S. Engelschall
rse 99/08/12 13:35:41

  Modified:mpm/conf httpd.conf-dist
  Log:
  Ops, Scoreboard twice?
  
  Revision  ChangesPath
  1.4   +0 -4  apache-2.0/mpm/conf/httpd.conf-dist
  
  Index: httpd.conf-dist
  ===
  RCS file: /e/apache/REPOS/apache-2.0/mpm/conf/httpd.conf-dist,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -u -r1.3 -r1.4
  --- httpd.conf-dist   1999/08/12 08:59:11 1.3
  +++ httpd.conf-dist   1999/08/12 11:35:41 1.4
  @@ -123,10 +123,6 @@
   #
   KeepAliveTimeout 15
   
  -
  -ScoreBoardFile logs/apache_runtime_status
  -
  -
   #
   # Server-pool size regulation
   # 
  
  
  


cvs commit: apache-2.0/mpm README.rse

1999-08-12 Thread rse
rse 99/08/12 05:09:30

  Modified:mpm  README.rse
  Log:
  Ops, the config is important, too.
  
  Revision  ChangesPath
  1.4   +12 -1 apache-2.0/mpm/README.rse
  
  Index: README.rse
  ===
  RCS file: /home/cvs/apache-2.0/mpm/README.rse,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- README.rse1999/08/12 12:07:06 1.3
  +++ README.rse1999/08/12 12:09:29 1.4
  @@ -99,7 +99,18 @@
$ make install
   
 Some quick tests with the dexter MPM and both GNU Pth and FreeBSD uthread
  -  showed the following not too bad results with ApacheBench:
  +  showed the not too bad results with ApacheBench under the following config:
  +
  +  NumServers   1
  +  StartThreads32
  +  MinSpareThreads 32
  +  MaxSpareThreads 32
  +  MaxThreadsPerChild  32
  +  MaxRequestsPerChild  0
  +
  +  With more processes the results are not such good. Then both user space
  +  threading libs get only up to 400-500 req/sec. The reason seem to be the
  +  unserialized acccept problem.
   
 o  FooBar/OS + Ralf S. Engelschall's GNU Pth + dexter MPM
   
  
  
  


cvs commit: apache-2.0/mpm README.rse

1999-08-12 Thread rse
rse 99/08/12 05:07:07

  Modified:mpm  README.rse
  Log:
  A little bit of benchmarking for dexter
  
  Revision  ChangesPath
  1.3   +77 -0 apache-2.0/mpm/README.rse
  
  Index: README.rse
  ===
  RCS file: /home/cvs/apache-2.0/mpm/README.rse,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- README.rse1999/08/12 11:25:17 1.2
  +++ README.rse1999/08/12 12:07:06 1.3
  @@ -98,3 +98,80 @@
$ make 
$ make install
   
  +  Some quick tests with the dexter MPM and both GNU Pth and FreeBSD uthread
  +  showed the following not too bad results with ApacheBench:
  +
  +  o  FooBar/OS + Ralf S. Engelschall's GNU Pth + dexter MPM
  +
  + - ``ps'' after startup
  + 69294 1 rse 0.0  1516 1008  288 Ss   src/apache
  + 69295 69294 rse 0.0  3604 1532  288 Ssrc/apache
  +
  + - $ ab -n 5000 -c 10 en1:8080/index.html
  + This is ApacheBench, Version 1.3
  + Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, 
http://www.zeustech.net/
  + Copyright (c) 1998-1999 The Apache Group, http://www.apache.org/
  + 
  + Server Software:Apache/mpm-dev  
   
  + Server Hostname:en1
  + Server Port:8080
  + 
  + Document Path:  /index.html
  + Document Length:114 bytes
  + 
  + Concurrency Level:  10
  + Time taken for tests:   4.552 seconds
  + Complete requests:  5000
  + Failed requests:0
  + Total transferred:  1765000 bytes
  + HTML transferred:   57 bytes
  + Requests per second:1098.42
  + Transfer rate:  387.74 kb/s received
  + 
  + Connnection Times (ms)
  +   min   avg   max
  + Connect:0 0 5
  + Processing: 2 8   963
  + Total:  2 8   968
  + 
  + - ``ps'' after benchmark
  + 69294 1 rse 0.0  1516 1008  288 Ss   src/apache
  + 69295 69294 rse 7.8  3708 1692  288 Ssrc/apache
  +  
  +  o  FreeBSD 3.1 + John Birrell's uthread + dexter MPM
  +
  + - ``ps'' after startup
  + 73364 1 rse 0.0  1472  960  264 Ss   src/apache
  + 73365 73364 rse 0.0  4360 1332  264 Ssrc/apache
  +
  + - $ ab -n 5000 -c 10 en1:8080/index.html
  + This is ApacheBench, Version 1.3
  + Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, 
http://www.zeustech.net/
  + Copyright (c) 1998-1999 The Apache Group, http://www.apache.org/
  + 
  + Server Software:Apache/mpm-dev  
   
  + Server Hostname:en1
  + Server Port:8080
  + 
  + Document Path:  /index.html
  + Document Length:114 bytes
  + 
  + Concurrency Level:  10
  + Time taken for tests:   5.165 seconds
  + Complete requests:  5000
  + Failed requests:0
  + Total transferred:  1765000 bytes
  + HTML transferred:   57 bytes
  + Requests per second:968.05
  + Transfer rate:  341.72 kb/s received
  + 
  + Connnection Times (ms)
  +   min   avg   max
  + Connect:0 010
  + Processing: 21026
  + Total:  21036
  + 
  + - ``ps'' after benchmark
  + 73364 1 rse 0.0  1472  960  264 Ss   src/apache
  + 73365 73364 rse10.1  4428 1656  264 Ssrc/apache
  +
  
  
  


cvs commit: apache-2.0/mpm/conf httpd.conf-dist

1999-08-12 Thread rse
rse 99/08/12 04:39:17

  Modified:mpm/conf httpd.conf-dist
  Log:
  Ops, Scoreboard twice?
  
  Revision  ChangesPath
  1.4   +0 -4  apache-2.0/mpm/conf/httpd.conf-dist
  
  Index: httpd.conf-dist
  ===
  RCS file: /home/cvs/apache-2.0/mpm/conf/httpd.conf-dist,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- httpd.conf-dist   1999/08/12 08:59:11 1.3
  +++ httpd.conf-dist   1999/08/12 11:39:16 1.4
  @@ -123,10 +123,6 @@
   #
   KeepAliveTimeout 15
   
  -
  -ScoreBoardFile logs/apache_runtime_status
  -
  -
   #
   # Server-pool size regulation
   # 
  
  
  


cvs commit: apache-2.0/mpm config.option

1999-08-12 Thread rse
rse 99/08/12 04:35:05

  Modified:mpm  config.option
  Log:
  Ops, --with-layout is too special option (precessed very early) which cannot
  be used in config.option unless I hack a lot more in configure (which I don't
  want to do).
  
  Revision  ChangesPath
  1.2   +0 -1  apache-2.0/mpm/config.option
  
  Index: config.option
  ===
  RCS file: /home/cvs/apache-2.0/mpm/config.option,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- config.option 1999/08/12 11:24:49 1.1
  +++ config.option 1999/08/12 11:35:05 1.2
  @@ -7,7 +7,6 @@
   #   (these are loaded first)
   
   OPTIM='-pipe -O2'
  ---with-layout=GNU
   --target=apache
   --prefix=/tmp/apache-mpm
   --disable-module=status
  
  
  


cvs commit: apache-2.0/mpm 00README_FIRST_REALLY

1999-08-12 Thread rse
rse 99/08/12 04:25:31

  Modified:mpm  00README_FIRST_REALLY
  Log:
  Update my hint
  
  Revision  ChangesPath
  1.5   +2 -17 apache-2.0/mpm/00README_FIRST_REALLY
  
  Index: 00README_FIRST_REALLY
  ===
  RCS file: /home/cvs/apache-2.0/mpm/00README_FIRST_REALLY,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- 00README_FIRST_REALLY 1999/07/10 18:20:15 1.4
  +++ 00README_FIRST_REALLY 1999/08/12 11:25:30 1.5
  @@ -5,23 +5,8 @@
   
   - Dean
   
  -You can build for 1.3 preforking via:
  -
  -$ ./configure \
  -  --set-rule=MPM_METHOD:prefork
  -  --disable-module=status
  -  --disable-module=include
  -  --disable-module=cgi
  -
  -and for the MPM pthreading stuff via:
  -
  -$ ./configure \
  -  --set-rule=MPM_METHOD:mpmt_pthread
  -  --disable-module=status
  -  --disable-module=include
  -  --disable-module=cgi
  -
  -(on some systems you also need ``CFLAGS=-pthread LDFLAGS=-pthread'' !!)
  +Read README.rse for some hints from me.
  +Read config.option for some predefined situations.
   
   - Ralf
   
  
  
  


cvs commit: apache-2.0/mpm README.rse

1999-08-12 Thread rse
rse 99/08/12 04:25:18

  Modified:mpm  README.rse
  Log:
  Hints about the new --with-options=ID stuff...
  
  Revision  ChangesPath
  1.2   +21 -0 apache-2.0/mpm/README.rse
  
  Index: README.rse
  ===
  RCS file: /home/cvs/apache-2.0/mpm/README.rse,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- README.rse1999/08/12 09:02:35 1.1
  +++ README.rse1999/08/12 11:25:17 1.2
  @@ -22,6 +22,13 @@
$ make 
$ make install
   
  + Alternative:
  +
  + $ cd /apache-mpm/mpm/
  + $ ./configure --with-option=mpm-prefork
  + $ make 
  + $ make install
  +
 o  FooBar/OS + Ralf S. Engelschall's GNU Pth + dexter MPM
[the portable hybrid (preforking+prethreading) process model]
   
  @@ -53,6 +60,13 @@
$ make
$ make install
   
  + Alternative:
  +
  + $ cd /apache-mpm/mpm/
  + $ ./configure --with-option=mpm-dexter-pth
  + $ make 
  + $ make install
  +
 o  FreeBSD 3.1 + John Birrell's uthread + dexter MPM
[the FreeBSD specific hybrid (preforking+prethreading) process model]
   
  @@ -74,6 +88,13 @@
  --disable-module=status \
  --disable-module=include \
  --disable-module=cgi
  + $ make 
  + $ make install
  +
  + Alternative:
  +
  + $ cd /apache-mpm/mpm/
  + $ ./configure --with-option=mpm-dexter-uthread
$ make 
$ make install
   
  
  
  


cvs commit: apache-2.0/mpm config.option configure

1999-08-12 Thread rse
rse 99/08/12 04:24:50

  Modified:mpm  configure
  Added:   mpm  config.option
  Log:
  It was stated that Apache/mpm is for hacking, so I felt free to impliment
  something I always wanted for APACI: a config.option file similar to
  config.layout which allows one to load pre-defined options via
  --with-option=ID.  Because I got tired of having staying around lots of small
  config.status. files in my source trees.  This way one can put all their
  stuff into one file _AND_ their shared parts are only there _ONCE_ in order to
  reduce redundancy...
  
  Revision  ChangesPath
  1.6   +40 -1 apache-2.0/mpm/configure
  
  Index: configure
  ===
  RCS file: /home/cvs/apache-2.0/mpm/configure,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- configure 1999/08/12 08:22:34 1.5
  +++ configure 1999/08/12 11:24:49 1.6
  @@ -82,6 +82,7 @@
   tplconf=src/.apaci.tplconf
   pldconf=src/.apaci.pldconf
   configlayout=config.layout
  +configoption=config.option
   configstatus=config.status
   shadow=''
   
  @@ -478,6 +479,43 @@
   name_layout=$name
   with_layout=1
   ;;
  +--with-option=*)
  +case $apc_optarg in
  +*:* ) 
  +file=`echo $apc_optarg | sed -e 's/:.*//'`
  +name=`echo $apc_optarg | sed -e 's/.*://'`
  +;;
  +* ) 
  +name=$apc_optarg
  +file=$configoption
  +;;
  +esac
  +if [ ! -f "$file" ]; then
  +echo "configure:Error: Option definition file $file not 
found" 1>&2
  +exit 1
  +fi
  +echo "loadopt=''" >$pldconf
  +sed -e "1,/[ ]*<[Oo]ption[   ]*common[   ]*>[]*/d" \
  +-e '/[   ]*<\/[Oo]ption>[]*/,$d' \
  +-e 's/^[ ]*//g' \
  +-e 's/^\(--.*=.*\)$/loadopt="$loadopt \1"/' \
  +$file >>$pldconf
  +sed -e "1,/[ ]*<[Oo]ption[   ]*$name[]*>[]*/d" \
  +-e '/[   ]*<\/[Oo]ption>[]*/,$d' \
  +-e 's/^[ ]*//g' \
  +-e 's/^\(--.*=.*\)$/loadopt="$loadopt \1"/' \
  +$file >>$pldconf
  +. $pldconf
  +if [ "x$*" = "x" ]; then
  +set -- $loadopt
  +else
  +set -- "$@" $loadopt
  +fi
  +rm -f $pldconf 2>/dev/null
  +if [ "x$quiet" = "xno" ]; then
  +echo " + loaded configuration options: $name ($file)"
  +fi
  +;;
   *)
   ;;
   esac
  @@ -505,7 +543,7 @@
   esac
   #  accept only the most important GNU Autoconf-style options
   case "$apc_option" in
  ---help|-h|-help|--with-layout=*|-compat)
  +--help|-h|-help|--with-layout=*|--with-option=*|-compat)
   #   just ignore already parsed options
   ;;
   --quiet | --silent) 
  @@ -983,6 +1021,7 @@
   for arg
   do
   echo "$arg" |\
  +grep -v '^--with-option' |\
   sed -e 's:\(["$\\]\):\\\1:g' \
   -e 's:^:":' \
   -e 's:$:" \\:' >>$configstatus
  
  
  
  1.1  apache-2.0/mpm/config.option
  
  Index: config.option
  ===
  ##
  ##  config.option -- APACI Pre-defined Configuration Options
  ##  Hints: options can be loaded with APACI's --with-option=ID
  ##
  
  #   Common standard options
  #   (these are loaded first)
  
  OPTIM='-pipe -O2'
  --with-layout=GNU
  --target=apache
  --prefix=/tmp/apache-mpm
  --disable-module=status
  --disable-module=include
  --disable-module=cgi
  
  
  #   prefork MPM
  #   (the good old Apache 1.3 preforking process model)
  
  --set-rule=MPM_METHOD:prefork
  
  
  #   dexter MPM with GNU Pth
  #   (a portable variant of the hybrid (preforking/prethreading) model)
  #   assumptions: 
  #   - Pth source tree was extracted to apache-mpm/pth/
  #   - Pth was configured with ``--enable-pthread --enable-syscall-soft''
  #   - Pth was already build (but has not to be installed)
  
  CFLAGS='-I\$(SRCDIR)/../../pth -DPTHREAD_EVERYWHERE 
-DNO_SERIALIZED_ACCEPT'
  LDFLAGS='-L\$(SRCDIR)/../../pth/.libs'
  LIBS=-lpthread
  --set-rule=MPM_METHOD:dexter
  
  
  #   dexter MPM with FreeBSD's uthread and RSE's poll emulation
  #   (a FreeBSD specific variant of the hybrid (preforking/prethreading) model)
  #   assumptions: 
  #   - FreeBSD uthread is available in libc_r and cc knows ``-pthread''
  #   - RSE's poll(2) emulation library stays in apache-apr/poll/
  #   - RSE's poll(2) emulation library was already build
  
  CC=cc
  CFLAGS='-

cvs commit: apache-2.0/mpm README.rse

1999-08-12 Thread rse
rse 99/08/12 02:02:36

  Added:   mpm  README.rse
  Log:
  Hell, I'm really productive today and couldn't resist to get also Apache/mpm
  finally running. So here it comes: Ralf's second writeup, this time for
  Apache/mpm and with infos how one gets running FooBar/OS+prefork-MPM,
  FooBar/OS+dexter-MPM+GNU/Pth and FooBar/OS+dexter-MPM+FreeBSD/uthread.
  
  Now the Apache/mpm stuff makes me a little bit more happier, but I've to admit
  that IMHO the stuff is still a greater mess than Apache/pthread. And I've to
  conclude that _neither_ Apache/pthread _nor_ Apache/mpm should be directly
  used as the basis source tree for Apache 2.0. I go with Roy's opinion here...
  
  Revision  ChangesPath
  1.1  apache-2.0/mpm/README.rse
  
  Index: README.rse
  ===
  
Get the Apache/mpm beast running
Ralf S. Engelschall, 12-Aug-1999

  
These are my instructions for getting Apache/mpm running under various
platforms. For some background details see apache-apr/pthread/README.rse,
too.

o  FooBar/OS + prefork MPM
   [the portable preforking process model]
  
   $ cd /apache-mpm/mpm/
   $ ./configure \
 --with-layout=GNU \
 --target=apache \
 --prefix=/tmp/apache-mpm \
 --set-rule=MPM_METHOD:prefork \
 --disable-module=status \
 --disable-module=include \
 --disable-module=cgi
   $ make 
   $ make install
  
o  FooBar/OS + Ralf S. Engelschall's GNU Pth + dexter MPM
   [the portable hybrid (preforking+prethreading) process model]
  
   $ cd /apache-mpm
   $ lynx ftp://alpha.gnu.org/gnu/pth/pth-1.1b3.tar.gz
 [You can use also any later Pth version, of course.  ]
 [Especially release versions >= 1.1.0 from ftp://ftp.gnu.org/gnu/pth/]
   $ gunzip /apache-mpm/mpm
   $ CFLAGS='-I\$(SRCDIR)/../pth-1.1b3 -DPTHREAD_EVERYWHERE 
-DNO_SERIALIZED_ACCEPT' \
 LDFLAGS='-L\$(SRCDIR)/../pth-1.1b3/.libs' \
 LIBS="-lpthread" \
 ./configure \
 --with-layout=GNU \
 --target=apache \
 --prefix=/tmp/apache-mpm
 --set-rule=MPM_METHOD:dexter \
 --disable-module=status \
 --disable-module=include \
 --disable-module=cgi
   $ make
   $ make install
  
o  FreeBSD 3.1 + John Birrell's uthread + dexter MPM
   [the FreeBSD specific hybrid (preforking+prethreading) process model]
  
   $ cd /apache-apr/poll
   $ ./configure 
   $ make
  
   $ cd /apache-mpm/mpm
   $ CC='cc' \
 OPTIM='-O2' \
 CFLAGS='-pthread -I\$(SRCDIR)/../../../apache-apr/poll 
-DNO_SERIALIZED_ACCEPT' \
 LDFLAGS='-pthread -L\$(SRCDIR)/../../../apache-apr/poll' \
 LIBS='-lpoll' \
 ./configure \
 --with-layout=GNU \
 --target=apache \
 --prefix=/tmp/apache-mpm \
 --set-rule=MPM_METHOD:dexter \
 --disable-module=status \
 --disable-module=include \
 --disable-module=cgi
   $ make 
   $ make install
  
  
  
  


cvs commit: apache-2.0/mpm/conf httpd.conf-dist

1999-08-12 Thread rse
rse 99/08/12 01:59:11

  Modified:mpm/conf httpd.conf-dist
  Log:
  Allow is to fire up both prefork and dexter MPM based Apache/mpm's with one
  config file. Feel free to adjust the numbers, please. I've still not looked at
  them carefully - only tested that the beast runs and serves this way.
  
  Revision  ChangesPath
  1.3   +25 -50apache-2.0/mpm/conf/httpd.conf-dist
  
  Index: httpd.conf-dist
  ===
  RCS file: /home/cvs/apache-2.0/mpm/conf/httpd.conf-dist,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- httpd.conf-dist   1999/07/04 09:38:02 1.2
  +++ httpd.conf-dist   1999/08/12 08:59:11 1.3
  @@ -83,7 +83,9 @@
   # this file will be  created when you run Apache) then you *must* ensure that
   # no two invocations of Apache share the same scoreboard file.
   #
  +
   ScoreBoardFile logs/apache_runtime_status
  +
   
   #
   # In the standard configuration, the server will process this file,
  @@ -121,59 +123,32 @@
   #
   KeepAliveTimeout 15
   
  -#
  -# Server-pool size regulation.  Rather than making you guess how many
  -# server processes you need, Apache dynamically adapts to the load it
  -# sees --- that is, it tries to maintain enough server processes to
  -# handle the current load, plus a few spare servers to handle transient
  -# load spikes (e.g., multiple simultaneous requests from a single
  -# Netscape browser).
  -#
  -# It does this by periodically checking how many servers are waiting
  -# for a request.  If there are fewer than MinSpareServers, it creates
  -# a new spare.  If there are more than MaxSpareServers, some of the
  -# spares die off.  The default values are probably OK for most sites.
  -#
  -MinSpareServers 5
  -MaxSpareServers 10
  -
  -#
  -# Number of servers to start initially --- should be a reasonable ballpark
  -# figure.
  -#
  -StartServers 5
  -
  -#
  -# Limit on the number of threads per child process.  The number of clients
  -# who can simultaneously connect is this number times the number of 
MaxClients.
  -# If this limit is ever reached, clients will be LOCKED out, so it should
  -# not be set too low. 
  -#
  -ThreadsPerChild 8 
  +
  +ScoreBoardFile logs/apache_runtime_status
  +
   
  -#
  -# Limit on total number of servers running, i.e., limit on the number
  -# who can simultaneously connect is this number times the number of 
MaxClients.
  -# If this limit is ever reached, clients will be LOCKED out, so it should
  -# not be set too low. 
   #
  -MaxClients 8 
  +# Server-pool size regulation
  +# 
   
  -#
  -# MaxRequestsPerChild: the number of requests each child process is
  -# allowed to process before the child dies.  The child will exit so
  -# as to avoid problems after prolonged use when Apache (and maybe the
  -# libraries it uses) leak memory or other resources.  On most systems, this
  -# isn't really needed, but a few (such as Solaris) do have notable leaks
  -# in the libraries. For these platforms, set to something like 1
  -# or so; a setting of 0 means unlimited.
  -#
  -# NOTE: This value does not include keepalive requests after the initial
  -#   request per connection. For example, if a child process handles
  -#   an initial request and 10 subsequent "keptalive" requests, it
  -#   would only count as 1 request towards this limit.
  -#
  -MaxRequestsPerChild 0
  +# prefork MPM
  +
  +StartServers 5
  +MinSpareServers  5
  +MaxSpareServers 10
  +MaxClients   8 
  +MaxRequestsPerChild  0
  +
  +
  +# dexter MPM
  +
  +NumServers   5
  +StartThreads 5
  +MinSpareThreads  5
  +MaxSpareThreads 10
  +MaxThreadsPerChild   8
  +MaxRequestsPerChild  0
  +
   
   #
   # Listen: Allows you to bind Apache to specific IP addresses and/or
  
  
  


cvs commit: apache-2.0/mpm/src/modules/mpm/dexter acceptlock.h

1999-08-12 Thread rse
rse 99/08/12 01:31:33

  Modified:mpm/src/modules/mpm/dexter acceptlock.h
  Log:
  Prevent a warning
  
  Revision  ChangesPath
  1.2   +2 -0  apache-2.0/mpm/src/modules/mpm/dexter/acceptlock.h
  
  Index: acceptlock.h
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/modules/mpm/dexter/acceptlock.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- acceptlock.h  1999/07/21 19:07:06 1.1
  +++ acceptlock.h  1999/08/12 08:31:32 1.2
  @@ -118,7 +118,9 @@
   #if !defined(MULTITHREAD)
   /* Multithreaded systems don't complete between processes for
* the sockets. */
  +#ifndef NO_SERIALIZED_ACCEPT
   #define NO_SERIALIZED_ACCEPT
  +#endif
   #define accept_mutex_child_init(x)
   #define accept_mutex_init(x, y)
   #define accept_mutex_on(x)
  
  
  


cvs commit: apache-2.0/mpm configure

1999-08-12 Thread rse
rse 99/08/12 01:22:35

  Modified:mpm  configure
  Log:
  Allow us to disable mod_vhost_alias in Apache/mpm
  
  Revision  ChangesPath
  1.5   +11 -5 apache-2.0/mpm/configure
  
  Index: configure
  ===
  RCS file: /home/cvs/apache-2.0/mpm/configure,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- configure 1999/08/06 00:53:53 1.4
  +++ configure 1999/08/12 08:22:34 1.5
  @@ -1395,22 +1395,28 @@
   fi
   
   #   generate module directives
  +#   (paths are modules/foo/mod_bar.ext and modules/foo/libbar.ext)
   OIFS="$IFS"
   IFS=':'
   for module in $modules; do
   eval "add=\$module_$module"
   if [ "x$add" = "xyes" ]; then
  -echo $SEO "s%^.*\\(AddModule.*[_b/]$module\\..*\\)%\\1%g" >>$sedsubst
  -echo $SEO "s%^.*\\(SharedModule.*[_b/]$module\\..*\\)%\\1%g" 
>>$sedsubst
  +echo $SEO "s%^.*\\(AddModule.*mod_$module\\..*\\)%\\1%g" >>$sedsubst
  +echo $SEO "s%^.*\\(AddModule.*lib$module\\..*\\)%\\1%g" >>$sedsubst
  +echo $SEO "s%^.*\\(SharedModule.*mod_$module\\..*\\)%\\1%g" 
>>$sedsubst
  +echo $SEO "s%^.*\\(SharedModule.*lib$module\\..*\\)%\\1%g" 
>>$sedsubst
   m="yes"
   else
  -echo $SEO "s%^.*\\(AddModule.*[_b/]$module\\..*\\)%# \\1%g" 
>>$sedsubst
  -echo $SEO "s%^.*\\(SharedModule.*[_b/]$module\\..*\\)%# \\1%g" 
>>$sedsubst
  +echo $SEO "s%^.*\\(AddModule.*mod_$module\\..*\\)%# \\1%g" 
>>$sedsubst
  +echo $SEO "s%^.*\\(AddModule.*lib$module\\..*\\)%# \\1%g" >>$sedsubst
  +echo $SEO "s%^.*\\(SharedModule.*mod_$module\\..*\\)%# \\1%g" 
>>$sedsubst
  +echo $SEO "s%^.*\\(SharedModule.*lib$module\\..*\\)%# \\1%g" 
>>$sedsubst
   m=no
   fi
   eval "share=\$shared_$module"
   if [ "x$share" = "xyes" ]; then
  -echo $SEO 
"s%^\\(.*\\)AddModule\\(.*[_b/]$module\\.\\)[oam].*\\(.*\\)%\\1SharedModule\\2so\\3%g"
 >>$sedsubst
  +echo $SEO 
"s%^\\(.*\\)AddModule\\(.*mod_$module\\.\\)[oam].*\\(.*\\)%\\1SharedModule\\2so\\3%g"
 >>$sedsubst
  +echo $SEO 
"s%^\\(.*\\)AddModule\\(.*lib$module\\.\\)[oam].*\\(.*\\)%\\1SharedModule\\2so\\3%g"
 >>$sedsubst
   m="$m [shared]"
   fi
   if [ "x$verbose" = "xyes" ]; then
  
  
  


cvs commit: apache-2.0/mpm/src/modules/mpm MPM.NAMING

1999-08-12 Thread rse
rse 99/08/12 01:20:07

  Modified:mpm/src/modules/mpm MPM.NAMING
  Log:
  Try to find overview in the MPM mess.
  Is this correctly described or did I misunderstood anything?
  Feel free to fix me...
  
  Revision  ChangesPath
  1.2   +9 -0  apache-2.0/mpm/src/modules/mpm/MPM.NAMING
  
  Index: MPM.NAMING
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/modules/mpm/MPM.NAMING,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MPM.NAMING1999/06/24 01:57:51 1.1
  +++ MPM.NAMING1999/08/12 08:20:07 1.2
  @@ -20,3 +20,12 @@
   
   The MPM_METHOD Rule will use the actual name (eg: prefork) to
   pick the correct method module to build.
  +
  +The following MPMs currently exist:
  +
  +  prefork ... Multi  Process Model with Preforking (Apache 1.3)
  +  dexter  Multi  Process Model with Threading via Pthreads (v2)
  +  mpmt_pthread .. Multi  Process Model with Threading via Pthreads (v1 = 
Apache/pthread)
  +  spmt_os2 .. Single Process Model with Threading on OS/2
  +  winnt . Single Process Model with Threading on Windows NT
  +
  
  
  


cvs commit: apache-2.0/mpm/src/include ap_config.h

1999-08-12 Thread rse
rse 99/08/12 01:11:45

  Modified:mpm/src/include ap_config.h
  Log:
  Add Apache/pthread's support for -DNO_SERIALIZED_ACCEPT and
  -DPTHREAD_EVERYWHERE also to Apache/mpm.
  
  Revision  ChangesPath
  1.5   +25 -0 apache-2.0/mpm/src/include/ap_config.h
  
  Index: ap_config.h
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/include/ap_config.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ap_config.h   1999/08/06 00:54:16 1.4
  +++ ap_config.h   1999/08/12 08:11:44 1.5
  @@ -1372,6 +1372,31 @@
   #define ap_wait_t int
   #endif
   
  +/*
  + * Special Support for User-Space Threading Environments [rse, 12-Aug-1999]
  + */
  +
  +/* optionally make sure the Pthread environment is available in _EVERY_ 
source 
  +   by including the Pthread header already in this header file. This is
  +   important for portable user-space threading environments which can only 
use
  +   soft syscall wrapping (i.e. ``#define read _pthread_read'', etc.) */
  +#ifdef PTHREAD_EVERYWHERE
  +#include 
  +#endif
  +
  +/* support for forcing no serialized accept situation. This has to be
  +   used by user-space threading environments, because mostly all (except for
  +   USE_PTHREAD_SERIALIZED_ACCEPT, but this only works on a few platforms)
  +   variants of the inter-process accept lock would suspend the whole process
  +   and not just the acceptor thread. */
  +#ifdef NO_SERIALIZED_ACCEPT
  +#undef USE_FCNTL_SERIALIZED_ACCEPT
  +#undef USE_FLOCK_SERIALIZED_ACCEPT
  +#undef USE_USLOCK_SERIALIZED_ACCEPT
  +#undef USE_SYSVSEM_SERIALIZED_ACCEPT
  +#undef USE_PTHREAD_SERIALIZED_ACCEPT
  +#endif
  +
   #ifdef __cplusplus
   }
   #endif
  
  
  


cvs commit: apache-2.0/mpm .cvsignore

1999-08-12 Thread rse
rse 99/08/12 01:06:36

  Added:   mpm  .cvsignore
  Log:
  Add missing .cvsignore
  
  Revision  ChangesPath
  1.1  apache-2.0/mpm/.cvsignore
  
  Index: .cvsignore
  ===
  Makefile
  config.status
  config.status.*
  Makefile.*
  src.*
  
  
  


cvs commit: apache-apr/apr/time/unix .cvsignore

1999-08-12 Thread rse
rse 99/08/12 00:56:41

  Added:   apr/file_io/unix .cvsignore
   apr/locks/unix .cvsignore
   apr/misc/unix .cvsignore
   apr/network_io/unix .cvsignore
   apr/signal/unix .cvsignore
   apr/test .cvsignore
   apr/threadproc/unix .cvsignore
   apr/time/unix .cvsignore
  Log:
  Add a bunch of .cvsignore files to APR for Unix
  
  Revision  ChangesPath
  1.1  apache-apr/apr/file_io/unix/.cvsignore
  
  Index: .cvsignore
  ===
  Makefile
  
  
  
  1.1  apache-apr/apr/locks/unix/.cvsignore
  
  Index: .cvsignore
  ===
  Makefile
  
  
  
  1.1  apache-apr/apr/misc/unix/.cvsignore
  
  Index: .cvsignore
  ===
  Makefile
  
  
  
  1.1  apache-apr/apr/network_io/unix/.cvsignore
  
  Index: .cvsignore
  ===
  Makefile
  
  
  
  1.1  apache-apr/apr/signal/unix/.cvsignore
  
  Index: .cvsignore
  ===
  Makefile
  
  
  
  1.1  apache-apr/apr/test/.cvsignore
  
  Index: .cvsignore
  ===
  Makefile
  
  
  
  1.1  apache-apr/apr/threadproc/unix/.cvsignore
  
  Index: .cvsignore
  ===
  Makefile
  
  
  
  1.1  apache-apr/apr/time/unix/.cvsignore
  
  Index: .cvsignore
  ===
  Makefile
  
  
  


cvs commit: apache-apr/poll .cvsignore

1999-08-12 Thread rse
rse 99/08/12 00:44:27

  Added:   poll .cvsignore
  Log:
  Add .cvsignore now that the stuff is in CVS
  
  Revision  ChangesPath
  1.1  apache-apr/poll/.cvsignore
  
  Index: .cvsignore
  ===
  Makefile
  config.cache
  config.log
  config.status
  
  
  


cvs commit: apache-apr/pthreads .cvsignore

1999-08-12 Thread rse
rse 99/08/12 00:40:44

  Added:   pthreads .cvsignore
  Log:
  Add a missing .cvsignore
  
  Revision  ChangesPath
  1.1  apache-apr/pthreads/.cvsignore
  
  Index: .cvsignore
  ===
  Makefile
  config.status
  config.status.*
  Makefile.*
  src.*
  
  
  


cvs commit: apache-apr/poll - Imported sources

1999-08-12 Thread rse
rse 99/08/12 00:33:26

  Log:
  Import of my stand-alone poll(2) emulation library
  
  Status:
  
  Vendor Tag:   rse
  Release Tags: POLL_19990812
  
  N apache-apr/poll/poll.h
  N apache-apr/poll/configure.in
  N apache-apr/poll/Makefile.in
  N apache-apr/poll/configure
  N apache-apr/poll/README
  N apache-apr/poll/poll.c
  
  No conflicts created by this import


cvs commit: apache-apr/pthreads README.rse

1999-08-12 Thread rse
rse 99/08/12 00:31:02

  Added:   pthreads README.rse
  Log:
  Ralf's latest writeup: ``Get the Apache/pthread beast running''.  Those who
  had great problems to get Apache/pthread running in the past (especially on
  non-Linux and non-AIX platforms ;) can now give it another try by following
  the ``FooBar/OS + Pth'' instructions in this document. With this variant
  Apache/pthread can be used to get a multithreaded Apache running on mostly all
  current Unix flavors, I think.
  
  Revision  ChangesPath
  1.1  apache-apr/pthreads/README.rse
  
  Index: README.rse
  ===
  
Get the Apache/pthread beast running
Ralf S. Engelschall, 12-Aug-1999

  
These are my instructions for getting Apache/pthread running under various
platforms (mainly FreeBSD for now). One usually has to fight against two
major problems:
  
1. Apache/pthread (as Apache 1.3) uses an inter-process lockfile 
   for optionally serializing accepts. This means that usually either
   flock(2) or fcntl(2) is used. The problem is that in a multi-threaded
   environment this works only by coincidence (usually when threads are
   implemented in kernel-space).  For mostly all user-space implementations
   this will cause Apache/pthread to hang on connections (actually in the
   middle of processing the request in case the request processing thread
   had to be suspended once because of a blocking situation).
  
   There are two solutions: If the user-space threading library supports
   inter-process mutexes (_POSIX_THREAD_PROCESS_SHARED is defined) one can
   use pthread_mutex_t inside a shared memory segment. But AFAIK there is
   still no freely available user-space pthread library which supports this
   (the forthcoming GNU Pth versions will support this, but the stuff is
   still not released).  So the only possibility is to use no accept
   serialization at all. The effect can be that the server is slower because
   of contention on the accept socket.
  
2. Apache/pthread uses poll(2) which is not available on all platforms.
   There is just one solution: Emulate poll(2) with select(2) For this one
   can use my poll emulation library which I've comitted to the
   apache-apr/poll/ repository area.
  
3. Portable user-space threading environments like GNU Pth cannot
   easily provide system call wrappers, because there is no 100% portable
   way to provide this "magically". For instance Pth instead provides two
   variants: soft syscall wrapping via ``#define 
   _pthread_'' in pthread.h and hard syscall wrapping with
   syscall(2). The soft syscall wrapping is 100% portable, but requires an
   #include  in _EVERY_ source file of the application which uses
   a to be wrapped system call, of course. The hard system call wrapping
   works "magically" just at the linker phase, but has some portability
   problems. The best solution is to use soft system call wrapping by just
   including pthread.h in every Apache source file.
  
And here are the success stories for pariticular OS+Pthread variants:
  
o  FreeBSD 3.1 + John Birrell' uthread
  
   - uthread is a user-space pthread library in FreeBSD's libc_r
 which contains both thread-safe libc functions and the thread
 functions. This library replaces libc for threaded applications.  For
 older FreeBSD versions (2.2.x) one has to build libc_r manually as part
 of a 'make world'.
   
   - uthread is a plain user-space implementation and this way the
 inter-process accept lock file cannot be used (it suspends the whole
 process and not just the current thread). One has to make sure that no
 USE_XXX_SERIALIZED_ACCEPT is defined for FreeBSD in
 src/include/ap_config.h. For this a -DNO_SERIALIZED_ACCEPT can be used.
  
   - FreeBSD <= 3.2-STABLE lacks poll(2) in libc_r, altough poll(2) exists
 in libc since FreeBSD 3.0. One has to use the poll emulation library.
  
   Follow these steps:
  
   $ cd /apache-apr/poll
   $ ./configure 
   $ make
  
   $ cd /apache-apr/pthread
   $ CC='cc' \
 OPTIM='-O2' \
 CFLAGS='-pthread -I\$(SRCDIR)/../../poll -DNO_SERIALIZED_ACCEPT' \
 LDFLAGS='-pthread -L\$(SRCDIR)/../../poll' \
 LIBS='-lpoll' \
 ./configure \
 --with-layout=GNU \
 --target=apache \
 --prefix=/tmp/apache-pthread \
   $ make 
   $ make install
  
o  FooBar/OS + Ralf S. Engelschall's GNU Pth
  
   - Pth is also a user-space pthread library and this way the inter-process
 accept lock file cannot be used (it suspends the whole process and not
 just the current thread). One has to make sure that no
 USE_XXX_SERI

cvs commit: apache-apr/pthreads/src/support apachectl.1

1999-08-12 Thread rse
rse 99/08/12 00:27:59

  Removed: pthreads/src/support apachectl.1
  Log:
  Fix Apache/pthread source tree to make "make install" working again.
  apachectl.1 was renamed to apachectl.8 in the past but seems like the
  apache-pthread/pthread/ tree has not recognized this at the merging points.
  I've repository copied apachectl.8, of course.


cvs commit: apache-apr/pthreads/src/include ap_config.h

1999-08-12 Thread rse
rse 99/08/12 00:23:21

  Modified:pthreads/src/include ap_config.h
  Log:
  The additional thread support in ap_config.h:
  
  - NO_SERIALIZED_ACCEPT removes any USE_XXX_SERIALIZED_ACCEPT
to allow one to force no accept serialization without
having to patch the platform specific section.
  
  - A new PTHREAD_EVERYWHERE define which forces pthread.h
to be included into _every_ source file. See the
forthcoming README.rse for details.
  
  Revision  ChangesPath
  1.7   +25 -0 apache-apr/pthreads/src/include/ap_config.h
  
  Index: ap_config.h
  ===
  RCS file: /home/cvs/apache-apr/pthreads/src/include/ap_config.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ap_config.h   1999/06/10 06:25:54 1.6
  +++ ap_config.h   1999/08/12 07:23:20 1.7
  @@ -1361,6 +1361,31 @@
   #define ap_wait_t int
   #endif
   
  +/*
  + * Special Support for User-Space Threading Environments [rse, 12-Aug-1999]
  + */
  +
  +/* optionally make sure the Pthread environment is available in _EVERY_ 
source 
  +   by including the Pthread header already in this header file. This is
  +   important for portable user-space threading environments which can only 
use
  +   soft syscall wrapping (i.e. ``#define read _pthread_read'', etc.) */
  +#ifdef PTHREAD_EVERYWHERE
  +#include 
  +#endif
  +
  +/* support for forcing no serialized accept situation. This has to be
  +   used by user-space threading environments, because mostly all (except for
  +   USE_PTHREAD_SERIALIZED_ACCEPT, but this only works on a few platforms)
  +   variants of the inter-process accept lock would suspend the whole process
  +   and not just the acceptor thread. */
  +#ifdef NO_SERIALIZED_ACCEPT
  +#undef USE_FCNTL_SERIALIZED_ACCEPT
  +#undef USE_FLOCK_SERIALIZED_ACCEPT
  +#undef USE_USLOCK_SERIALIZED_ACCEPT
  +#undef USE_SYSVSEM_SERIALIZED_ACCEPT
  +#undef USE_PTHREAD_SERIALIZED_ACCEPT
  +#endif
  +
   #ifdef __cplusplus
   }
   #endif
  
  
  


cvs commit: apache-2.0/mpm/src/modules/mpm/dexter dexter.c

1999-08-12 Thread manoj
manoj   99/08/11 19:02:28

  Modified:mpm/src/modules/mpm/dexter dexter.c
  Log:
  A little experiment. Add a special worker thread function for the case
  when only one child process is running. It eliminates cross-process
  serialization and can reuse the data from a poll call.
  
  Revision  ChangesPath
  1.21  +131 -3apache-2.0/mpm/src/modules/mpm/dexter/dexter.c
  
  Index: dexter.c
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/modules/mpm/dexter/dexter.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -d -u -r1.20 -r1.21
  --- dexter.c  1999/08/11 23:55:38 1.20
  +++ dexter.c  1999/08/12 02:02:27 1.21
  @@ -892,16 +892,24 @@
   }
   
   static void *worker_thread(void *);
  +static void *worker_thread_one_child(void *);
   
   /* Starts a thread as long as we're below max_threads */
   static int start_thread(worker_thread_info *thread_info)
   {
   pthread_t thread;
  +void *(*thread_function)(void *);
   
   pthread_mutex_lock(&worker_thread_count_mutex);
   if (worker_thread_count < max_threads) {
  +if (num_daemons == 1) {
  +thread_function = worker_thread_one_child;
  +}
  +else {
  +thread_function = worker_thread;
  +}
   worker_thread_count++;
  -if (pthread_create(&thread, &(thread_info->attr), worker_thread, 
thread_info)) {
  +if (pthread_create(&thread, &(thread_info->attr), thread_function, 
thread_info)) {
   ap_log_error(APLOG_MARK, APLOG_ALERT, server_conf,
"pthread_create: unable to create worker thread");
   /* In case system resources are maxxed out, we don't want
  @@ -954,6 +962,128 @@
   
   /* idle_thread_count should be incremented before starting a worker_thread */
   
  +static void *worker_thread_one_child(void *arg)
  +{
  +struct sockaddr sa_client;
  +int csd = -1;
  +pool *tpool;/* Pool for this thread   */
  +pool *ptrans;/* Pool for per-transaction stuff */
  +int sd = -1;
  +int srv;
  +int poll_count = 0;
  +static int curr_pollfd = 0;
  +size_t len = sizeof(struct sockaddr);
  +worker_thread_info *thread_info = arg;
  +int thread_just_started = 1;
  +
  +pthread_mutex_lock(&thread_info->mutex);
  +tpool = ap_make_sub_pool(thread_info->pool);
  +pthread_mutex_unlock(&thread_info->mutex);
  +ptrans = ap_make_sub_pool(tpool);
  +
  +while (!workers_may_exit) {
  +workers_may_exit |= (max_requests_per_child != 0) && 
(requests_this_child <= 0);
  +if (workers_may_exit) break;
  +if (!thread_just_started) {
  +pthread_mutex_lock(&idle_thread_count_mutex);
  +if (idle_thread_count < max_spare_threads) {
  +idle_thread_count++;
  +pthread_mutex_unlock(&idle_thread_count_mutex);
  +}
  +else {
  +pthread_mutex_unlock(&idle_thread_count_mutex);
  +break;
  +}
  +}
  +else {
  +thread_just_started = 0;
  +}
  +SAFE_ACCEPT(intra_mutex_on(0));
  +while (!workers_may_exit) {
  +if (poll_count > 0) {
  +/* Just check the pipe_of_death */
  +srv = poll(listenfds, 1, 0);
  +} else {
  +srv = poll_count = poll(listenfds, num_listenfds + 1, -1);
  +curr_pollfd = 0;
  +}
  +if (srv < 0) {
  +if (errno == EINTR) {
  +continue;
  +}
  +
  +/* poll() will only return errors in catastrophic
  + * circumstances. Let's try exiting gracefully, for now. */
  +ap_log_error(APLOG_MARK, APLOG_ERR, (const server_rec *)
  + ap_get_server_conf(), "poll: (listen)");
  +workers_may_exit = 1;
  +}
  +if (workers_may_exit) break;
  +
  +if (listenfds[0].revents & POLLIN) {
  +/* A process got a signal on the shutdown pipe. Check if
  + * we're the lucky process to die. */
  +check_pipe_of_death();
  +continue;
  +}
  +
  +if (num_listenfds == 1) {
  +sd = ap_listeners->fd;
  +poll_count = 0;
  +goto got_fd;
  +}
  +else {
  +/* find a listener. */
  +for(;;) {
  +curr_pollfd++;
  +/* XXX: Should we check for POLLERR? */
  +if (listenfds[curr_pollfd].revents & POLLIN) {
  +poll_count--;
  +sd = listenfds[curr_pollfd].fd;
  +goto got_fd;
  +