khttpd rotten?

khttpd rotten?

Post by Dan Kege » Tue, 07 May 2002 09:30:09



On vanilla 2.4.17, 2.4.18, and 2.4.19-pre8, I'm seeing
some mighty strange khttpd behavior.
It's chewing CPU time, failing in mysterious ways under light
or no load, and oopsing easily.

I'm compiling a writeup at
http://www.kegel.com/linux/khttpd/
and it just keeps getting worse.  It looks like you have
to 1) turn on sloppymime, 2) never restart it, and 3) run
with only 1 thread to have any hope of stability -- and
even then, abruptly terminating client connections causes
an oops fairly frequently.

If I didn't need it for a demo this week (don't ask), I
wouldn't be messing with khttpd; I'd be switching to Tux.

Seems like it's time to either fix khttpd or pull it from the kernel.

What was the last kernel version where khttpd was stable (if any)?

- Dan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

khttpd rotten?

Post by David S. Mille » Tue, 07 May 2002 11:30:06



   Date: Sun, 05 May 2002 17:28:37 -0700

   If I didn't need it for a demo this week (don't ask), I
   wouldn't be messing with khttpd; I'd be switching to Tux.

   Seems like it's time to either fix khttpd or pull it from the kernel.

We are going to pull it from the kernel.

The only argument is whether to replace it with TUX or not.
There is a lot of compelling evidence that suggests that
reasonably close performance can be obtained in userspace.

I guess the decision on TUX is not a prerequisite for pulling
khttpd though.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

khttpd rotten?

Post by Dan Kege » Tue, 07 May 2002 11:40:05




>    Date: Sun, 05 May 2002 17:28:37 -0700

>    If I didn't need it for a demo this week (don't ask), I
>    wouldn't be messing with khttpd; I'd be switching to Tux.

>    Seems like it's time to either fix khttpd or pull it from the kernel.

> We are going to pull it from the kernel.

> The only argument is whether to replace it with TUX or not.
> There is a lot of compelling evidence that suggests that
> reasonably close performance can be obtained in userspace.

> I guess the decision on TUX is not a prerequisite for pulling
> khttpd though.

Right.  If khttpd had been pulled from 2.4.17, I would have
had weeks of warning that khttpd is unstable; instead, I learned
only when someone started doing his own stress testing, and I
have little time to fix it.  I say pull it from
2.4.19-pre9.  Marcello, put it out of its misery asap, please...
it'd time for khttpd to become a standalone patch again.
- Dan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
 
 
 

khttpd rotten?

Post by Christoph Hellwi » Tue, 07 May 2002 19:30:14


On Sun, May 05, 2002 at 07:39:42PM -0700, Dan Kegel wrote:
> > We are going to pull it from the kernel.

> Right.  If khttpd had been pulled from 2.4.17, I would have
> had weeks of warning that khttpd is unstable; instead, I learned
> only when someone started doing his own stress testing, and I
> have little time to fix it.  I say pull it from
> 2.4.19-pre9.  Marcello, put it out of its misery asap, please...
> it'd time for khttpd to become a standalone patch again.

Okay, what about the following:

 - the below patch remove khttpd from 2.4.19-pre, but lets the
   sysctls in so it can compile out-of-tree
 - http://verein.lst.de/~hch/khttpd/khttpd-20020506.tar.gz has a tarball
   with khttpd as of 2.4.19-pre8, a simple makefile to build it and
   a simple patch to allow loading it when CONFIG_IPV6 != m,
   Arjan, could you please put it on the official khttpd website if one
   still exists.
 - for 2.5 the sysctls can go aswell

diff -uNr -Xdontdiff linux-2.4.19-pre8/Documentation/Configure.help linux/Documentation/Configure.help
--- linux-2.4.19-pre8/Documentation/Configure.help      Fri May  3 23:02:47 2002
+++ linux/Documentation/Configure.help  Mon May  6 13:05:24 2002
@@ -5406,25 +5406,6 @@
   say Y to "Kernel/User network link driver" and to "Routing
   messages" instead.

