<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Centos on Evan Hoffman</title><link>https://evan.wtf/tags/centos/</link><description>Recent content in Centos 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/centos/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><item><title>Problems with PostgreSQL 9.0 on CentOS 6.3 with a 2.6.32-series kernel</title><link>https://evan.wtf/2012/09/25/problems-with-postgresql-9-0-on-centos-6-3-with-a-2-6-32-series-kernel/</link><pubDate>Tue, 25 Sep 2012 13:20:36 +0000</pubDate><guid>https://evan.wtf/2012/09/25/problems-with-postgresql-9-0-on-centos-6-3-with-a-2-6-32-series-kernel/</guid><description>&lt;p&gt;&lt;em&gt;Note: this is cross-posted from the &lt;a href="http://www.yodletechblog.com/post/problems-with-postgresql-9.0-on-centos-6.3-with-a-2.6.32-series-kernel/"&gt;Yodle Tech Blog&lt;/a&gt;&lt;/em&gt;.&#10;We recently migrated our Postgres database to a significantly more powerful machine. While our existing server was doing okay load-wise, we were approaching 90% full on its Postgres volume. We&amp;rsquo;d also recently acquired an awesome new PureStorage SSD-based SAN and were excited to move our database onto it. For comparison, here are the the specs for the two systems:&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Old server&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;New server&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Nickname&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;DB1&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;DB2&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;CPU&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;2x 6-core &lt;a href="http://ark.intel.com/products/52576/Intel-Xeon-Processor-X5690-%2812M-Cache-3_46-GHz-6_40-GTs-Intel-QPI%29"&gt;Xeon X5690&lt;/a&gt; CPUs at 3.47GHz&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;2x 8-core &lt;a href="http://ark.intel.com/products/64596/Intel-Xeon-Processor-E5-2690-%2820M-Cache-2_90-GHz-8_00-GTs-Intel-QPI%29"&gt;E5-2690&lt;/a&gt; CPUs at 2.90 GHz&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Memory&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;96 GB 1333 MHz&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;128 GB 1600 MHz&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Storage&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;- Dell PERC H800 SAS HBA - Dell MD1220 drive enclosure - 24x 15k RPM SAS drives configured in RAID 10&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;- QLogic QLE2562 dual-port 8 Gbit FC HBA - PureStorage SSD-based SAN&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;OS&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;CentOS 5.6 x86_64&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;CentOS 6.3 x86_64&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Kernel&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;2.6.18-238.9.1.el5&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;2.6.32-279.2.1.el6.x86_64&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;p&gt;As you can probably guess, moving from spinning disk onto SSD was the centerpiece of the upgrade. We&amp;rsquo;d tested the PureStorage system pretty extensively and used it in some secondary databases and seen some amazing improvements. We were excited to see how it would handle our production workload.&lt;/p&gt;</description></item><item><title>Rescan SATA bus (aka hot-adding a SATA disk on a Linux guest in VMware without rebooting)</title><link>https://evan.wtf/2011/10/24/rescan-sata-bus-aka-hot-adding-a-sata-disk-on-a-linux-guest-in-vmware-without-rebooting/</link><pubDate>Mon, 24 Oct 2011 15:20:51 +0000</pubDate><guid>https://evan.wtf/2011/10/24/rescan-sata-bus-aka-hot-adding-a-sata-disk-on-a-linux-guest-in-vmware-without-rebooting/</guid><description>&lt;p&gt;Linux supports hot-adding disks but whenever I add a new vdisk in VMware the new disk doesn&amp;rsquo;t show up unless I reboot, which defeats the purpose of hot-add. This command forces a rescan of the bus:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;echo &amp;#34;- - -&amp;#34; &amp;gt; /sys/class/scsi_host/host0/scan&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;dmesg shows the new disk has been found:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;Vendor: VMware Model: Virtual disk Rev: 1.0 &#10; Type: Direct-Access ANSI SCSI revision: 02&#10; target0:0:2: Beginning Domain Validation&#10; target0:0:2: Domain Validation skipping write tests&#10; target0:0:2: Ending Domain Validation&#10; target0:0:2: FAST-40 WIDE SCSI 80.0 MB/s ST (25 ns, offset 127)&#10;SCSI device sdd: 1048576000 512-byte hdwr sectors (536871 MB)&#10;sdd: Write Protect is off&#10;sdd: Mode Sense: 03 00 00 00&#10;sdd: cache data unavailable&#10;sdd: assuming drive cache: write through&#10;SCSI device sdd: 1048576000 512-byte hdwr sectors (536871 MB)&#10;sdd: Write Protect is off&#10;sdd: Mode Sense: 03 00 00 00&#10;sdd: cache data unavailable&#10;sdd: assuming drive cache: write through&#10; sdd: unknown partition table&#10;sd 0:0:2:0: Attached scsi disk sdd&#10;sd 0:0:2:0: Attached scsi generic sg3 type 0&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now, why there&amp;rsquo;s no &amp;ldquo;rescan_sata&amp;rdquo; command is something I can&amp;rsquo;t fathom, but that&amp;rsquo;s Linux for you.&lt;/p&gt;</description></item><item><title>64-bit Firefox 6 on CentOS 6 x86_64 (or Fedora) with Flash 11</title><link>https://evan.wtf/2011/08/31/64-bit-firefox-6-on-centos-6-x86_64-or-fedora-with-flash-11/</link><pubDate>Wed, 31 Aug 2011 16:15:14 +0000</pubDate><guid>https://evan.wtf/2011/08/31/64-bit-firefox-6-on-centos-6-x86_64-or-fedora-with-flash-11/</guid><description>&lt;p&gt;So I&amp;rsquo;ve gone back to Linux from Mac, due to the SSD issues I had with my Macbook Pro basically making VMware unusable. A Win7 VM would grind the guest and host to a halt on the 7200 RPM SATA OEM drive, and the SSD wouldn&amp;rsquo;t work, so I put the SSD back in my HP and installed CentOS 6 x86_64. Not really ideal, but at least it works.&lt;/p&gt;&#10;&lt;p&gt;CentOS 6 ships with Firefox 3.6.9, which is really old by now. Fine for a server, but I wanted FF6. I grabbed the Firefox 6.0.1 bz2 from &lt;a href="http://www.mozilla.org/community/mirrors.html"&gt;VoxCast&lt;/a&gt;, unzipped it and copied it to /usr/lib64/firefox-6. Then I ran yum remove firefox to remove 3.6.9 and avoid any issues. I tried the instructions from &lt;a href="https://evan.wtf/2010/06/09/flash-plugin-on-firefox-on-fedora-12-x86_64/"&gt;my older post&lt;/a&gt; on this subject but for whatever reason it didn&amp;rsquo;t work - I&amp;rsquo;m guessing because I&amp;rsquo;m not using the distro&amp;rsquo;s Firefox RPM.&lt;/p&gt;</description></item><item><title>MongoDB logrotate script</title><link>https://evan.wtf/2011/07/21/mongodb-logrotate-script/</link><pubDate>Thu, 21 Jul 2011 10:10:26 +0000</pubDate><guid>https://evan.wtf/2011/07/21/mongodb-logrotate-script/</guid><description>Daily mongodb log rotation via &lt;code&gt;logrotate&lt;/code&gt;.</description></item><item><title>Setting up InspIRCd as an internal IRC server for companywide chat</title><link>https://evan.wtf/2010/10/28/setting-up-inspircd-as-an-internal-irc-server-for-companywide-chat/</link><pubDate>Thu, 28 Oct 2010 17:16:12 +0000</pubDate><guid>https://evan.wtf/2010/10/28/setting-up-inspircd-as-an-internal-irc-server-for-companywide-chat/</guid><description>&lt;p&gt;I got this idea (&lt;a href="http://teddziuba.com/2010/01/break-my-concentration-and-i-b.html"&gt;from this blog post&lt;/a&gt;) that it would be cool and great if we had an IRC server to facilitate communication within our team. I started checking out some different IRC servers to see which ones supported the main features I wanted (LDAP auth &amp;amp; SSL). I started out with ratbox but I didn&amp;rsquo;t really like it. I found InspIRCd and after some config tweaking it&amp;rsquo;s working well. Here&amp;rsquo;s the info from modules.conf for authentication against Active Directory (so people login with their AD usernames):&lt;/p&gt;</description></item><item><title>HOWTO: Install Flash plugin on Firefox on Fedora / CentOS / RedHat Linux</title><link>https://evan.wtf/2010/06/09/howto-install-flash-plugin-on-firefox-on-fedora-centos-redhat-linux/</link><pubDate>Wed, 09 Jun 2010 01:36:54 +0000</pubDate><guid>https://evan.wtf/2010/06/09/howto-install-flash-plugin-on-firefox-on-fedora-centos-redhat-linux/</guid><description>&lt;p&gt;Updated 8/31/2011 See my &lt;a href="https://evan.wtf/2011/08/31/64-bit-firefox-6-on-centos-6-x86_64-or-fedora-with-flash-11/"&gt;newer post&lt;/a&gt; on this subject.&lt;/p&gt;&#10;&lt;p&gt;I know I&amp;rsquo;ve been through this before because I&amp;rsquo;ve setup Fedora before and it&amp;rsquo;s working. But I just installed FC12 on my desktop at home (since my Seagate drive bricked itself a few days ago and I had to reinstall anyway) and while I finally got the Adobe Flash plugin working, it didn&amp;rsquo;t have any audio, which made YouTube kind of suck. Anyway, this of course was a solved problem, I just forgot where the fix was located&amp;hellip; but duh, it&amp;rsquo;s &lt;a href="http://fedoraproject.org/wiki/Multimedia/Flash#On_64-bit_Fedora"&gt;on the Fedora website&lt;/a&gt;. A simple&lt;/p&gt;</description></item><item><title>I put Fedora Core 11 on my work laptop</title><link>https://evan.wtf/2009/10/21/i-put-fedora-core-11-on-my-work-laptop/</link><pubDate>Wed, 21 Oct 2009 00:25:19 +0000</pubDate><guid>https://evan.wtf/2009/10/21/i-put-fedora-core-11-on-my-work-laptop/</guid><description>&lt;p&gt;My work laptop, which I got around the end of 2006, was starting to run like crap. Pretty sure it started around the time I put antivirus on it, which reinforces my theory that antivirus is a virus itself. Anyway, being bored with Windows XP and having already played with Windows 7 at home, I decided to install Linux. The last time I tried Linux desktop was around RedHat 7.3, which was a long time ago&amp;hellip; pre-Fedora even. I&amp;rsquo;m pretty happy with CentOS on the server side and was set to try CentOS 5.3 on my laptop when someone suggested I go with FC due to more bleeding-edge driver support. Even though the hardware is pretty old at this point I figured it was worth a shot.&lt;/p&gt;</description></item></channel></rss>