<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.3" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: on Zope, multiple cores, and the GIL</title>
	<link>http://david.wglick.org/2010/on-zope-multiple-cores-and-the-gil/</link>
	<description></description>
	<pubDate>Fri, 30 Jul 2010 20:31:23 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>

	<item>
		<title>By: Musings on an Assortment of Subjects &#187; Blog Archive &#187; Using HAProxy with Zope via Buildout</title>
		<link>http://david.wglick.org/2010/on-zope-multiple-cores-and-the-gil/#comment-7316</link>
		<dc:creator>Musings on an Assortment of Subjects &#187; Blog Archive &#187; Using HAProxy with Zope via Buildout</dc:creator>
		<pubDate>Wed, 20 Jan 2010 07:14:56 +0000</pubDate>
		<guid>http://david.wglick.org/2010/on-zope-multiple-cores-and-the-gil/#comment-7316</guid>
		<description>[...] my post on reducing GIL contention by using fewer Zope threads, Lee Joramo asked for more information on setting up HAProxy, so let me share my configuration. [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] my post on reducing GIL contention by using fewer Zope threads, Lee Joramo asked for more information on setting up HAProxy, so let me share my configuration. [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lee Joramo</title>
		<link>http://david.wglick.org/2010/on-zope-multiple-cores-and-the-gil/#comment-7300</link>
		<dc:creator>Lee Joramo</dc:creator>
		<pubDate>Mon, 18 Jan 2010 17:14:32 +0000</pubDate>
		<guid>http://david.wglick.org/2010/on-zope-multiple-cores-and-the-gil/#comment-7300</guid>
		<description>David, Thanks for the data. Your 'before' chart looks rather the current charts for several of my servers. I have been planning to check out HAProxy since seeing Elizabeth Leddy's presentation at the Plone 2009 Conference in Budapest http://www.slideshare.net/eleddy/unloading-plone Your data really helps me see that I need to invest the time in this approach.

HAProxy looks a little daunting. Do you have any advice or configuration files that you can share?</description>
		<content:encoded><![CDATA[<p>David, Thanks for the data. Your &#8216;before&#8217; chart looks rather the current charts for several of my servers. I have been planning to check out HAProxy since seeing Elizabeth Leddy&#8217;s presentation at the Plone 2009 Conference in Budapest <a href="http://www.slideshare.net/eleddy/unloading-plone" rel="nofollow">http://www.slideshare.net/eleddy/unloading-plone</a> Your data really helps me see that I need to invest the time in this approach.</p>
<p>HAProxy looks a little daunting. Do you have any advice or configuration files that you can share?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurence Rowe</title>
		<link>http://david.wglick.org/2010/on-zope-multiple-cores-and-the-gil/#comment-7298</link>
		<dc:creator>Laurence Rowe</dc:creator>
		<pubDate>Mon, 18 Jan 2010 14:43:02 +0000</pubDate>
		<guid>http://david.wglick.org/2010/on-zope-multiple-cores-and-the-gil/#comment-7298</guid>
		<description>When configuring HAProxy it's important to remember that traffic is not only served by Zope's threads but also by filestream iterators As Blob and skin resource images get served by filestream iterators outside of the thread, think carefully before setting 'maxconn 1' on your backend server. FWIW, I'm no longer convinced you get much benefit from cache affinity on individual zope servers unless you have complex membrane or possibly ldap users. There's a lot to be said for just using varnish's inbuilt load balancing.</description>
		<content:encoded><![CDATA[<p>When configuring HAProxy it&#8217;s important to remember that traffic is not only served by Zope&#8217;s threads but also by filestream iterators As Blob and skin resource images get served by filestream iterators outside of the thread, think carefully before setting &#8216;maxconn 1&#8242; on your backend server. FWIW, I&#8217;m no longer convinced you get much benefit from cache affinity on individual zope servers unless you have complex membrane or possibly ldap users. There&#8217;s a lot to be said for just using varnish&#8217;s inbuilt load balancing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hanno Schlichting</title>
		<link>http://david.wglick.org/2010/on-zope-multiple-cores-and-the-gil/#comment-7295</link>
		<dc:creator>Hanno Schlichting</dc:creator>
		<pubDate>Mon, 18 Jan 2010 10:34:10 +0000</pubDate>
		<guid>http://david.wglick.org/2010/on-zope-multiple-cores-and-the-gil/#comment-7295</guid>
		<description>Did you have the obligatory "zope-conf-additional = python-check-interval 1000" line in your instance configs? Or did you use the Python default of 100?

With the default you get much more trashing, but with a setting like 1000 ticks you usually get that under control.</description>
		<content:encoded><![CDATA[<p>Did you have the obligatory &#8220;zope-conf-additional = python-check-interval 1000&#8243; line in your instance configs? Or did you use the Python default of 100?</p>
<p>With the default you get much more trashing, but with a setting like 1000 ticks you usually get that under control.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Hamilton</title>
		<link>http://david.wglick.org/2010/on-zope-multiple-cores-and-the-gil/#comment-7294</link>
		<dc:creator>Matt Hamilton</dc:creator>
		<pubDate>Mon, 18 Jan 2010 10:33:37 +0000</pubDate>
		<guid>http://david.wglick.org/2010/on-zope-multiple-cores-and-the-gil/#comment-7294</guid>
		<description>If you want to see some older info on this, take a look at the report I did back in 2002 on Zope's performance on Solaris:

http://www.zope.org/Members/glpb/solaris

This was mainly looking at Solaris's different threading systems. The default threading back then was NxM in which they mapped N userspace threads to M kernel processes. This was due to kernel process context switches being that much heavier on Solaris (maybe due to massive multi-processor designs).

They have now by default switched to what is referred in that report as the 'alternate threading model' which mapped user threads 1 to 1 to kernel processes. This worked better for Zope as it meant the OS could schedule the threads better. In the case of Solaris there was also issues with not just the GIL but locks on I/O that could end up with deadlocks on the NxM threading model.

I guess what you are seeing now is really an extension of that same issue, but with zope threads and cores replacing the OS threads and processes in that report.

Another thing that I've not seem mentioned at all in recent years is the python-check-interval setting in zope.conf. It used to be said that this was set too low for faster processors and should be raised. I was going to say, I don't even know if that setting still exists, but a quick search and of course Jarn are on the ball as usual:

http://pypi.python.org/pypi/jarn.checkinterval

-Matt</description>
		<content:encoded><![CDATA[<p>If you want to see some older info on this, take a look at the report I did back in 2002 on Zope&#8217;s performance on Solaris:</p>
<p><a href="http://www.zope.org/Members/glpb/solaris" rel="nofollow">http://www.zope.org/Members/glpb/solaris</a></p>
<p>This was mainly looking at Solaris&#8217;s different threading systems. The default threading back then was NxM in which they mapped N userspace threads to M kernel processes. This was due to kernel process context switches being that much heavier on Solaris (maybe due to massive multi-processor designs).</p>
<p>They have now by default switched to what is referred in that report as the &#8216;alternate threading model&#8217; which mapped user threads 1 to 1 to kernel processes. This worked better for Zope as it meant the OS could schedule the threads better. In the case of Solaris there was also issues with not just the GIL but locks on I/O that could end up with deadlocks on the NxM threading model.</p>
<p>I guess what you are seeing now is really an extension of that same issue, but with zope threads and cores replacing the OS threads and processes in that report.</p>
<p>Another thing that I&#8217;ve not seem mentioned at all in recent years is the python-check-interval setting in zope.conf. It used to be said that this was set too low for faster processors and should be raised. I was going to say, I don&#8217;t even know if that setting still exists, but a quick search and of course Jarn are on the ball as usual:</p>
<p><a href="http://pypi.python.org/pypi/jarn.checkinterval" rel="nofollow">http://pypi.python.org/pypi/jarn.checkinterval</a></p>
<p>-Matt</p>
]]></content:encoded>
	</item>
</channel>
</rss>