-Kernel httpd acceleration
-CONFIG_KHTTPD
-  The kernel httpd acceleration daemon (kHTTPd) is a (limited) web
-  server built into the kernel. It is limited since it can only serve
-  files from the file system and cannot deal with executable content
-  such as CGI scripts. Serving files is sped up if you use kHTTPd.
-  If kHTTPd is not able to fulfill a request, it can transparently
-  pass it through to a user space web server such as apache.
-
-  Saying "M" here builds the kHTTPd module; this is NOT enough to have
-  a working kHTTPd. For safety reasons, the module has to be activated
-  by doing a "echo 1 > /proc/sys/net/khttpd/start" after inserting the
-  module.
-
-  Before using this, read the README in net/khttpd !
-
-  The kHTTPd is experimental. Be careful when using it on a production
-  machine. Also note that kHTTPd doesn't support virtual servers yet.
-
 The IPX protocol
 CONFIG_IPX
   This is support for the Novell networking protocol, IPX, commonly
@@ -25233,7 +25214,7 @@
 # LocalWords:  Unixware cymru Computone IntelliPort Intelliport computone SI sx
 # LocalWords:  adbmouse DRI DRM dlabs GMX PLCs Applicom fieldbus applicom int
 # LocalWords:  VWSND eg ESSSOLO CFU CFNR scribed eiconctrl eicon hylafax KFPU
-# LocalWords:  EXTRAPREC fpu mainboards KHTTPD kHTTPd khttpd Xcelerator SBNI tw
+# LocalWords:  EXTRAPREC fpu mainboards Xcelerator SBNI tw
 # LocalWords:  LOGIBUSMOUSE Granch granch sbni Raylink NOHIGHMEM Athlon SIM sim
 # LocalWords:  hpl Tourrilhes DuraLAN starfire Davicom davicom dmfe auk tms tr
 # LocalWords:  TokenExpress Belkin Peracom eTek DVDs infradead Cxxx Adlib AV ZX
diff -uNr -Xdontdiff linux-2.4.19-pre8/Makefile linux/Makefile
--- linux-2.4.19-pre8/Makefile  Fri May  3 23:02:46 2002
+++ linux/Makefile      Mon May  6 13:05:36 2002
@@ -214,8 +214,6 @@
        drivers/scsi/aic7xxx/aicasm/aicdb.h \
        drivers/scsi/aic7xxx/aicasm/y.tab.h \
        drivers/scsi/53c700_d.h \
-       net/khttpd/make_times_h \
-       net/khttpd/times.h \
        submenu*
 # directories removed with 'make clean'
 CLEAN_DIRS = \
diff -uNr -Xdontdiff linux-2.4.19-pre8/include/linux/sysctl.h linux/include/linux/sysctl.h
--- linux-2.4.19-pre8/include/linux/sysctl.h    Fri May  3 23:02:46 2002
+++ linux/include/linux/sysctl.h        Mon May  6 13:06:25 2002
@@ -487,6 +487,8 @@
 };

 /* /proc/sys/net/khttpd/ */
