Sorry, I accidentally sent the previous response.
This should be a finished reply:
Okay, I was able to get FastCGI working. It required
two small changes to the code (diffs below). The
config is actually very simple, and preliminary tests
should a marked improvement in speed over WebKit.cgi.
Here's how I got FastCGI up and running - hopefully it
helps someone else:
1. The only change to httpd.conf is to make sure
mod_fastcgi.so is loaded.
2. Modify .htaccess to tell apache to handle .fcgi
files with the fastcgi handler. This could be done in
httpd.conf as documented (using the extension or
Location based approach).
AddHandler fastcgi-script .fcgi
3. Start the AppServer as normal
4. The fastcgi module then takes care of starting
(it's in Dynamic mode) the python process for
FCGIAdapter, which communicates to the already started
AppServer.
Performance Tests:
Running the default context (Welcome), on a Duron 800
Linux machine 256M, tests run locally to the server.
ab -n 100 -c 2
WebKit.cgi:
11.67 req/sec
171.44 ms/req (mean)
85.72 ms/req (mean, across all concurrent requests)
FCGIAdapter.fcgi:
57.44 req/sec
34.82 ms/req (mean)
17.41 ms/req (mean, across all concurrent requests)
ab -n 1000 -c 5
WebKit.cgi:
11.57 req/sec
432.16 ms/req
86.43 ms/req (mean, across all concurrent requests)
FCGIAdapter.fcgi:
56.46 req/sec
88.56 ms/req (mean)
17.71 ms/req (mean, across all concurrent requests)
I'm not sure how real world accurate these results
are, but they show results of 5x as fast, so
definately worth doing for me. I'll have to see now
how mod_webkit compares for me, for curiosity sakes,
anyway.
Code Changes:
The changes were small
1. modify FCGIAdapter.py to add the WebKit dir to the
path
2. modify Adapter.py to clear the _respData at the
start of the transaction.
Cheers,
Wayne
--- ../../Webware/WebKit/FCGIAdapter.py 2002-10-25
16:56:40.000000000 -0600
+++ FCGIAdapter.fcgi 2002-10-28 11:36:36.000000000
-0600
@@ -88,12 +88,13 @@
+import sys
+import os
+sys.path.append(os.path.abspath(WebKitDir))
import fcgi, time
from marshal import dumps, loads
from socket import *
import string
-import os
-import sys
timestamp = time.time()
@@ -148,6 +149,7 @@
try:
# Transact with the app server
+ response = ""
response = self.transactWithAppServer(req.env,
req.inp.read(), host, port)
# deliver it!
--- Adapter_orig.py 2002-10-28 11:48:03.000000000
-0600
+++ Adapter.py 2002-10-28 11:40:43.000000000 -0600
@@ -29,6 +29,7 @@
Used by subclasses that are communicating with a
separate app server via
socket. Returns the unmarshaled response
dictionary.
"""
+ self._respData = ''
dict = {
'format': 'CGI',
'time': time.time(),
__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss