[Zope] why will python be using over 90% of CPU time ?
Dieter Maurer
dieter@handshake.de
Fri, 13 Dec 2002 22:55:30 +0100
Hamzat Kamal writes:
> I am running zope server 2.5.1, python 2.1.3. on RedHat Linux (latest
> ver).
> Ever before now I discovered that when the traffic to my site is high the
> python will be using 99.9% of the CPU usage constantly, and only using
> 300Mb of 772Mb of my bandwidth.
Depending on the complexity of your templates,
template rendering may be very CPU intensive.
> This make the site to be very slow and
> almost inaccessible to the visitors, infact it always bring down the zope
> server. But now I also found out that the python uses as much as 45-55% of
> the CPU usage when the traffic is redirected out of the zerver and been
> accessed by me alone.
Consider the various caching techniques (HTTP cache manager
with external HTTP cache (Squid); RAM cache manager).
> I need help from those that have better understanding of how the zope
> server works on what could have been the cause(s) and what can I do to
> sovle this problem.
Use profiling to understand the CPU costs associated with rendering.
You have two options:
* the "CallProfiler", a high level (template/script) profiling tool
(external, third party product)
* Zope's support for Python's profiling facility, exposed
via "Control_Panel --> Debug informaiton --> Profiling".
This is low level profiling (function call level).
Dieter