+/* khttpd has been removed from the main kernel.
+   please keep this to allow out-of-tree compilation for 2.4.  --hch */
 enum {
        NET_KHTTPD_DOCROOT      = 1,
        NET_KHTTPD_START        = 2,
diff -uNr -Xdontdiff linux-2.4.19-pre8/net/Config.in linux/net/Config.in
--- linux-2.4.19-pre8/net/Config.in     Fri May  3 13:36:27 2002
+++ linux/net/Config.in Mon May  6 12:54:18 2002
@@ -26,9 +26,6 @@
         source net/ipv6/Config.in
       fi
    fi
-   if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-      source net/khttpd/Config.in
-   fi
 fi
 if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
    bool 'Asynchronous Transfer Mode (ATM) (EXPERIMENTAL)' CONFIG_ATM
diff -uNr -Xdontdiff linux-2.4.19-pre8/net/Makefile linux/net/Makefile
--- linux-2.4.19-pre8/net/Makefile      Fri May  3 13:37:42 2002
+++ linux/net/Makefile  Mon May  6 12:54:10 2002
@@ -26,7 +26,6 @@
 endif
 endif

-subdir-$(CONFIG_KHTTPD)                += khttpd
 subdir-$(CONFIG_PACKET)                += packet
 subdir-$(CONFIG_NET_SCHED)     += sched
 subdir-$(CONFIG_BRIDGE)                += bridge
diff -uNr -Xdontdiff linux-2.4.19-pre8/net/khttpd/Config.in linux/net/khttpd/Config.in
--- linux-2.4.19-pre8/net/khttpd/Config.in      Fri May  3 13:36:06 2002
+++ linux/net/khttpd/Config.in  Thu Jan  1 01:00:00 1970
@@ -1,4 +0,0 @@
-#
-# kHTTPd
-#
-tristate '  Kernel httpd acceleration (EXPERIMENTAL)' CONFIG_KHTTPD
diff -uNr -Xdontdiff linux-2.4.19-pre8/net/khttpd/Makefile linux/net/khttpd/Makefile
--- linux-2.4.19-pre8/net/khttpd/Makefile       Fri May  3 13:38:44 2002
+++ linux/net/khttpd/Makefile   Thu Jan  1 01:00:00 1970
@@ -1,25 +0,0 @@
-#
-# Makefile for kHTTPd
-#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now in the main makefile...
-
-O_TARGET := khttpd.o
-
-obj-m :=       $(O_TARGET)
-obj-y :=       main.o accept.o datasending.o logging.o misc.o rfc.o rfc_time.o security.o \
-               sockets.o sysctl.o userspace.o waitheaders.o
-
-
-include $(TOPDIR)/Rules.make
-
-rfc_time.o: times.h
-
-make_times_h: make_times_h.c
-       $(HOSTCC) $(HOSTCFLAGS) -o make_times_h make_times_h.c
-
-times.h: make_times_h
-       ./make_times_h
diff -uNr -Xdontdiff linux-2.4.19-pre8/net/khttpd/README linux/net/khttpd/README
--- linux-2.4.19-pre8/net/khttpd/README Fri May  3 13:35:57 2002
+++ linux/net/khttpd/README     Thu Jan  1 01:00:00 1970
@@ -1,224 +0,0 @@
-=====
-
-kHTTPd  -  Kernel httpd accelerator
-
-(C) 1999 by Arjan van de Ven
-Licensed under the terms of the GNU General Public License
-
-=====
-
-
-1. Introduction
----------------
-   kHTTPd is a http-daemon (webserver) for Linux. kHTTPd is different from
-   other webservers in that it runs from within the Linux-kernel as a module
-   (device-driver).
-
-   kHTTPd handles only static (file based) web-pages, and passes all requests
-   for non-static information to a regular userspace-webserver such as Apache or
-   Zeus. The userspace-daemon doesn't have to be altered in any way.
-
-   Static web-pages are not a very complex thing to serve, but these are very
-   important nevertheless, since virtually all images are static, and a large
-   portion of the html-pages are static also. A "regular" webserver has little
-   added value for static pages, it is simply a "copy file to network"-operation.
-   This can be done very efficiently from within the Linux-kernel, for example
-   the nfs (network file system) daemon performs a similar task and also runs
-   in the kernel.
-
-   By "accelerating" the simple case within the kernel, userspace daemons can
-   do what they are very good at: Generating user-specific, dynamic content.
-
-   Note: This document sometimes uses "Apache" instead of "any webserver you
-   ever might want to use", just for reasons of readability.
-  
-
-2. Quick Start  
---------------
-
-   1) compile and load the module
-   2) configure the module in /proc/sys/net/khttpd if needed
-   3) echo 1 > /proc/sys/net/khttpd/start
-
-   unloading:
-
-   echo 1 > /proc/sys/net/khttpd/stop
-   echo 1 > /proc/sys/net/khttpd/unload
-   rmmod khttpd
-  
-
-
-3. Configuration
-----------------
-
-   Modes of operation
-   ==================
-
-
-   There are two recommended modes of operation:
-
-   1) "Apache" is main webserver, kHTTPd is assistant
-       clientport   -> 80
-       serverport   -> 8080 (or whatever)
-
-   2) kHTTPd is main webserver, "Apache" is assistant
-       clientport   -> 8080 (or whatever)
-       serverport   -> 80
-
-  
-   Configuring kHTTPd
-   ==================
-
-   Before you can start using kHTTPd, you have to configure it. This
-   is done through the /proc filesystem, and can thus be done from inside
-   a script. Most parameters can only be set when kHTTPd is not active.
-
-   The following things need configuration:
-
-   1) The port where kHTTPd should listen for requests
-   2) The port (on "localhost") where "Apache" is listening
-   3) The location of the documents (documentroot)
-   4) The strings that indicate dynamic content (optional)
-      [  "cgi-bin" is added by default ]
-
-   It is very important that the documentroot for kHTTPd matches the
-   documentroot for the userspace-daemon, as kHTTPd might "redirect"
-   any request to this userspace-daemon.
-
-   A typical script (for the first mode of operation) to do this would
-   look like:
-
-#!/bin/sh
-modprobe khttpd
-echo 80 > /proc/sys/net/khttpd/clientport
-echo 8080 > /proc/sys/net/khttpd/serverport
-echo /var/www > /proc/sys/net/khttpd/documentroot
-echo php3 > /proc/sys/net/khttpd/dynamic
-echo shtml > /proc/sys/net/khttpd/dynamic
-echo 1 > /proc/sys/net/khttpd/start
-
-   For the second mode of operation, this would be:
-
-#!/bin/sh
-modprobe khttpd
-echo 8080 > /proc/sys/net/khttpd/clientport
-echo 80 > /proc/sys/net/khttpd/serverport
-echo /var/www > /proc/sys/net/khttpd/documentroot
-echo php3 > /proc/sys/net/khttpd/dynamic
-echo shtml > /proc/sys/net/khttpd/dynamic
-echo 1 > /proc/sys/net/khttpd/start
-
-   In this case, you also have to change the configuration of the
-   userspace-daemon. For Apache, you do this by changing
-
-   Port 80
-
-   to
-
-   Port 8080
-
-
-  
-   Stopping kHTTPd
-   ===============
-   In order to change the configuration, you should stop kHTTPd by typing
-   echo 1 > /proc/sys/net/khttpd/stop
-   on a command-prompt.
-
-   If you want to unload the module,
...

