Am Fre, 2002-07-26 um 16.46 schrieb Greg Ward:
> My timings, using ApacheBench with no concurrency (ie. one request at a
> time -- "ab -c 1"):
>
> demo.cgi 242 ms min, 261 ms mean, 642 ms max (100 requests)
> demo.fcgi 6 ms min, 6 ms mean, 24 ms max (500 requests)
Well, two things helped me:
1) #!/usr/bin/env python -> #!/usr/bin/python
saves about 200ms :)
2) find /usr/lib/python2.2/site-packages/quixote -type d |
xargs chmod a+w
Problem here is probably that setup.py (distutils) doesn't recognize
.ptl files, and so they are never compiled.
Now I'm down to
min mean[+/-sd] median max
Total: 344 435 82.4 421 766
for 100 requests (demo.cgi) (1 thread)
Compared to 1.8sec before :)
scaling your timings to 700MHz (assuming you also have an Duron), I'd
rather expect a mean of 300ms, but then I've got a laptop here.
One idea for faster startup might be generating a frozen python
specialized for quixote apps, so that the binary doesn't have to load
any additionaly modules from the filesystem.
> Eckhard Licher wrote:
> > There must be something terribly wrong with my setup. BTW, after
> > running the demo I did not find any byte-compiled ptlc files in demo
> > directory even after permitting the webserver to have write access to
> > the relevant directory and manually byte-compiling the ptl files in
> > the demo dir did not enhance the performance a bit.
Well, one important thing. Your demo is probably hosted under
/usr/lib/python*/site-packages/quixote/demo, not where your demo.cgi is.
Andreas