Hello John,
I'm running a Zope-application (2.5.1, Python 2.1.3) on a dual processor (1 GB mem) Redhat 7.3 machine. User-authentication is done by the exUserFolder-product (on Postgresql 7.2.1). An apache-server runs in front of the Zope server.
Now for the problem/questions. Problem: unacceptable performance with 200 requests/sec. Questions: - which steps can be taken to improve performance ? for the moment 6 child processes are running which each use 60 MB of memory (?isn't this alot) ; increasing the number of threads will probably help, but if each thread will probably use 60 MB - how good is the smp-support of Zope (Python) ?
You have a dual processor machine, to double your speed use ZEO. Python doesn't use the second Processor. (see GIL Tread on comp.lang.python) Use the cacheing of user Information in the exUserFolder. (reduces access to postgresql DB) Look at your object, how long they take to run. Search the one that is slow and speed it up. A usefull Product to get execution times is Call Profile: http://www.zope.org/Members/richard/CallProfiler Use Caches if its possible. If you have a lot static content, you can use squid as a proxy cache in front of Zope. http://www.squid-cache.org Hope it helps a little bit. bye by Wolfgang
On Mon, Oct 28, 2002 at 02:31:55PM +0100, Wolfgang Langner wrote:
Python doesn't use the second Processor. (see GIL Tread on comp.lang.python)
Yes it does. It just doesn't make *good* use of it - in fact performance is likely to be worse than on a uniprocessor machine, as the python process may frequently bounce from one processor to another. Read that thread again. What's needed is a way to *prevent* python from using more than one processor, so you can run one (or more) instances of Zope per processor and bind them to that processor. This depends on the OS. IIRC Solaris can do this, but Linux out-of-the-box cannot. --PW -- Paul Winkler http://www.slinkp.com "Welcome to Muppet Labs, where the future is made - today!"
Paul Winkler wrote:
[Regarding Python's use of multiple CPUs]
Yes it does. It just doesn't make *good* use of it - in fact performance is likely to be worse than on a uniprocessor machine, as the python process may frequently bounce from one processor to another. Read that thread again.
Correct. What the GIL does in an MP environment is add latency. The effect can be as much as 30% for Zope, in my experience. Very little of Zope can concurrently dispatch on multiple CPUs -- the major exception being IO. Since IO normally would block and suspend the thread doing it anyway, you don't get much benefit.
What's needed is a way to *prevent* python from using more than one processor, so you can run one (or more) instances of Zope per processor and bind them to that processor. This depends on the OS. IIRC Solaris can do this, but Linux out-of-the-box cannot.
--PW
Linux actually does have a processor dispatch mask. To the best of my knowledge it is only used for interrupt handers that need to be CPU bound. Linux provides no facility to set this mask, although I have seen patches that will allow you to set it via /proc. -- Matt Kromer Zope Corporation http://www.zope.com/
What's needed is a way to *prevent* python from using more than one processor, so you can run one (or more) instances of Zope per processor and bind them to that processor. This depends on the OS. IIRC Solaris can do this, but Linux out-of-the-box cannot.
Linux actually does have a processor dispatch mask. To the best of my knowledge it is only used for interrupt handers that need to be CPU bound. Linux provides no facility to set this mask, although I have seen patches that will allow you to set it via /proc.
Redhat Advanced Server seems to have support for this...? http://www.redhat.com/software/advancedserver/technical/ -- /Magnus
OK. So now i'm concerned too. I have almost an identical setup for Zope (RedHat 6.2, Dual 867Mhz PIIs with 1GB ram) - majority of the content in ZODB. I am running two zope instances, albiet without ZEO, and my performance is timid to say the least - I've always suspected it's image heavy pages and excessive use of javascript (don't ask). But the call profiler reports 1/2 second generation times for pages on average, the pages take 4-5 seconds to load in the browser over a T1. Can anyone point me to how to setup apache to cache zope pages? I am using proxy passing (mod_rewrite) currently, but I suspect it's not caching. -jim ----- Original Message ----- From: "Magnus Heino" <magnus.heino@pleon.sigma.se> To: <Zope@zope.org> Sent: Monday, October 28, 2002 10:25 AM Subject: Re: [Zope] performance issues
What's needed is a way to *prevent* python from using more than one processor, so you can run one (or more) instances of Zope per processor and bind them to that processor. This depends on the OS. IIRC Solaris can do this, but Linux out-of-the-box cannot.
Linux actually does have a processor dispatch mask. To the best of my knowledge it is only used for interrupt handers that need to be CPU bound. Linux provides no facility to set this mask, although I have seen patches that will allow you to set it via /proc.
Redhat Advanced Server seems to have support for this...? http://www.redhat.com/software/advancedserver/technical/ -- /Magnus _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (5)
-
Jim Kutter -
Magnus Heino -
Matthew T. Kromer -
Paul Winkler -
Wolfgang Langner