<?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: MySQL-Memcached or NOSQL Tokyo Tyrant &#8211; part 1</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2009/10/15/mysql-memcached-or-nosql-tokyo-tyrant-part-1/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2009/10/15/mysql-memcached-or-nosql-tokyo-tyrant-part-1/</link>
	<description>Percona&#039;s MySQL &#38; InnoDB performance and scalability blog</description>
	<lastBuildDate>Sat, 11 Feb 2012 16:45:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Santiago</title>
		<link>http://www.mysqlperformanceblog.com/2009/10/15/mysql-memcached-or-nosql-tokyo-tyrant-part-1/comment-page-1/#comment-675721</link>
		<dc:creator>Santiago</dc:creator>
		<pubDate>Wed, 11 Nov 2009 19:56:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1419#comment-675721</guid>
		<description>I think it&#039;s true. We not always need databases. And i&#039;d like to say something more, when we need Databases, we do not always need Relational DBMS (RDBMS), not every solution is addressed with relational paradigm, and i&#039;m not talking about ORDMBS.</description>
		<content:encoded><![CDATA[<p>I think it&#8217;s true. We not always need databases. And i&#8217;d like to say something more, when we need Databases, we do not always need Relational DBMS (RDBMS), not every solution is addressed with relational paradigm, and i&#8217;m not talking about ORDMBS.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MySQL-Memcached or NOSQL Tokyo Tyrant &#8211; part 3 &#124; MySQL Performance Blog</title>
		<link>http://www.mysqlperformanceblog.com/2009/10/15/mysql-memcached-or-nosql-tokyo-tyrant-part-1/comment-page-1/#comment-666553</link>
		<dc:creator>MySQL-Memcached or NOSQL Tokyo Tyrant &#8211; part 3 &#124; MySQL Performance Blog</dc:creator>
		<pubDate>Mon, 19 Oct 2009 16:01:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1419#comment-666553</guid>
		<description>[...] is part 3 of our series.Â  In part 1 we talked about boosting performance with memcached on top of MySQL, in Part 2 we talked about [...]</description>
		<content:encoded><![CDATA[<p>[...] is part 3 of our series.Â  In part 1 we talked about boosting performance with memcached on top of MySQL, in Part 2 we talked about [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MySQL-Memcached or NOSQL Tokyo Tyrant &#8211; part 2 &#124; MySQL Performance Blog</title>
		<link>http://www.mysqlperformanceblog.com/2009/10/15/mysql-memcached-or-nosql-tokyo-tyrant-part-1/comment-page-1/#comment-666500</link>
		<dc:creator>MySQL-Memcached or NOSQL Tokyo Tyrant &#8211; part 2 &#124; MySQL Performance Blog</dc:creator>
		<pubDate>Mon, 19 Oct 2009 12:44:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1419#comment-666500</guid>
		<description>[...] Part 1 of our series set-up our &#8220;test&#8221;Â  application and looked at boosting performance of the application by buffer MySQL with memcached.Â  Our test application is simple and requires only 3 basic operations per transaction 2 reads and 1 write.Â  Using memcached combined with MySQL we ended up nearly getting a 10X performance boost from the application.Â  Now we are going to look at what we could achieve if we did not have to write to the database at all.Â  So let&#8217;s look at what happens if we push everything including writes into memcached. [...]</description>
		<content:encoded><![CDATA[<p>[...] Part 1 of our series set-up our &#8220;test&#8221;Â  application and looked at boosting performance of the application by buffer MySQL with memcached.Â  Our test application is simple and requires only 3 basic operations per transaction 2 reads and 1 write.Â  Using memcached combined with MySQL we ended up nearly getting a 10X performance boost from the application.Â  Now we are going to look at what we could achieve if we did not have to write to the database at all.Â  So let&#8217;s look at what happens if we push everything including writes into memcached. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt</title>
		<link>http://www.mysqlperformanceblog.com/2009/10/15/mysql-memcached-or-nosql-tokyo-tyrant-part-1/comment-page-1/#comment-665862</link>
		<dc:creator>matt</dc:creator>
		<pubDate>Sat, 17 Oct 2009 04:02:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1419#comment-665862</guid>
		<description>@Peter, 

 I have done two or three gigs lately with a very random distribution of data, so they do exist.  But realistically there is going to be some repeatability.  I think the idea is to show the extreme.  

 There is limited overhead for Memcahed on the same server.  The drop was not that significant in the grand scheme of things what about 13%?  Plus there is always the chance that over the tests things slow down for one test or another ( even with an average of 3 test runs, the sample set is small ).  

  Your saying with a 4GB buffer pool, the Memcached PK + Mysql is 2x ish faster.  The 1385 # is for 2 memcached lookups and 1 Mysql write + 1 Memcached set.  I have pure memcached lookup #&#039;s -vs- pk lookups without the 3 combined and could make another post just on that if there is interest.  

  Yes I can make the source available.  

  Database is setup to have only 256M Buffer pool, so for many of the pages it needs to find - i.e. read from disk and then replace.  

  Redis is on a very long list of tools I want to try out.  

  There are always choices and other options.  Here I am trying to get people to think outside the box and outside the database.  If you don&#039;t need sql, why use it?

  That&#039;s an interesting question, Testing with ssd and seeing the performance impact for both NOSQL -vs- MySQL would be very interesting.</description>
		<content:encoded><![CDATA[<p>@Peter, </p>
<p> I have done two or three gigs lately with a very random distribution of data, so they do exist.  But realistically there is going to be some repeatability.  I think the idea is to show the extreme.  </p>
<p> There is limited overhead for Memcahed on the same server.  The drop was not that significant in the grand scheme of things what about 13%?  Plus there is always the chance that over the tests things slow down for one test or another ( even with an average of 3 test runs, the sample set is small ).  </p>
<p>  Your saying with a 4GB buffer pool, the Memcached PK + Mysql is 2x ish faster.  The 1385 # is for 2 memcached lookups and 1 Mysql write + 1 Memcached set.  I have pure memcached lookup #&#8217;s -vs- pk lookups without the 3 combined and could make another post just on that if there is interest.  </p>
<p>  Yes I can make the source available.  </p>
<p>  Database is setup to have only 256M Buffer pool, so for many of the pages it needs to find &#8211; i.e. read from disk and then replace.  </p>
<p>  Redis is on a very long list of tools I want to try out.  </p>
<p>  There are always choices and other options.  Here I am trying to get people to think outside the box and outside the database.  If you don&#8217;t need sql, why use it?</p>
<p>  That&#8217;s an interesting question, Testing with ssd and seeing the performance impact for both NOSQL -vs- MySQL would be very interesting.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt</title>
		<link>http://www.mysqlperformanceblog.com/2009/10/15/mysql-memcached-or-nosql-tokyo-tyrant-part-1/comment-page-1/#comment-665855</link>
		<dc:creator>matt</dc:creator>
		<pubDate>Sat, 17 Oct 2009 03:47:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1419#comment-665855</guid>
		<description>@JD,   

  For these tests I was on the same local machine as the DB running a perl client.  The test in part 1 read from Memcached when the row it was looking for was there, otherwise would go to disk.  In the event of a write i would write the row to the database and replace the row in memcached with the new value.</description>
		<content:encoded><![CDATA[<p>@JD,   </p>
<p>  For these tests I was on the same local machine as the DB running a perl client.  The test in part 1 read from Memcached when the row it was looking for was there, otherwise would go to disk.  In the event of a write i would write the row to the database and replace the row in memcached with the new value.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2009/10/15/mysql-memcached-or-nosql-tokyo-tyrant-part-1/comment-page-1/#comment-665852</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Sat, 17 Oct 2009 03:41:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1419#comment-665852</guid>
		<description>Matt,

Indeed uniform distribution barely exists in the practice but I think for demonstration purposes it is a good choice. 

I do not quite understand why MySQL + Memcache has so large regression in the first case.  Considering memcache can do 17K gets per second (even if these are misses) the overhead for constant misses should be small.   Was MySQL somethat affected on having memcache on the same box (which I assume was the case)

It is also very interesting to see if you fit everything in memory memcache is about 2x-2.5x better than MySQL for primary key lookups. Am I reading it correctly?

Also are you planning to make a sources available I think it would be really helpful right now I&#039;m not sure I understand completely what is involved in every graph you&#039;re showing.

Finally for update.... why would you see 17ms for update ?  Is this because you have to go to the database which does not have it in the cache so read has to happen from the disk ?  Modification itself is done in Buffer pool and has very low added latency.

At the tool you&#039;re looking it is interesting if you can add Redis to the list. It is not as powerful as some other technologies in terms of automatic clustering etc but it is very simple which is cool.

Finally... I should note the direct implementation in MySQL is not only choice. The approach similar to SS tables can be used in MySQL as well. Replace your data to the &quot;daily&quot; small table which fits in ram while select from both small and large table. Do merge in the background. 

And there is yet another one.  How this all relates to SSDs ? Can it be simple solution instead of using &quot;optimized&quot; systems ?</description>
		<content:encoded><![CDATA[<p>Matt,</p>
<p>Indeed uniform distribution barely exists in the practice but I think for demonstration purposes it is a good choice. </p>
<p>I do not quite understand why MySQL + Memcache has so large regression in the first case.  Considering memcache can do 17K gets per second (even if these are misses) the overhead for constant misses should be small.   Was MySQL somethat affected on having memcache on the same box (which I assume was the case)</p>
<p>It is also very interesting to see if you fit everything in memory memcache is about 2x-2.5x better than MySQL for primary key lookups. Am I reading it correctly?</p>
<p>Also are you planning to make a sources available I think it would be really helpful right now I&#8217;m not sure I understand completely what is involved in every graph you&#8217;re showing.</p>
<p>Finally for update&#8230;. why would you see 17ms for update ?  Is this because you have to go to the database which does not have it in the cache so read has to happen from the disk ?  Modification itself is done in Buffer pool and has very low added latency.</p>
<p>At the tool you&#8217;re looking it is interesting if you can add Redis to the list. It is not as powerful as some other technologies in terms of automatic clustering etc but it is very simple which is cool.</p>
<p>Finally&#8230; I should note the direct implementation in MySQL is not only choice. The approach similar to SS tables can be used in MySQL as well. Replace your data to the &#8220;daily&#8221; small table which fits in ram while select from both small and large table. Do merge in the background. </p>
<p>And there is yet another one.  How this all relates to SSDs ? Can it be simple solution instead of using &#8220;optimized&#8221; systems ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JD</title>
		<link>http://www.mysqlperformanceblog.com/2009/10/15/mysql-memcached-or-nosql-tokyo-tyrant-part-1/comment-page-1/#comment-665692</link>
		<dc:creator>JD</dc:creator>
		<pubDate>Fri, 16 Oct 2009 13:24:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1419#comment-665692</guid>
		<description>Great article Matt,

I&#039;d like to know more about the testing environment. 
We use memcached on webheads with our database on separate machines connected over ethernet. Our web servers run nginx and have a tiny memory footprint, we dedicate the rest of the webhead&#039;s RAM to a local memcached instance so all queries are done locally; we don&#039;t take advantage of the distributed features memcached is known for. 

Only if an object isn&#039;t in the cache or has expired do we query the database (and populate the cache again).

From this article it appears that you are looking into using memcached as an alternative to a database server where the clients are connected remotely, not locally, and that you are writing to memcached.

Most people write to their database and read from memcached, I assume quite similarly to what we do, your ideas appear to be to use memcached for both reads and writes, at what point is the data stored persistently in the database if at all?

I look forward to your next posts Matt, keep up the good work.</description>
		<content:encoded><![CDATA[<p>Great article Matt,</p>
<p>I&#8217;d like to know more about the testing environment.<br />
We use memcached on webheads with our database on separate machines connected over ethernet. Our web servers run nginx and have a tiny memory footprint, we dedicate the rest of the webhead&#8217;s RAM to a local memcached instance so all queries are done locally; we don&#8217;t take advantage of the distributed features memcached is known for. </p>
<p>Only if an object isn&#8217;t in the cache or has expired do we query the database (and populate the cache again).</p>
<p>From this article it appears that you are looking into using memcached as an alternative to a database server where the clients are connected remotely, not locally, and that you are writing to memcached.</p>
<p>Most people write to their database and read from memcached, I assume quite similarly to what we do, your ideas appear to be to use memcached for both reads and writes, at what point is the data stored persistently in the database if at all?</p>
<p>I look forward to your next posts Matt, keep up the good work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt</title>
		<link>http://www.mysqlperformanceblog.com/2009/10/15/mysql-memcached-or-nosql-tokyo-tyrant-part-1/comment-page-1/#comment-665682</link>
		<dc:creator>matt</dc:creator>
		<pubDate>Fri, 16 Oct 2009 12:24:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1419#comment-665682</guid>
		<description>Dormando,  

   from the memcached perspective would it matter if there where 4 or 8 million rows and I selected from and tried to cache only 2 million of them? The result would be the same in this case, too little memory too much data.  Now from the Tyrant perspective since its disk based increasing the dataset could/should decrease performance, however in my tests I went up to 6 million rows and saw almost identical #&#039;s to the 2 million set.   The point about memcached not always fixing issues, is you need to understand your application and your access patterns.  I run into many applications which 100% of its stored MySQL data is hot, and many times adding a caching layer does not help nearly as much as other environments.  Now from a gaming standpoint, the specific example I was thinking of was finding an opponent from a list at random, then doing something with them before stuffing back into a list.  But I have worked on others a game matching-making service,  game lobby, etc... that all do very similar PK lookups.  

   In terms of scalability...  There are many options here ( this article was not intended to be a primer on tyrant, rather to get people to think outside the database ), and for the most part its as scalable or not as MySQL.  Replication, sure...  then?  Sharding... if you plan for this, or with some tweaks in the API of tyrant you could build sharing into the system.  Also you can use the memcached API to access and write to tyrant which allows you to distribute your data across multiple locations.  Tyrant however may not be the best solution for every setup, maybe its redis, or volemort, or cassandra, or something else... I think these all have features and specifics which make them compelling for certain applications... and hopefully I will find the time to write about these as well. 

    Matt</description>
		<content:encoded><![CDATA[<p>Dormando,  </p>
<p>   from the memcached perspective would it matter if there where 4 or 8 million rows and I selected from and tried to cache only 2 million of them? The result would be the same in this case, too little memory too much data.  Now from the Tyrant perspective since its disk based increasing the dataset could/should decrease performance, however in my tests I went up to 6 million rows and saw almost identical #&#8217;s to the 2 million set.   The point about memcached not always fixing issues, is you need to understand your application and your access patterns.  I run into many applications which 100% of its stored MySQL data is hot, and many times adding a caching layer does not help nearly as much as other environments.  Now from a gaming standpoint, the specific example I was thinking of was finding an opponent from a list at random, then doing something with them before stuffing back into a list.  But I have worked on others a game matching-making service,  game lobby, etc&#8230; that all do very similar PK lookups.  </p>
<p>   In terms of scalability&#8230;  There are many options here ( this article was not intended to be a primer on tyrant, rather to get people to think outside the database ), and for the most part its as scalable or not as MySQL.  Replication, sure&#8230;  then?  Sharding&#8230; if you plan for this, or with some tweaks in the API of tyrant you could build sharing into the system.  Also you can use the memcached API to access and write to tyrant which allows you to distribute your data across multiple locations.  Tyrant however may not be the best solution for every setup, maybe its redis, or volemort, or cassandra, or something else&#8230; I think these all have features and specifics which make them compelling for certain applications&#8230; and hopefully I will find the time to write about these as well. </p>
<p>    Matt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt</title>
		<link>http://www.mysqlperformanceblog.com/2009/10/15/mysql-memcached-or-nosql-tokyo-tyrant-part-1/comment-page-1/#comment-665677</link>
		<dc:creator>matt</dc:creator>
		<pubDate>Fri, 16 Oct 2009 12:00:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1419#comment-665677</guid>
		<description>Andy,  

   No these tests were with text and not with the binary protocol.  Although that would be an interesting separate set of benchmarks.</description>
		<content:encoded><![CDATA[<p>Andy,  </p>
<p>   No these tests were with text and not with the binary protocol.  Although that would be an interesting separate set of benchmarks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shlomi Noach</title>
		<link>http://www.mysqlperformanceblog.com/2009/10/15/mysql-memcached-or-nosql-tokyo-tyrant-part-1/comment-page-1/#comment-665630</link>
		<dc:creator>Shlomi Noach</dc:creator>
		<pubDate>Fri, 16 Oct 2009 09:51:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1419#comment-665630</guid>
		<description>@Dormando,

I have seen a few such cases. One, for example, is a p2p client, which, every time someone goes online/offline, needs to read/write to the DB. There&#039;s also a list of buddies to be managed. There are users in many continents, so different timezones; a lot more users are connected than can be cached; the result is an almost random behavior.
Another one is a plugin for websites, which calls upon the DB each time it&#039;s displayed. It presented the same characteristics.

@Matt,
Great post!</description>
		<content:encoded><![CDATA[<p>@Dormando,</p>
<p>I have seen a few such cases. One, for example, is a p2p client, which, every time someone goes online/offline, needs to read/write to the DB. There&#8217;s also a list of buddies to be managed. There are users in many continents, so different timezones; a lot more users are connected than can be cached; the result is an almost random behavior.<br />
Another one is a plugin for websites, which calls upon the DB each time it&#8217;s displayed. It presented the same characteristics.</p>
<p>@Matt,<br />
Great post!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

