Orr, Steve
sorr at rightnow.com
Thu Aug 18 10:15:01 EDT 2005
I can't see that mod_python would be the problem. For a given request, what percentage of the overall response time is involved with database access versus code execution? You need to know that. I'd first try tuning the code before doing any web stuff. Especially tune the database queries and the network access to the database before going through the web server. Then setup database connection pooling so each page request reuses a connection instead of establishing a new connection with each page turn. Can you do some kind of session management to avoid repop'ing "the container" with each page turn? Using ab I did some bench marking a year ago and with an old, cheap Dell 2GHz PC with 512M RAM as the web server I was able to get 750 page turns per second. The database was Oracle and I used the connection pooling feature that comes with cx_Oracle on the OCI. (A persistent connection can be established for each Apache process so this isn't really necessary.) I also reused cursors to avoid the parsing overhead. (Besides doing web development I'm a DBA dweeb.) Without mod_python and connection pooling it got as slow as 11 requests per second. Of course my benchmarking was doing simple stuff but I was satisfied that Apache/mod_python would perform well and I wouldn't have to go down a "Twisted" path. Don't know anything about dbxml but you should address the architecture/code first. If performance is really a big issue then consider load balanced web servers and a good disk array setup on the db server. Steve Orr -----Original Message----- From: mod_python-bounces at modpython.org [mailto:mod_python-bounces at modpython.org] On Behalf Of IGP Sent: Wednesday, August 17, 2005 11:01 PM To: xml at sleepycat.com; mod_python at modpython.org Subject: [mod_python] Performance Problem I am accessing dbxml via my mod-python handler. The dbxml manager instance is created , the container is opened and the required operation is performed(querying , geting a document ) for each client request . This is affecting the performance . Is there any way to enhance the performance ? I mean that the XmlManager instance will be created only once , the container will be opened and the stored in memory , so that the response time will decrease . I am using following versions of software 1) dbxml - 2.1.8 2) python - 2.3.4 3) mod-python - 1.3.4 4) apache 2.0.52 5) Kernel version-2.6.9-5.0.5-EL Please do reply if you know the solution . Thanks in Advance, Regards, Ajinkya _______________________________________________ Mod_python mailing list Mod_python at modpython.org http://mailman.modpython.org/mailman/listinfo/mod_python
|