From: <kra...@ca...> - 2002-12-14 19:53:23
|
Here's what I had to do to get mod_pubsub working under mod_perl, which used to speed it up by about an order of magnitude. 1. install mod_perl 2. ensure it's loaded by Apache; in httpd.conf, something like: LoadModule perl_module /usr/lib/apache/1.3/mod_perl.so 3. ensure the kn_events dir is writable by the apache user; for me, this was sudo chown -R www-data kn_events Joyce reports that making kn_events recursively world-writable seems to work too, but I don't recommend that. Some Apache setups might have to loosen up their AllowOverride restrictions on .htaccess files to get things to work; as an alternative, you can put the relevant bits from cgi-bin/.htaccess (which handle *.cgi with Apache::Registry) into your httpd.conf. So on my 300MHz laptop, pubsub_test.cgi now finishes in 104 seconds; before, running as an actual CGI script, it took 278 seconds. This dramatically understates the speed improvement of pubsub.cgi, though; it sleeps for 49 of those seconds, so it spends 53 seconds instead of 229 seconds doing things other than sleeping. Not as big a speedup as I'd hoped. Another thing to note: with mod_perl, my CPU loads stayed relatively low, while running mod_pubsub as a CGI script, my CPU load stayed at 100%. The mail sensor and replay tests didn't work for me at first; I'd copied the cgi-bin dir into my public_html dir, but I hadn't copied the kn_sense directory, and those tests use programs in kn_sense. Oh, and if you run out of disk space (easy to do --- each run of pubsub_test.cgi chomps 11 megs on my ext3fs!) the test suite tends to hang. Dunno why that happens. In Mozilla, kn_apps/ping2 reports an average ping time of 766 ms, which seems outrageously horrible to me, and 13 Hz event throughput. Without mod_perl, I get an average ping time of 1909 ms and 14.7 Hz event throughput. Ben suggested that maybe Mozilla's inherent slowness was causing the slowdown, so I tried the test with Netscape 4.7. Talking to the same server (using mod_perl, of course) over 802.11b, it got 276ms and 38Hz. Still seems slow to me. We should probably fix Mozilla. Hope this helps someone. -- <kr...@po...> Kragen Sitaker <http://www.pobox.com/~kragen/> Edsger Wybe Dijkstra died in August of 2002. The world has lost a great man. See http://advogato.org/person/raph/diary.html?start=252 and http://www.kode-fu.com/geek/2002_08_04_archive.shtml for details. |