<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Readahead on Evan Hoffman</title><link>https://evan.wtf/tags/readahead/</link><description>Recent content in Readahead on Evan Hoffman</description><generator>Hugo</generator><language>en-US</language><copyright>Evan Hoffman</copyright><lastBuildDate>Mon, 07 Oct 2013 10:19:05 +0000</lastBuildDate><atom:link href="https://evan.wtf/tags/readahead/index.xml" rel="self" type="application/rss+xml"/><item><title>The not-so-secret secret to Postgres performance</title><link>https://evan.wtf/2013/10/07/the-not-so-secret-secret-to-postgres-performance/</link><pubDate>Mon, 07 Oct 2013 10:19:05 +0000</pubDate><guid>https://evan.wtf/2013/10/07/the-not-so-secret-secret-to-postgres-performance/</guid><description>&lt;p&gt;I manage a bunch of Postgres DBs and one of the things I almost always forget to do when setting up a new one is set the readahead up from the default of 256. I created this script and run it out of /etc/rc.local and sometimes cron it too. The 3 commands at the top are only really relevant on systems with &amp;ldquo;huge&amp;rdquo; memory - probably over 64 GB. We &lt;a href="https://evan.wtf/2012/09/25/problems-with-postgresql-9-0-on-centos-6-3-with-a-2-6-32-series-kernel/"&gt;ran into some memory problems&lt;/a&gt; with CentOS 6 on a box with 128 GB ram which we ended up working around by reinstalling CentOS 5, but the &lt;code&gt;/sys/kernel/mm/redhat_transparent_hugepage/&lt;/code&gt; options below should fix them in 6.x (though we haven&amp;rsquo;t actually tried it on that DB, we haven&amp;rsquo;t seen any problems in other large DBs).&lt;/p&gt;</description></item></channel></rss>