Comparing perfs of two python interpreters on the same Linux machine (for Zope)

V

Vbfoo Bar

Hello,

To implement a Zope intranet on a linux RedHat ES 3, I had to
install a Python 2.3.4 that I have compiled myself.

I would like to compare the respective performance of this
python interpreter and that of the Python provided by RedHat
(just a little bench program would be sufficient) as I suspect
the binary Python 2.3.4 (or just the Zope?) I have produced is
very inefficient (very very slow!).

Additional info below. Thanks by advance for your advice.

The python binaries on my machine:
==================================
The python that comes with RedHat ES 3 (this is a Python 2.2.3):
-rwxr-xr-x 2 root root 795584 Aug 8 2003 /usr/bin/python

The python I have compiled myself (Python 2.3.4, required and used
by Zope/plone):
-rwxr-xr-x 1 root root 2265733 Jun 25 14:58
/usr/local/bin/python2.3

(Note that the binary sizes are very different: is this suspect?)

How I produced my (apparently inefficient binaries):
====================================================
For python:
[root# wget http://www.python.org/ftp/python/2.3.4/Python-2.3.4.tgz
[root# ./configure
[root# make ; make install

For zope:
$ ./configure --prefix=/usr/local/zope-2.7.1-0
--with-python=/usr/local/bin/python2.3
$ make
$ make install
 
B

Benjamin Niemann

Vbfoo said:
Hello,

To implement a Zope intranet on a linux RedHat ES 3, I had to
install a Python 2.3.4 that I have compiled myself.

I would like to compare the respective performance of this
python interpreter and that of the Python provided by RedHat
(just a little bench program would be sufficient) as I suspect
the binary Python 2.3.4 (or just the Zope?) I have produced is
very inefficient (very very slow!).

Additional info below. Thanks by advance for your advice.

The python binaries on my machine:
==================================
The python that comes with RedHat ES 3 (this is a Python 2.2.3):
-rwxr-xr-x 2 root root 795584 Aug 8 2003 /usr/bin/python

The python I have compiled myself (Python 2.3.4, required and used
by Zope/plone):
-rwxr-xr-x 1 root root 2265733 Jun 25 14:58
/usr/local/bin/python2.3

(Note that the binary sizes are very different: is this suspect?)

How I produced my (apparently inefficient binaries):
====================================================
For python:
[root# wget http://www.python.org/ftp/python/2.3.4/Python-2.3.4.tgz
[root# ./configure
[root# make ; make install

For zope:
$ ./configure --prefix=/usr/local/zope-2.7.1-0
--with-python=/usr/local/bin/python2.3
$ make
$ make install

The size difference is probably caused by debug informations (look the -g option
in the calls to cc and ln while compiling python). This should not cause any
difference in runtime performance.
The RedHat package probably uses non-default compiler options to tune
performance. You could fetch the source rpm for RedHats Python, build it (what
ever tool you need to build binaries from srpm.. I use Debian ;) and look for
options used by RedHat. Apply them when you configure your python
CGLAGS="-O2 -march=i686 -omit-framepointer" ./configure
(just an example from the very far back of my head, have not done C stuff for
quite a long time and the options probably look very different..)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top