<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: MRI Ruby + MySQL + Threads == Stop the world&#8230; JRuby doesn&#8217;t</title>
	<atom:link href="http://blog.hungrymachine.com/2008/08/27/ruby-and-multi-threaded-mysql-mri-vs-jruby-jdbc-vs-dataobjects-mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.hungrymachine.com/2008/08/27/ruby-and-multi-threaded-mysql-mri-vs-jruby-jdbc-vs-dataobjects-mysql/</link>
	<description>The guys behind LivingSocial</description>
	<lastBuildDate>Mon, 08 Mar 2010 10:34:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: roger</title>
		<link>http://blog.hungrymachine.com/2008/08/27/ruby-and-multi-threaded-mysql-mri-vs-jruby-jdbc-vs-dataobjects-mysql/comment-page-1/#comment-166</link>
		<dc:creator>roger</dc:creator>
		<pubDate>Wed, 27 Aug 2008 15:04:00 +0000</pubDate>
		<guid isPermaLink="false">blog.hungrymachine.com/2008/11/13/ruby-and-multi-threaded-mysql-mri-vs-jruby-jdbc-vs-dataobjects-mysql#comment-166</guid>
		<description>Appears that MRI works with 1.8.6 if you do the following:
compile the oldmoe drivers, require them instead of the gem,

replace line 49:

    res = conn.query(sql_statement)

with

    conn.send_query(sql_statement)
    socket = IO.new(conn.socket)
    result = select([socket], nil, nil, nil)
    res = conn.get_result

