Revision 1.2 |
Revision 1.5 |
CoW was developed at the University of California, Davis by Takashi
Ishihara <ishihara@cs.ucdavis.edu> as part of his graduate research
on cooperative multithreading. It is now maintained by Matt Roper
<roper@cs.ucdavis.edu>.
|
CoW was originally developed at the University of California, Davis
by Takashi Ishihara <ishihara@cs.ucdavis.edu> as part of his graduate
research on cooperative multithreading. The project is now maintained
by Matt Roper <roper@cs.ucdavis.edu>. Please send all bug reports and
|
|
feature requests to Matt.
|
|
|
To use CoW, you will need to install a copy of the GNU Pth threading
library and patch it to include the pth_msgport_push() function. A
patch is provided in the file pthcow.diff in this distribution.
Future releases will probably include a stripped down copy of Pth
so that this step is not required.
|
CoW uses a slightly modified version of GNU Pth as its threading
library. A stripped down copy of Pth is included in the CoW
distribution and will be statically linked into the final executable;
it is no longer necessary to install and patch a separate copy of Pth.
The provided copy of Pth has been modified to include experimental
|
|
support for Linux 2.6's sys_epoll event notification mechanism. This
is likely to be less stable than the traditional select()-based event
notification, but it should also provide higher performance. To enable
the epoll-based event notification, pass the "--with-epoll" switch to
the configure program.
|
Installation steps:
|
Installation steps:
|
* apply pthcow.diff to your GNU Pth source
* build and install Pth
|
|
* ./configure * make
|
* ./configure * make
|
|
* make install
* edit /etc/cow.conf
The following command line switches are recognized by CoW:
-c <cfgfile>
Specifies the name and location of the CoW configuration
file. By default, CoW will search for a configuration file
at /etc/cow.conf, /usr/local/etc/cow.conf, and finally at
./cow.conf.
-d
Tells CoW not to background itself; generally only used
during debugging.
-r <serverroot>
Specifies the base document directory from which files
will be served. If this switch is present, it will override
the value of ServerRoot in the configuration file. If this
switch is not present and ServerRoot is not set in the config
file, the current directory will be the server root.
-p <serverport>
Specifies what TCP port the server should run on. This switch
overrides the ServerPort setting in the configuration file.
If this switch is not present and no value is set for
ServerPort in the configuration file, 8080 will be used.
-f <numprocs>
Tells CoW to fork off a total of <numprocs> processes. By
default CoW only uses a single process, but since operating systems
generally impose a 1024 file descriptor per process limit,
this option allows us to effectively multiply the number of
file descriptors available to CoW (and thus increase the
maximum possible concurrency). Do not confuse this forking
mechanism with Apache-style forking -- Apache uses one process
per request, but each CoW process can handle about 1000 simultaneous
requests.
-b <backlog>
This option is passed to the underlying listen() system call and
controls the number of pending connections allowed. You should
generally leave this option at its default value.
-v
This switch enables some extra console output during startup.
You probably won't need to use this unless your trying to
debug CoW.
|
Note: CoW is still in alpha, so there are probably bugs. If you have any questions, don't hesitate to send an email to roper@cs.ucdavis.edu. Send bug reports to the same address.
|
Note: CoW is still in alpha, so there are probably bugs. If you have any questions, don't hesitate to send an email to roper@cs.ucdavis.edu. Send bug reports to the same address.
|