Priority of processes in Zope
Hi all Me again with my Solaris problems (threading, dtml and performance)... I've now checked on my threads. I've got 8 of them. Most have differing priorities and the same nice level. <snip> 8 S webuser 422 1 422 422 1 3 0 78 20 ? 764 ? 04:34:55 ? 0:00 /usr/local/bin/python /portal/ 8 S webuser 422 1 422 422 2 3 0 68 20 ? 764 ? 04:34:55 ? 0:00 /usr/local/bin/python /portal/ 8 S webuser 422 1 422 422 3 3 0 68 20 ? 764 ? 04:34:55 ? 0:00 /usr/local/bin/python /portal/ 8 S webuser 423 422 422 422 1 8 0 41 20 ? 2777 ? 04:34:55 ? 0:47 /usr/local/bin/python /portal/ 8 S webuser 423 422 422 422 2 8 0 46 20 ? 2777 ? 04:34:55 ? 0:00 /usr/local/bin/python /portal/ 8 S webuser 423 422 422 422 3 8 0 41 20 ? 2777 ? 04:34:55 ? 1:09 /usr/local/bin/python /portal/ 8 S webuser 423 422 422 422 4 8 0 46 20 ? 2777 ? 04:35:05 ? 0:31 /usr/local/bin/python /portal/ 8 S webuser 423 422 422 422 5 8 0 99 20 ? 2777 ? 10:24:42 ? 1:18 /usr/local/bin/python /portal/ 8 S webuser 423 422 422 422 6 8 0 41 20 ? 2777 ? 10:24:50 ? 0:19 /usr/local/bin/python /portal/ 8 S webuser 423 422 422 422 7 8 0 41 20 ? 2777 ? 10:24:50 ? 0:00 /usr/local/bin/python /portal/ 8 S webuser 423 422 422 422 8 8 0 41 20 ? 2777 ? 10:24:55 ? 0:00 /usr/local/bin/python /portal/ </snip> Can somebody on a Solaris Zope please call "ps -eflLj | grep python" and tell me if they have a similar result? I'm wondering about the thread with the PRIO=99. That's the thread doing all the work. Is that correct?? I don't suppose so. The other threads don't seem to work. Thanx a lot! Oliver Erlewein
On Tue, Feb 19, 2002 at 05:41:13PM +0100, oliver.erlewein@sqs.de wrote:
Me again with my Solaris problems (threading, dtml and performance)...
I've now checked on my threads. I've got 8 of them. Most have differing priorities and the same nice level.
<snip> 8 S webuser 422 1 422 422 1 3 0 78 20 ? 764 ? 04:34:55 ? 0:00 /usr/local/bin/python /portal/ 8 S webuser 422 1 422 422 2 3 0 68 20 ? 764 ? 04:34:55 ? 0:00 /usr/local/bin/python /portal/ 8 S webuser 422 1 422 422 3 3 0 68 20 ? 764 ? 04:34:55 ? 0:00 /usr/local/bin/python /portal/ 8 S webuser 423 422 422 422 1 8 0 41 20 ? 2777 ? 04:34:55 ? 0:47 /usr/local/bin/python /portal/ 8 S webuser 423 422 422 422 2 8 0 46 20 ? 2777 ? 04:34:55 ? 0:00 /usr/local/bin/python /portal/ 8 S webuser 423 422 422 422 3 8 0 41 20 ? 2777 ? 04:34:55 ? 1:09 /usr/local/bin/python /portal/ 8 S webuser 423 422 422 422 4 8 0 46 20 ? 2777 ? 04:35:05 ? 0:31 /usr/local/bin/python /portal/ 8 S webuser 423 422 422 422 5 8 0 99 20 ? 2777 ? 10:24:42 ? 1:18 /usr/local/bin/python /portal/ 8 S webuser 423 422 422 422 6 8 0 41 20 ? 2777 ? 10:24:50 ? 0:19 /usr/local/bin/python /portal/ 8 S webuser 423 422 422 422 7 8 0 41 20 ? 2777 ? 10:24:50 ? 0:00 /usr/local/bin/python /portal/ 8 S webuser 423 422 422 422 8 8 0 41 20 ? 2777 ? 10:24:55 ? 0:00 /usr/local/bin/python /portal/ </snip>
Can somebody on a Solaris Zope please call "ps -eflLj | grep python" and tell me if they have a similar result? I'm wondering about the thread with the PRIO=99. That's the thread doing all the work. Is that correct?? I don't suppose so. The other threads don't seem to work.
phd@sun 15 > ps -eflj | grep python 8 S www 251 239 0 0 0 99 20 60530680 555 605306f0 Jan 31 ? 0:01 /usr/local/bin/python /usr/local/Zo 8 S www 258 251 0 0 0 41 20 602b6660 2013 6007f76e Jan 31 ? 12:40 /usr/local/bin/python /usr/local/Zo (Solaris 2.5.1) Oleg. -- Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
oliver.erlewein@sqs.de wrote:
Hi all
Me again with my Solaris problems (threading, dtml and performance)...
I've now checked on my threads. I've got 8 of them. Most have differing priorities and the same nice level.
Can somebody on a Solaris Zope please call "ps -eflLj | grep python" and tell me if they have a similar result? I'm wondering about the thread with the PRIO=99. That's the thread doing all the work. Is that correct?? I don't suppose so. The other threads don't seem to work.
Thanx a lot! Oliver Erlewein
Hi Oliver, Threading priority is a dynamic computation by the Solaris scheduler -- the thread with the lower priorities are dispatched first -- but once you get dispatched your priority raises if you finish your timeslice without entering a wait state (well, that may be a simplification). Because Python is controlled by a large central lock, only one thread can be doing any useful work most of the time. There are exceptions to this rule, but most of Zope is compute-bound, not IO-bound. The net effect is that you rarely see more than a few threads in Zope doing work. More interesting to note is that the performance of Zope is pretty much linear with the results of the "pystone" benchmark. So, if you run python /usr/local/lib/python2.1/test/pystone.py you might get a number like blade(3)$ python /usr/local/lib/python2.1/test/pystone.py Pystone(1.1) time for 10000 passes = 1.77 This machine benchmarks at 5649.72 pystones/second That's my results on a SunBlade 100 (500 Mhz UltraSPARC IIe). Its worthwhile noting that I get the following result on a 500 Mhz Intel Celeron: djinn(12)$ python2.1 /usr/local/python-2.1.2/lib/python2.1/test/pystone.py Pystone(1.1) time for 10000 passes = 1.47 This machine benchmarks at 6802.72 pystones/second from which you may draw two conclusions: 1) Gcc on SPARC doesn't emit the best bytecodes, and 2) Intel CPUs run Python more cost-effectively than SPARC chipsets do. -- Matt Kromer Zope Corporation http://www.zope.com/
participants (3)
-
Matthew T. Kromer -
Oleg Broytmann -
oliver.erlewein@sqs.de