=&gt; Multi-threaded: 1.0046272277832s</description>
		<content:encoded><![CDATA[<p>Appears that MRI works with 1.8.6 if you do the following:<br />
compile the oldmoe drivers, require them instead of the gem,</p>
<p>replace line 49:</p>
<p>    res = conn.query(sql_statement)</p>
<p>with</p>
<p>    conn.send_query(sql_statement)<br />
    socket = IO.new(conn.socket)<br />
    result = select([socket], nil, nil, nil)<br />
    res = conn.get_result</p>
<p>=&gt; Multi-threaded: 1.0046272277832s</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin Marney</title>
		<link>http://blog.hungrymachine.com/2008/08/27/ruby-and-multi-threaded-mysql-mri-vs-jruby-jdbc-vs-dataobjects-mysql/comment-page-1/#comment-167</link>
		<dc:creator>Justin Marney</dc:creator>
		<pubDate>Wed, 27 Aug 2008 15:04:00 +0000</pubDate>
		<guid isPermaLink="false">blog.hungrymachine.com/2008/11/13/ruby-and-multi-threaded-mysql-mri-vs-jruby-jdbc-vs-dataobjects-mysql#comment-167</guid>
		<description>I was curious on how the postgres benchmarks actually looked/worked so I added the ability to generate them to the test.

http://pastie.org/261782

jmarney:Desktop $ postgres=true ruby db_locking_test.rb

Loading MRI Postgres
Serial: Testing 4 iterations
  thread: #&lt;Thread:0x35700&gt; executing: select pg_sleep(1)
  thread: #&lt;Thread:0x35700&gt; executing: select pg_sleep(1)
  thread: #&lt;Thread:0x35700&gt; executing: select pg_sleep(1)
  thread: #&lt;Thread:0x35700&gt; executing: select pg_sleep(1)
Serial: 4.02708697319031s
Multi-threaded: Testing 4 iterations
  thread: #&lt;Thread:0x5229e8&gt; executing: select pg_sleep(1)
  thread: #&lt;Thread:0x522740&gt; executing: select pg_sleep(1)
  thread: #&lt;Thread:0x5224e8&gt; executing: select pg_sleep(1)
  thread: #&lt;Thread:0x5221f0&gt; executing: select pg_sleep(1)
Multi-threaded: 4.03514003753662s

jmarney:Desktop $ postgres=true async=true ruby db_locking_test.rb

Loading MRI Postgres
Serial: Testing 4 iterations
  thread: #&lt;Thread:0x35700&gt; executing: select pg_sleep(1)
  thread: #&lt;Thread:0x35700&gt; executing: select pg_sleep(1)
  thread: #&lt;Thread:0x35700&gt; executing: select pg_sleep(1)
  thread: #&lt;Thread:0x35700&gt; executing: select pg_sleep(1)
Serial: 4.02873086929321s
Multi-threaded: Testing 4 iterations
  thread: #&lt;Thread:0x522998&gt; executing: select pg_sleep(1)
  thread: #&lt;Thread:0x5226f0&gt; executing: select pg_sleep(1)
  thread: #&lt;Thread:0x522448&gt; executing: select pg_sleep(1)
  thread: #&lt;Thread:0x5221f0&gt; executing: select pg_sleep(1)
Multi-threaded: 1.02273917198181s

As oldmoe pointed out you have to use the async versions to get async benefits of postgres.</description>
		<content:encoded><![CDATA[<p>I was curious on how the postgres benchmarks actually looked/worked so I added the ability to generate them to the test.</p>
<p><a href="http://pastie.org/261782" rel="nofollow">http://pastie.org/261782</a></p>
<p>jmarney:Desktop $ postgres=true ruby db_locking_test.rb</p>
<p>Loading MRI Postgres<br />
Serial: Testing 4 iterations<br />
  thread: #&lt;Thread:0&#215;35700&gt; executing: select pg_sleep(1)<br />
  thread: #&lt;Thread:0&#215;35700&gt; executing: select pg_sleep(1)<br />
  thread: #&lt;Thread:0&#215;35700&gt; executing: select pg_sleep(1)<br />
  thread: #&lt;Thread:0&#215;35700&gt; executing: select pg_sleep(1)<br />
Serial: 4.02708697319031s<br />
Multi-threaded: Testing 4 iterations<br />
  thread: #&lt;Thread:0&#215;5229e8&gt; executing: select pg_sleep(1)<br />
  thread: #&lt;Thread:0&#215;522740&gt; executing: select pg_sleep(1)<br />
  thread: #&lt;Thread:0&#215;5224e8&gt; executing: select pg_sleep(1)<br />
  thread: #&lt;Thread:0&#215;5221f0&gt; executing: select pg_sleep(1)<br />
Multi-threaded: 4.03514003753662s</p>
<p>jmarney:Desktop $ postgres=true async=true ruby db_locking_test.rb</p>
<p>Loading MRI Postgres<br />
Serial: Testing 4 iterations<br />
  thread: #&lt;Thread:0&#215;35700&gt; executing: select pg_sleep(1)<br />
  thread: #&lt;Thread:0&#215;35700&gt; executing: select pg_sleep(1)<br />
  thread: #&lt;Thread:0&#215;35700&gt; executing: select pg_sleep(1)<br />
  thread: #&lt;Thread:0&#215;35700&gt; executing: select pg_sleep(1)<br />
Serial: 4.02873086929321s<br />
Multi-threaded: Testing 4 iterations<br />
  thread: #&lt;Thread:0&#215;522998&gt; executing: select pg_sleep(1)<br />
  thread: #&lt;Thread:0&#215;5226f0&gt; executing: select pg_sleep(1)<br />
  thread: #&lt;Thread:0&#215;522448&gt; executing: select pg_sleep(1)<br />
  thread: #&lt;Thread:0&#215;5221f0&gt; executing: select pg_sleep(1)<br />
Multi-threaded: 1.02273917198181s</p>
<p>As oldmoe pointed out you have to use the async versions to get async benefits of postgres.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: roger</title>
		<link>http://blog.hungrymachine.com/2008/08/27/ruby-and-multi-threaded-mysql-mri-vs-jruby-jdbc-vs-dataobjects-mysql/comment-page-1/#comment-168</link>
		<dc:creator>roger</dc:creator>
		<pubDate>Wed, 27 Aug 2008 15:04:00 +0000</pubDate>
		<guid isPermaLink="false">blog.hungrymachine.com/2008/11/13/ruby-and-multi-threaded-mysql-mri-vs-jruby-jdbc-vs-dataobjects-mysql#comment-168</guid>
		<description>Fascinatingly, it appears that the pure ruby mysql driver is also ruby thread friendly.  Go figure.</description>
		<content:encoded><![CDATA[<p>Fascinatingly, it appears that the pure ruby mysql driver is also ruby thread friendly.  Go figure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bmore</title>
		<link>http://blog.hungrymachine.com/2008/08/27/ruby-and-multi-threaded-mysql-mri-vs-jruby-jdbc-vs-dataobjects-mysql/comment-page-1/#comment-179</link>
		<dc:creator>Bmore</dc:creator>
		<pubDate>Wed, 27 Aug 2008 15:04:00 +0000</pubDate>
		<guid isPermaLink="false">blog.hungrymachine.com/2008/11/13/ruby-and-multi-threaded-mysql-mri-vs-jruby-jdbc-vs-dataobjects-mysql#comment-179</guid>
		<description>have you guys tried working with a more open mongo table or mongo database like 10gen or something similar to the massive table architecture in google&#039;s app engine?

http://www.10gen.com/</description>
		<content:encoded><![CDATA[<p>have you guys tried working with a more open mongo table or mongo database like 10gen or something similar to the massive table architecture in google&#8217;s app engine?</p>
<p><a href="http://www.10gen.com/" rel="nofollow">http://www.10gen.com/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fred</title>
		<link>http://blog.hungrymachine.com/2008/08/27/ruby-and-multi-threaded-mysql-mri-vs-jruby-jdbc-vs-dataobjects-mysql/comment-page-1/#comment-172</link>
		<dc:creator>Fred</dc:creator>
		<pubDate>Sun, 17 Aug 2008 01:06:00 +0000</pubDate>
		<guid isPermaLink="false">blog.hungrymachine.com/2008/11/13/ruby-and-multi-threaded-mysql-mri-vs-jruby-jdbc-vs-dataobjects-mysql#comment-172</guid>
		<description>You should use ruby-mysql 2.7.5</description>
		<content:encoded><![CDATA[<p>You should use ruby-mysql 2.7.5</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fred</title>
		<link>http://blog.hungrymachine.com/2008/08/27/ruby-and-multi-threaded-mysql-mri-vs-jruby-jdbc-vs-dataobjects-mysql/comment-page-1/#comment-173</link>
		<dc:creator>Fred</dc:creator>
		<pubDate>Sun, 17 Aug 2008 01:06:00 +0000</pubDate>
		<guid isPermaLink="false">blog.hungrymachine.com/2008/11/13/ruby-and-multi-threaded-mysql-mri-vs-jruby-jdbc-vs-dataobjects-mysql#comment-173</guid>
		<description>You should try benchmarking ruby-mysql 2.7.5,
but it still wont solve your concurrency problem,</description>
		<content:encoded><![CDATA[<p>You should try benchmarking ruby-mysql 2.7.5,<br />
but it still wont solve your concurrency problem,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas</title>
		<link>http://blog.hungrymachine.com/2008/08/27/ruby-and-multi-threaded-mysql-mri-vs-jruby-jdbc-vs-dataobjects-mysql/comment-page-1/#comment-174</link>
		<dc:creator>Thomas</dc:creator>
		<pubDate>Sun, 17 Aug 2008 01:06:00 +0000</pubDate>
		<guid isPermaLink="false">blog.hungrymachine.com/2008/11/13/ruby-and-multi-threaded-mysql-mri-vs-jruby-jdbc-vs-dataobjects-mysql#comment-174</guid>
		<description>Ruby 1.9 allows extensions to release the global interpreter lock while they&#039;re performing blocking operations, allowing other threads to run.  See rb_thread_blocking_region().</description>
		<content:encoded><![CDATA[<p>Ruby 1.9 allows extensions to release the global interpreter lock while they&#8217;re performing blocking operations, allowing other threads to run.  See rb_thread_blocking_region().</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Grigorik</title>
		<link>http://blog.hungrymachine.com/2008/08/27/ruby-and-multi-threaded-mysql-mri-vs-jruby-jdbc-vs-dataobjects-mysql/comment-page-1/#comment-175</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Sun, 17 Aug 2008 01:06:00 +0000</pubDate>
		<guid isPermaLink="false">blog.hungrymachine.com/2008/11/13/ruby-and-multi-threaded-mysql-mri-vs-jruby-jdbc-vs-dataobjects-mysql#comment-175</guid>
		<description>@Thomas: Ruby 1.8 can do that as well. There are some async client libraries out there, problem is, none of them are production ready.

On the GIL lock.. Ruby is not an exception, Python and most other interpreted languages have the same problem.</description>
		<content:encoded><![CDATA[<p>@Thomas: Ruby 1.8 can do that as well. There are some async client libraries out there, problem is, none of them are production ready.</p>
<p>On the GIL lock.. Ruby is not an exception, Python and most other interpreted languages have the same problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lourens Naude</title>
		<link>http://blog.hungrymachine.com/2008/08/27/ruby-and-multi-threaded-mysql-mri-vs-jruby-jdbc-vs-dataobjects-mysql/comment-page-1/#comment-176</link>
		<dc:creator>Lourens Naude</dc:creator>
		<pubDate>Sun, 17 Aug 2008 01:06:00 +0000</pubDate>
		<guid isPermaLink="false">blog.hungrymachine.com/2008/11/13/ruby-and-multi-threaded-mysql-mri-vs-jruby-jdbc-vs-dataobjects-mysql#comment-176</guid>
		<description>Post just been invalidated ...

http://github.com/oldmoe/mysqlplus</description>
		<content:encoded><![CDATA[<p>Post just been invalidated &#8230;</p>
<p><a href="http://github.com/oldmoe/mysqlplus" rel="nofollow">http://github.com/oldmoe/mysqlplus</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lourens Naude</title>
		<link>http://blog.hungrymachine.com/2008/08/27/ruby-and-multi-threaded-mysql-mri-vs-jruby-jdbc-vs-dataobjects-mysql/comment-page-1/#comment-177</link>
		<dc:creator>Lourens Naude</dc:creator>
		<pubDate>Sun, 17 Aug 2008 01:06:00 +0000</pubDate>
		<guid isPermaLink="false">blog.hungrymachine.com/2008/11/13/ruby-and-multi-threaded-mysql-mri-vs-jruby-jdbc-vs-dataobjects-mysql#comment-177</guid>
		<description>Post just been invalidated ...

http://github.com/oldmoe/mysqlplus</description>
		<content:encoded><![CDATA[<p>Post just been invalidated &#8230;</p>
<p><a href="http://github.com/oldmoe/mysqlplus" rel="nofollow">http://github.com/oldmoe/mysqlplus</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
