<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dotdeb &#187; performance</title>
	<atom:link href="http://www.dotdeb.org/tag/performance/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dotdeb.org</link>
	<description>The repository for Debian-based LAMP servers</description>
	<lastBuildDate>Fri, 03 Feb 2012 01:25:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Using the Google Perftools to speed up your MySQL server</title>
		<link>http://www.dotdeb.org/2008/08/25/using-the-google-perftools-to-speed-up-your-mysql-server/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-the-google-perftools-to-speed-up-your-mysql-server</link>
		<comments>http://www.dotdeb.org/2008/08/25/using-the-google-perftools-to-speed-up-your-mysql-server/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 15:13:44 +0000</pubDate>
		<dc:creator>Guillaume Plessis</dc:creator>
				<category><![CDATA[Documentation]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[google-perftools]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://www.dotdeb.org/?p=99</guid>
		<description><![CDATA[The Google Perftools, especially tcmalloc (Thread Caching Malloc), can be very useful to speed up your applications, depending on your environment : TCMalloc is faster than the glibc 2.3 malloc (available as a separate library called ptmalloc2) and other mallocs that I have tested. ptmalloc2 takes approximately 300 nanoseconds to execute a malloc/free pair on [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://goog-perftools.sourceforge.net/">Google Perftools</a>, especially <a href="http://goog-perftools.sourceforge.net/doc/tcmalloc.html">tcmalloc</a> (Thread Caching Malloc), can be very useful to speed up your applications, depending on your environment :</p>
<blockquote><p>TCMalloc is faster than the glibc 2.3 malloc (available as a separate library called ptmalloc2) and other mallocs that I have tested. ptmalloc2 takes approximately 300 nanoseconds to execute a malloc/free pair on a 2.8 GHz P4 (for small objects). The TCMalloc implementation takes approximately 50 nanoseconds for the same operation pair.</p></blockquote>
<p>Its deployment in your LAMP stack can speed up your MySQL servers, since it enhances memory allocation on threaded applications with the downside of larger memory footprints.</p>
<p>Here is how to use it easily&#8230;</p>
<p><strong>Installation</strong></p>
<p>First of all, be sure you use Debian 5.0 (a.k.a. &#8220;Lenny&#8221;) or later. Then install the minimal tcmalloc library from Dotdeb :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libtcmalloc-minimal0</pre></div></div>

<p>Then, since the mainstream MySQL packages are not compiled against tcmalloc, you&#8217;ll have to trick your OS&#8217; dynamic linker by adding the following line at the top of your <em>/etc/init.d/mysql</em> init script :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LD_PRELOAD</span>=<span style="color: #ff0000;">&quot;/usr/lib/libtcmalloc_minimal.so.0&quot;</span></pre></div></div>

<p><img class="aligncenter size-full wp-image-285" title="/etc/init.d/mysql modification" src="http://www.dotdeb.org/wp-content/uploads/2008/08/Capture-d’écran-2009-10-03-à-12.59.48.png" alt="/etc/init.d/mysql modification" width="468" height="193" /></p>
<p>After relauching your MySQL server using the modified init script, you&#8217;ll take profit from tcmalloc&#8217;s faster memory allocation.</p>
<p><strong>Results</strong></p>
<p>At the time of writing this article, I didn&#8217;t make benchmarks, but some reported that they had a ~15-20% performance gain. Please leave comments about your experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dotdeb.org/2008/08/25/using-the-google-perftools-to-speed-up-your-mysql-server/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using apc
Database Caching 1/7 queries in 0.001 seconds using apc
Object Caching 210/216 objects using apc

Served from: www.dotdeb.org @ 2012-02-04 04:06:21 -->