read more »

 
 
 

khttpd rotten?

Post by Roy Sigurd Karlsbak » Tue, 07 May 2002 23:20:08


Quote:> Right.  If khttpd had been pulled from 2.4.17, I would have
> had weeks of warning that khttpd is unstable; instead, I learned
> only when someone started doing his own stress testing, and I
> have little time to fix it.  I say pull it from
> 2.4.19-pre9.  Marcello, put it out of its misery asap, please...
> it'd time for khttpd to become a standalone patch again.
> - Dan

Hi all

Perhaps it's about time to talk about pulling Tux into the main kernel
tree, as khttpd once again has proved ususable.

roy

--
Roy Sigurd Karlsbakk, Datavaktmester

Computers are like air conditioners.
They stop working when you open Windows.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

khttpd rotten?

Post by Andy Carlso » Wed, 08 May 2002 01:10:11



> Perhaps it's about time to talk about pulling Tux into the main kernel
> tree, as khttpd once again has proved ususable.

Do the userspace tools still depend on Redhat or a derivative?  If this
is true, I would say that Tux should stay out of the kernel.  It is
aggravating when you want to try something new, and run into
dependencies on specific distros.

--
Andy Carlson                                    |\      _,,,---,,_

Cat Pics: http://andyc.dyndns.org/animal.html  |,4-  ) )-,_. ,\ (  `'-'
St. Louis, Missouri                           '---''(_/--'  `-'\_)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

khttpd rotten?

Post by Dan Kege » Wed, 08 May 2002 02:30:06



> Perhaps it's about time to talk about pulling Tux into the main kernel
> tree, as khttpd once again has proved ususable.

Hang on a minute -- I posted a patch that makes khttpd usable
again, I think...
- Dan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
 
 
 

khttpd rotten?

Post by Luigi Genon » Wed, 08 May 2002 02:30:16


Oh well, I suppose I should be sorry. I have been using khttpd
since more than 1 year, and it was well working for me...

On Mon, 6 May 2002, Christoph Hellwig wrote:
> On Sun, May 05, 2002 at 07:39:42PM -0700, Dan Kegel wrote:
> > > We are going to pull it from the kernel.

> > Right.  If khttpd had been pulled from 2.4.17, I would have
> > had weeks of warning that khttpd is unstable; instead, I learned
> > only when someone started doing his own stress testing, and I
> > have little time to fix it.  I say pull it from
> > 2.4.19-pre9.  Marcello, put it out of its misery asap, please...
> > it'd time for khttpd to become a standalone patch again.

> Okay, what about the following:

>  - the below patch remove khttpd from 2.4.19-pre, but lets the
>    sysctls in so it can compile out-of-tree
>  - http://verein.lst.de/~hch/khttpd/khttpd-20020506.tar.gz has a tarball
>    with khttpd as of 2.4.19-pre8, a simple makefile to build it and
>    a simple patch to allow loading it when CONFIG_IPV6 != m,
>    Arjan, could you please put it on the official khttpd website if one
>    still exists.
>  - for 2.5 the sysctls can go aswell

> diff -uNr -Xdontdiff linux-2.4.19-pre8/Documentation/Configure.help linux/Documentation/Configure.help
> --- linux-2.4.19-pre8/Documentation/Configure.help Fri May  3 23:02:47 2002
> +++ linux/Documentation/Configure.help     Mon May  6 13:05:24 2002
> @@ -5406,25 +5406,6 @@
>    say Y to "Kernel/User network link driver" and to "Routing
>    messages" instead.

> -Kernel httpd acceleration
> -CONFIG_KHTTPD
> -  The kernel httpd acceleration daemon (kHTTPd) is a (limited) web
> -  server built into the kernel. It is limited since it can only serve
> -  files from the file system and cannot deal with executable content
> -  such as CGI scripts. Serving files is sped up if you use kHTTPd.
> -  If kHTTPd is not able to fulfill a request, it can transparently
> -  pass it through to a user space web server such as apache.
> -
> -  Saying "M" here builds the kHTTPd module; this is NOT enough to have
> -  a working kHTTPd. For safety reasons, the module has to be activated
> -  by doing a "echo 1 > /proc/sys/net/khttpd/start" after inserting the
> -  module.
> -
> -  Before using this, read the README in net/khttpd !
> -
> -  The kHTTPd is experimental. Be careful when using it on a production
> -  machine. Also note that kHTTPd doesn't support virtual servers yet.
> -
>  The IPX protocol
>  CONFIG_IPX
>    This is support for the Novell networking protocol, IPX, commonly
> @@ -25233,7 +25214,7 @@
>  # LocalWords:  Unixware cymru Computone IntelliPort Intelliport computone SI sx
>  # LocalWords:  adbmouse DRI DRM dlabs GMX PLCs Applicom fieldbus applicom int
>  # LocalWords:  VWSND eg ESSSOLO CFU CFNR scribed eiconctrl eicon hylafax KFPU
> -# LocalWords:  EXTRAPREC fpu mainboards KHTTPD kHTTPd khttpd Xcelerator SBNI tw
> +# LocalWords:  EXTRAPREC fpu mainboards Xcelerator SBNI tw
>  # LocalWords:  LOGIBUSMOUSE Granch granch sbni Raylink NOHIGHMEM Athlon SIM sim
>  # LocalWords:  hpl Tourrilhes DuraLAN starfire Davicom davicom dmfe auk tms tr
>  # LocalWords:  TokenExpress Belkin Peracom eTek DVDs infradead Cxxx Adlib AV ZX
> diff -uNr -Xdontdiff linux-2.4.19-pre8/Makefile linux/Makefile
> --- linux-2.4.19-pre8/Makefile     Fri May  3 23:02:46 2002
> +++ linux/Makefile Mon May  6 13:05:36 2002
> @@ -214,8 +214,6 @@
>    drivers/scsi/aic7xxx/aicasm/aicdb.h \
>    drivers/scsi/aic7xxx/aicasm/y.tab.h \
>    drivers/scsi/53c700_d.h \
> -  net/khttpd/make_times_h \
> -  net/khttpd/times.h \
>    submenu*
>  # directories removed with 'make clean'
>  CLEAN_DIRS = \
> diff -uNr -Xdontdiff linux-2.4.19-pre8/include/linux/sysctl.h linux/include/linux/sysctl.h
> --- linux-2.4.19-pre8/include/linux/sysctl.h       Fri May  3 23:02:46 2002
> +++ linux/include/linux/sysctl.h   Mon May  6 13:06:25 2002
> @@ -487,6 +487,8 @@
>  };

>  /* /proc/sys/net/khttpd/ */
> +/* khttpd has been removed from the main kernel.
> +   please keep this to allow out-of-tree compilation for 2.4.  --hch */
>  enum {
>    NET_KHTTPD_DOCROOT      = 1,
>    NET_KHTTPD_START        = 2,
> diff -uNr -Xdontdiff linux-2.4.19-pre8/net/Config.in linux/net/Config.in
> --- linux-2.4.19-pre8/net/Config.in        Fri May  3 13:36:27 2002
> +++ linux/net/Config.in    Mon May  6 12:54:18 2002
> @@ -26,9 +26,6 @@
>     source net/ipv6/Config.in
>        fi
>     fi
> -   if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
> -      source net/khttpd/Config.in
> -   fi
>  fi
>  if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
>     bool 'Asynchronous Transfer Mode (ATM) (EXPERIMENTAL)' CONFIG_ATM
> diff -uNr -Xdontdiff linux-2.4.19-pre8/net/Makefile linux/net/Makefile
> --- linux-2.4.19-pre8/net/Makefile Fri May  3 13:37:42 2002
> +++ linux/net/Makefile     Mon May  6 12:54:10 2002
> @@ -26,7 +26,6 @@
>  endif
>  endif

> -subdir-$(CONFIG_KHTTPD)           += khttpd
>  subdir-$(CONFIG_PACKET)           += packet
>  subdir-$(CONFIG_NET_SCHED)        += sched
>  subdir-$(CONFIG_BRIDGE)           += bridge
> diff -uNr -Xdontdiff linux-2.4.19-pre8/net/khttpd/Config.in linux/net/khttpd/Config.in
> --- linux-2.4.19-pre8/net/khttpd/Config.in Fri May  3 13:36:06 2002
> +++ linux/net/khttpd/Config.in     Thu Jan  1 01:00:00 1970
> @@ -1,4 +0,0 @@
> -#
> -# kHTTPd
> -#
> -tristate '  Kernel httpd acceleration (EXPERIMENTAL)' CONFIG_KHTTPD
> diff -uNr -Xdontdiff linux-2.4.19-pre8/net/khttpd/Makefile linux/net/khttpd/Makefile
> --- linux-2.4.19-pre8/net/khttpd/Makefile  Fri May  3 13:38:44 2002
> +++ linux/net/khttpd/Makefile      Thu Jan  1 01:00:00 1970
> @@ -1,25 +0,0 @@
> -#
> -# Makefile for kHTTPd
> -#
> -# Note! Dependencies are done automagically by 'make dep', which also
> -# removes any old dependencies. DON'T put your own dependencies here
> -# unless it's something special (ie not a .c file).
> -#
> -# Note 2! The CFLAGS definition is now in the main makefile...
> -
> -O_TARGET := khttpd.o
> -
> -obj-m :=  $(O_TARGET)
> -obj-y :=  main.o accept.o datasending.o logging.o misc.o rfc.o rfc_time.o security.o \
> -          sockets.o sysctl.o userspace.o waitheaders.o
> -
> -
> -include $(TOPDIR)/Rules.make
> -
> -rfc_time.o: times.h
> -
> -make_times_h: make_times_h.c
> -  $(HOSTCC) $(HOSTCFLAGS) -o make_times_h make_times_h.c
> -
> -times.h: make_times_h
> -  ./make_times_h
> diff -uNr -Xdontdiff linux-2.4.19-pre8/net/khttpd/README linux/net/khttpd/README
> --- linux-2.4.19-pre8/net/khttpd/README    Fri May  3 13:35:57 2002
> +++ linux/net/khttpd/README        Thu Jan  1 01:00:00 1970
> @@ -1,224 +0,0 @@
> -=====
> -
> -kHTTPd  -  Kernel httpd accelerator
> -
> -(C) 1999 by Arjan van de Ven
> -Licensed under the terms of the GNU General Public License
> -
> -=====
> -
> -
> -1. Introduction
> ----------------
> -   kHTTPd is a http-daemon (webserver) for Linux. kHTTPd is different from
> -   other webservers in that it runs from within the Linux-kernel as a module
> -   (device-driver).
> -
> -   kHTTPd handles only static (file based) web-pages, and passes all requests
> -   for non-static information to a regular userspace-webserver such as Apache or
> -   Zeus. The userspace-daemon doesn't have to be altered in any way.
> -
> -   Static web-pages are not a very complex thing to serve, but these are very
> -   important nevertheless, since virtually all images are static, and a large
> -   portion of the html-pages are static also. A "regular" webserver has little
> -   added value for static pages, it is simply a "copy file to network"-operation.
> -   This can be done very efficiently from within the Linux-kernel, for example
> -   the nfs (network file system) daemon performs a similar task and also runs
> -   in the kernel.
> -
> -   By "accelerating" the simple case within the kernel, userspace daemons can
> -   do what they are very good at: Generating user-specific, dynamic content.
> -
> -   Note: This document sometimes uses "Apache" instead of "any webserver you
> -   ever might want to use", just for reasons of readability.
> -
> -
> -2. Quick Start
> ---------------
> -
> -   1) compile and load the module
> -   2) configure the module in /proc/sys/net/khttpd if needed
> -   3) echo 1 > /proc/sys/net/khttpd/start
> -
> -   unloading:
> -
> -   echo 1 > /proc/sys/net/khttpd/stop
> -   echo 1 > /proc/sys/net/khttpd/unload
> -   rmmod khttpd
> -
> -
> -
> -3. Configuration
> -----------------
> -
> -   Modes of operation
> -   ==================
> -
> -
> -   There are two recommended modes of operation:
> -
> -   1) "Apache" is main webserver, kHTTPd is assistant
> -  clientport   -> 80
> -          serverport   -> 8080 (or whatever)
> -
> -   2) kHTTPd is main webserver, "Apache" is assistant
> -  clientport   -> 8080 (or whatever)
> -  serverport   -> 80
> -
> -
> -   Configuring kHTTPd
> -   ==================
> -
> -   Before you can start using kHTTPd, you have to configure it. This
> -   is done through the /proc filesystem, and can thus be done from inside
> -   a script. Most parameters can only be set when kHTTPd is not active.
> -
> -   The following things need configuration:
> -
> -   1) The port where kHTTPd should listen for requests
> -   2) The port (on "localhost") where "Apache" is listening
> -   3) The location of the documents (documentroot)
> -   4) The strings that indicate dynamic content (optional)
> -      [  "cgi-bin" is added by default ]
> -
> -   It is very important that the documentroot for kHTTPd matches the
> -   documentroot for the userspace-daemon, as kHTTPd might "redirect"
> -   any request to this userspace-daemon.
> -
> -   A typical script (for the first mode of operation) to do this would
> -   look like:
> -
> -#!/bin/sh
> -modprobe khttpd
> -echo 80 > /proc/sys/net/khttpd/clientport
> -echo 8080 > /proc/sys/net/khttpd/serverport
> -echo /var/www > /proc/sys/net/khttpd/documentroot
> -echo php3 > /proc/sys/net/khttpd/dynamic
> -echo shtml > /proc/sys/net/khttpd/dynamic
> -echo 1 > /proc/sys/net/khttpd/start
> -
> -   For the second mode of operation, this would be:
> -
> -#!/bin/sh
> -modprobe khttpd
> -echo 8080 >

...

read more »

 
 
 

khttpd rotten?

Post by John Stoffe » Wed, 08 May 2002 03:50:06


Roy> Perhaps it's about time to talk about pulling Tux into the main
Roy> kernel tree, as khttpd once again has proved ususable.

And why does a Web server belong in the kernel?  I've never understood
this, and I personally do not think it has any need to be there.  

<sarcasm>

Or maybe we should include kDNS and kftpd as well now?

</sarcasm>

An httpd server is a *user space* issue, not a kernel issue.

John
   John Stoffel - Senior Unix Systems Administrator - Lucent Technologies

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

khttpd rotten?

Post by Diego Callej » Wed, 08 May 2002 04:10:07


On Mon, 6 May 2002 14:42:08 -0400

Quote:> And why does a Web server belong in the kernel?  I've never understood
> this, and I personally do not think it has any need to be there.  

But *f I have a dedicated web server, and I have a lot of traffic, *if* (and only if)
 I can take some performance advantages
from putting a web server into kernel space, I'd like to have those advantages.

Quote:

> <sarcasm>

> Or maybe we should include kDNS and kftpd as well now?

Why not for dedicated servers if this can take some advantages for them?

Quote:

> </sarcasm>

> An httpd server is a *user space* issue, not a kernel issue.

It's true. But I'd be an idiot if I can improve performance and I don't do it.

However, if an httpd can be as fast as an kernel space httpd it'd be a bad thing to put it
in kernel space.

> John
>    John Stoffel - Senior Unix Systems Administrator - Lucent Technologies

> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
 
 
 

khttpd rotten?

Post by Cort Douga » Wed, 08 May 2002 04:30:08


I put MPI in the kernel and got a huge performance advantage from it.  I
think that was a valuable idea and the results show that's definitely the
case.  I don't think the argument could ever be made that it belongs in the
main kernel, though.  A separate project with a loadable module is
definitely the way to go for these things.

"Keep that out of my kernel" is an old operating system design adage that
isn't paid attention to enough.

Quote:} > An httpd server is a *user space* issue, not a kernel issue.
}
} It's true. But I'd be an idiot if I can improve performance and I don't do it.
}
} However, if an httpd can be as fast as an kernel space httpd it'd be a bad thing to put it
} in kernel space.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/