<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Work on Evan Hoffman</title><link>https://evan.wtf/tags/work/</link><description>Recent content in Work on Evan Hoffman</description><generator>Hugo</generator><language>en-US</language><copyright>Evan Hoffman</copyright><lastBuildDate>Thu, 20 Sep 2018 08:09:16 +0000</lastBuildDate><atom:link href="https://evan.wtf/tags/work/index.xml" rel="self" type="application/rss+xml"/><item><title>Day 63 post-op: back to the office</title><link>https://evan.wtf/2018/09/20/day-63-post-op-back-to-the-office/</link><pubDate>Thu, 20 Sep 2018 08:09:16 +0000</pubDate><guid>https://evan.wtf/2018/09/20/day-63-post-op-back-to-the-office/</guid><description>&lt;p&gt;This past Monday, Sept 17th, I finally returned to the office, after almost 11 weeks being out. I was on long weekend (July 4th) when the injury occurred, and worked from home the following week. I then had the repair surgery on July 16th, and spent about two weeks just sitting on the couch recovering - WFH wasn&amp;rsquo;t really an option for that, since I had to keep my leg elevated above my heart. Since then I&amp;rsquo;ve been working from my home office.&lt;/p&gt;</description></item><item><title>Can I create an EC2 MySQL slave to an RDS master?</title><link>https://evan.wtf/2014/10/08/can-i-create-an-ec2-mysql-slave-to-an-rds-master/</link><pubDate>Wed, 08 Oct 2014 15:25:10 +0000</pubDate><guid>https://evan.wtf/2014/10/08/can-i-create-an-ec2-mysql-slave-to-an-rds-master/</guid><description>&lt;h2 id="no"&gt;No.&lt;a class="heading-anchor" href="#no" aria-label="Link to this section"&gt;&#10; &lt;svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2"&#10; stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"&gt;&#10; &lt;path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/&gt;&#10; &lt;path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/&gt;&#10; &lt;/svg&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;p&gt;Here&amp;rsquo;s what happens if you try:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;mysql&amp;gt; grant replication slave on *.* to &amp;#39;ec2-slave&amp;#39;@&amp;#39;%&amp;#39;;&#10;ERROR 1045 (28000): Access denied for user &amp;#39;rds_root&amp;#39;@&amp;#39;%&amp;#39; (using password: YES)&#10;mysql&amp;gt; update mysql.user set Repl_slave_priv=&amp;#39;Y&amp;#39; WHERE user=&amp;#39;rds_root&amp;#39; AND host=&amp;#39;%&amp;#39;;&#10;ERROR 1054 (42S22): Unknown column &amp;#39;ERROR (RDS): REPLICA SLAVE PRIVILEGE CANNOT BE GRANTED OR MAINTAINED&amp;#39; in &amp;#39;field list&amp;#39;&#10;mysql&amp;gt;&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Note: this is for MySQL 5.5, which is unfortunately what I&amp;rsquo;m currently stuck with.&lt;/p&gt;</description></item><item><title>The m3.medium is terrible</title><link>https://evan.wtf/2014/08/12/the-m3-medium-is-terrible/</link><pubDate>Tue, 12 Aug 2014 13:51:08 +0000</pubDate><guid>https://evan.wtf/2014/08/12/the-m3-medium-is-terrible/</guid><description>&lt;p&gt;I&amp;rsquo;ve been doing some testing of various instance types in our staging environment, originally just to see if Amazon&amp;rsquo;s t2.* line of instances is usable in a real-world scenario. In the end, I found that not only are the t2.mediums viable for what I want them to do, but they&amp;rsquo;re far better suited than the m3.medium, which I wouldn&amp;rsquo;t use for anything that you ever expect to reach any load.&lt;/p&gt;</description></item><item><title>Tips for recruiters</title><link>https://evan.wtf/2014/06/16/tips-for-recruiters/</link><pubDate>Mon, 16 Jun 2014 12:25:33 +0000</pubDate><guid>https://evan.wtf/2014/06/16/tips-for-recruiters/</guid><description>&lt;p&gt;I’m a pretty lucky guy these days. As a &lt;a href="http://devopsreactions.tumblr.com/"&gt;DevOps engineer&lt;/a&gt; in NYC my skills are in high demand and recruiters contact me almost every day. As someone who was once unemployed for 6 months I’m grateful to be in this position. That said, there are some requests that go straight to the trash, and some I’ll at least respond to even if I’m not interested. Here are some of the factors that influence my decision:&lt;/p&gt;</description></item><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>XFS write speeds: software RAID 0/5/6 across 45 spindles</title><link>https://evan.wtf/2013/01/02/xfs-write-speeds-software-raid-056-across-45-spindles/</link><pubDate>Wed, 02 Jan 2013 16:05:07 +0000</pubDate><guid>https://evan.wtf/2013/01/02/xfs-write-speeds-software-raid-056-across-45-spindles/</guid><description>&lt;p&gt;We&amp;rsquo;re currently building a new storage server to store low-priority data (tertiary backups, etc). One of the requirements for the project is that it needs to be on cheap storage (as opposed to expensive enterprise SAN/NAS). After some research we decided to build a &lt;a href="http://blog.backblaze.com/2011/07/20/petabytes-on-a-budget-v2-0revealing-more-secrets/"&gt;Backblaze pod&lt;/a&gt;. Backblaze used 3TB Hitachi drives in their system, but the ones they listed in their blog post are discontinued and the reviews for all other 3TB+ drives were terrible, so we went with &lt;a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16822152245"&gt;Samsung ST2000DL004&lt;/a&gt; 2TB 7200 RPM drives. Like Backblaze, we&amp;rsquo;re going with software raid, but I figured a good first step would be to figure out what RAID level we want to use, and if we want to use the mdadm/LVM mish-mosh Backblaze uses, or find something simpler. For my testing I created a RAID6 of all 45 drives and created a single XFS volume (XFS&amp;rsquo;s size limit is ~8 exabytes vs ext4&amp;rsquo;s 16TB). Ext4 may present some performance advantages, but the management overhead is probably not worth it in our case.&lt;/p&gt;</description></item><item><title>Load balancing in EC2 with Nginx and HAProxy</title><link>https://evan.wtf/2012/01/09/load-balancing-in-ec2-with-nginx-and-haproxy/</link><pubDate>Mon, 09 Jan 2012 17:00:22 +0000</pubDate><guid>https://evan.wtf/2012/01/09/load-balancing-in-ec2-with-nginx-and-haproxy/</guid><description>&lt;p&gt;We wanted to setup a loadbalanced web cluster in AWS for expansion. My first inclination was to use &lt;a href="http://aws.amazon.com/elasticloadbalancing/"&gt;ELB&lt;/a&gt; for this, but I soon learned that ELB doesn&amp;rsquo;t let you allocate a static IP, requiring you to refer to it only by DNS name. This would be OK except for the fact that our current DNS provider, &lt;a href="http://dyn.com/dns/dynect-managed-dns/"&gt;Dyn&lt;/a&gt;, requires IP addresses when using their GSLB (geo-based load balancer) service.&lt;/p&gt;&#10;&lt;p&gt;Rather than let this derail the whole project, I decided to look into the software options available for loadbalancing in EC2. I&amp;rsquo;ve been a fan of hardware load balancers for a while, sort of looking down at software-based solutions without any real rationale, but in this case I really had no choice so I figured I&amp;rsquo;d give it a try.&lt;/p&gt;</description></item><item><title>Installing Sun (Oracle) JDK 1.5 on an EC2 instance</title><link>https://evan.wtf/2011/11/16/installing-sun-oracle-jdk-1-5-on-an-ec2-instance/</link><pubDate>Wed, 16 Nov 2011 11:52:55 +0000</pubDate><guid>https://evan.wtf/2011/11/16/installing-sun-oracle-jdk-1-5-on-an-ec2-instance/</guid><description>&lt;p&gt;I&amp;rsquo;m currently working on moving a Tomcat-based application into EC2. The code was written for Java 5.0. While Java 6 would probably work, I&amp;rsquo;d like to keep everything as &amp;ldquo;same&amp;rdquo; as possible, since EC2 presents its own challenges. I spun up a couple of t1.micro instances and copied everything over, including the Java 5 JDK, &lt;a href="http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase5-419410.html#jdk-1.5.0_22-oth-JPR"&gt;jdk-1_5_0_22-linux-amd64.rpm&lt;/a&gt;. Installing from RPM was easy, but the EC2 instance defaults to using OpenJDK 1.6:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;[root@ec2 ~]# java -version&#10;java version &amp;#34;1.6.0_20&amp;#34;&#10;OpenJDK Runtime Environment (IcedTea6 1.9.10) (amazon-52.1.9.10.40.amzn1-x86_64)&#10;OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;There were a couple of things I had to do to get the system to accept the Sun JDK as its &amp;ldquo;real&amp;rdquo; java.&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>Making sure SSLv2 is disabled in Apache (and Nginx)</title><link>https://evan.wtf/2011/09/20/making-sure-sslv2-is-disabled-in-apache/</link><pubDate>Tue, 20 Sep 2011 14:06:38 +0000</pubDate><guid>https://evan.wtf/2011/09/20/making-sure-sslv2-is-disabled-in-apache/</guid><description>&lt;p&gt;&lt;strong&gt;Edit Jan 24, 2012:&lt;/strong&gt; Deleted all the crap from this story and just left the recommended Apache and Nginx SSL cipher suites for maximum security without SSLv2 and without BEAST vulnerability (at least according to Qualys).&#10;&lt;strong&gt;Apache httpd&lt;/strong&gt;&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;SSLProtocol -ALL +SSLv3 +TLSv1&#10;SSLCipherSuite ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM;&#10;SSLHonorCipherOrder on&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;nginx&lt;/strong&gt;&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;ssl_protocols SSLv3 TLSv1;&#10; ssl_ciphers ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM;&#10; ssl_prefer_server_ciphers on;&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Source:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://community.qualys.com/blogs/securitylabs/2011/10/17/mitigating-the-beast-attack-on-tls"&gt;Qualys&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://www.ssllabs.com/ssldb/"&gt;SSL checker&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;&lt;a href="http://affiliate.godaddy.com/redirect/5F43C3ECBA841ACFC3859F4F4E6CA7DA64C271385B2D61A3AD6F3CCE83EB1DD8235E60DCD7D63BCD92E2429E79A75FAC"&gt;&lt;img src="http://affiliate.godaddy.com/ads/5F43C3ECBA841ACFC3859F4F4E6CA7DA64C271385B2D61A3AD6F3CCE83EB1DD8235E60DCD7D63BCD92E2429E79A75FAC" alt="Go Daddy $12.99 SSL Sale!"&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Exchange (OWA) CAS crashes with 503 error - again</title><link>https://evan.wtf/2011/09/18/exchange-owa-cas-crashes-with-503-error-again/</link><pubDate>Sun, 18 Sep 2011 12:22:46 +0000</pubDate><guid>https://evan.wtf/2011/09/18/exchange-owa-cas-crashes-with-503-error-again/</guid><description>&lt;p&gt;This just started happening &lt;a href="https://evan.wtf/evan/?p=986"&gt;again&lt;/a&gt;, with these errors appearing in the event viewer:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;Log Name: System&#10;Source: Microsoft-Windows-WAS&#10;Date: 9/18/2011 11:16:33 AM&#10;Event ID: 5011&#10;Task Category: None&#10;Level: Warning&#10;Keywords: Classic&#10;User: N/A&#10;Computer: exch2010fe1&#10;Description:&#10;A process serving application pool &amp;#39;MSExchangeOWAAppPool&amp;#39; suffered a&#10;fatal communication error with the Windows Process Activation Service.&#10;The process id was &amp;#39;3760&amp;#39;. The data field contains the error number.&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Log Name: System&#10;Source: Microsoft-Windows-WAS&#10;Date: 9/17/2011 6:47:07 AM&#10;Event ID: 5009&#10;Task Category: None&#10;Level: Warning&#10;Keywords: Classic&#10;User: N/A&#10;Computer: exch2010fe1&#10;Description:&#10;A process serving application pool &amp;lsquo;MSExchangeOWAAppPool&amp;rsquo; terminated&#10;unexpectedly. The process id was &amp;lsquo;3108&amp;rsquo;. The process exit code was&#10;&amp;lsquo;0x800703e9&amp;rsquo;.&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>Macbook Pro locks up with SSD installed.</title><link>https://evan.wtf/2011/08/23/macbook-pro-locks-up-with-ssd-installed/</link><pubDate>Tue, 23 Aug 2011 12:04:54 +0000</pubDate><guid>https://evan.wtf/2011/08/23/macbook-pro-locks-up-with-ssd-installed/</guid><description>&lt;p&gt;A few weeks ago I switched from my trusty old &lt;a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16834147346"&gt;HP nc8430&lt;/a&gt; to a &lt;a href="http://www.amazon.com/gp/product/B002C744K6/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=evanhoffmasho-20&amp;amp;linkCode=as2&amp;amp;camp=217145&amp;amp;creative=399369&amp;amp;creativeASIN=B002C744K6"&gt;Macbook Pro&lt;/a&gt; (MC118LL/A) that was left spare when another employee left. I mostly enjoyed using Linux but I was tired of dealing with weird quirks like having X lock up, essentially forcing me to do a hard reboot.&lt;/p&gt;&#10;&lt;p&gt;To transition, I copied my documents from Linux to Mac, then turned off the Linux laptop. Surprisingly I found I didn&amp;rsquo;t need to turn Linux back on at all.&#10;Last week, I decided to put the final nail in Linux&amp;rsquo;s coffin by taking the SSD (&lt;a href="http://www.amazon.com/gp/product/B002CI41US/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=evanhoffmasho-20&amp;amp;linkCode=as2&amp;amp;camp=217145&amp;amp;creative=399369&amp;amp;creativeASIN=B002CI41US"&gt;Corsair CMFSSD-128GBG2D&lt;/a&gt;)out of it and putting it in my Macbook. The Macbook was pretty fast (Core 2 Duo @ 2.5 GHz) but some things were noticeably slower on its 7200RPM disk than on Linux with an SSD, especially running Windows VMs.&lt;/p&gt;</description></item><item><title>Logging RT username in Apache access_log</title><link>https://evan.wtf/2011/08/08/logging-rt-username-in-apache-access_log/</link><pubDate>Mon, 08 Aug 2011 17:34:18 +0000</pubDate><guid>https://evan.wtf/2011/08/08/logging-rt-username-in-apache-access_log/</guid><description>&lt;p&gt;&lt;a href="http://bestpractical.com/rt/"&gt;RT&lt;/a&gt; has its own internal accounting &amp;amp; tracking system for logging activity, but I was interested in even more granular stuff, like seeing who looked at which tickets. I figured it wouldn&amp;rsquo;t be that hard to log this in Apache. Well, I was kind of right, in that it wasn&amp;rsquo;t &amp;ldquo;hard,&amp;rdquo; but it took me a long time to find the right place to do it. I did finally get it though.&lt;/p&gt;</description></item><item><title>Amazon SES: "illegal headers" with ses-send-email.pl (followup)</title><link>https://evan.wtf/2011/08/02/amazon-ses-illegal-headers-with-ses-send-email-pl-followup/</link><pubDate>Tue, 02 Aug 2011 14:39:45 +0000</pubDate><guid>https://evan.wtf/2011/08/02/amazon-ses-illegal-headers-with-ses-send-email-pl-followup/</guid><description>&lt;p&gt;A few people have emailed me asking me to integrate &lt;a href="https://evan.wtf/2011/05/16/amazon-ses-illegal-header-errors/"&gt;the perl code snippet into I wrote to strip illegal headers&lt;/a&gt; when sending email via Amazon SES into something actually usable. I&amp;rsquo;ve done so! I haven&amp;rsquo;t really tested this beyond sending some test emails, but here it is. Use this at your own risk, I make no warranty, blah blah blah.&#10;This fix requires editing &lt;code&gt;ses-send-email.pl&lt;/code&gt;, so I&amp;rsquo;d advise making a backup copy, though I imagine you can always get a fresh version from Amazon if necessary.&lt;/p&gt;</description></item><item><title>33 hours to restore a Postgres DB</title><link>https://evan.wtf/2011/07/26/33-hours-2/</link><pubDate>Tue, 26 Jul 2011 18:10:01 +0000</pubDate><guid>https://evan.wtf/2011/07/26/33-hours-2/</guid><description>Restoring a huge DB takes a long time.</description></item><item><title>Benchmarking disk IO on ext3 vs ext4 vs xfs with fio</title><link>https://evan.wtf/2011/07/22/benchmarking-disk-io-on-ext3-vs-ext4-with-fio/</link><pubDate>Fri, 22 Jul 2011 07:15:05 +0000</pubDate><guid>https://evan.wtf/2011/07/22/benchmarking-disk-io-on-ext3-vs-ext4-with-fio/</guid><description>&lt;p&gt;With the old database phased out, I figured this was a good time to benchmark IO on it before either repurposing it or mothballing it. In &lt;a href="https://evan.wtf/2009/10/27/nilfs-a-file-system-to-make-ssds-scream-in-pain/"&gt;the past&lt;/a&gt; I&amp;rsquo;ve used &lt;code&gt;dd&lt;/code&gt; for elementary sequential read/write testing, but I recently found &lt;a href="http://freshmeat.net/projects/fio/"&gt;fio&lt;/a&gt; which is much more versatile. Apparently developed by FusionIO, fio lets you control concurrency, blocksize and many other parameters and reports lots more data, most notably &lt;a href="http://en.wikipedia.org/wiki/IOPS"&gt;IOPS&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;I created 4 fio config files, basically the same as the one below, for direct / buffered disk access and sequential / random writes. All have 8k blocksize since that&amp;rsquo;s what Postgres uses by default.&lt;/p&gt;</description></item><item><title>VMWare 5's new licensing model.</title><link>https://evan.wtf/2011/07/17/vmware-5s-new-licensing-model-2/</link><pubDate>Sun, 17 Jul 2011 10:20:56 +0000</pubDate><guid>https://evan.wtf/2011/07/17/vmware-5s-new-licensing-model-2/</guid><description>&lt;p&gt;After reading up on the new VMware licensing&amp;amp;pricing model I understand the uproar. Limiting vRAM is a reasonable constraint, but 32GB per socket for Enterprise? 48 GB for &amp;ldquo;Enterprise Plus&amp;rdquo;? If you have a dual CPU server with 144 GB (easily configurable last year), with 4.1 you&amp;rsquo;d only need 2 enterprise licenses to use all 144 GB, since in 4.1 an &amp;ldquo;Enterprise&amp;rdquo; license covered 1 CPU (up to 6 cores) and up to 256 GB memory on the host.&lt;/p&gt;</description></item><item><title>Migrating a PostgreSQL DB to a new machine without doing a dump &amp; restore</title><link>https://evan.wtf/2011/07/11/migrating-a-postgresql-db-to-a-new-machine-without-doing-a-dump-restore/</link><pubDate>Mon, 11 Jul 2011 14:39:16 +0000</pubDate><guid>https://evan.wtf/2011/07/11/migrating-a-postgresql-db-to-a-new-machine-without-doing-a-dump-restore/</guid><description>rsync over NFS can be so fast.</description></item><item><title>Remount all NFS mounts to another cluster IP</title><link>https://evan.wtf/2011/07/07/remount-all-nfs-mounts-to-another-cluster-ip/</link><pubDate>Thu, 07 Jul 2011 17:51:44 +0000</pubDate><guid>https://evan.wtf/2011/07/07/remount-all-nfs-mounts-to-another-cluster-ip/</guid><description>Putting this here for safekeeping.</description></item><item><title>Teaching myself node.js: Part 1</title><link>https://evan.wtf/2011/06/14/teaching-myself-node-js-part-1/</link><pubDate>Tue, 14 Jun 2011 00:50:59 +0000</pubDate><guid>https://evan.wtf/2011/06/14/teaching-myself-node-js-part-1/</guid><description>In which I try to learn node.js by building a Quora-like site (since it seems everyone is building a blog).</description></item><item><title>PostgreSQL query to determine the largest tables in the database</title><link>https://evan.wtf/2011/05/17/postgresql-query-to-determine-the-largest-tables-in-the-database/</link><pubDate>Tue, 17 May 2011 10:25:32 +0000</pubDate><guid>https://evan.wtf/2011/05/17/postgresql-query-to-determine-the-largest-tables-in-the-database/</guid><description>A PostgreSQL query to see the largest tables on-disk in a given database and how large their indices are.</description></item><item><title>JavaScript: The Good Parts</title><link>https://evan.wtf/2011/04/26/javascript-the-good-parts/</link><pubDate>Tue, 26 Apr 2011 17:20:21 +0000</pubDate><guid>https://evan.wtf/2011/04/26/javascript-the-good-parts/</guid><description>&lt;p&gt;I just finished reading &lt;a href="http://www.amazon.com/gp/product/0596517742/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=evanhoffmasho-20&amp;amp;linkCode=as2&amp;amp;camp=217145&amp;amp;creative=399349&amp;amp;creativeASIN=0596517742"&gt;JavaScript: The Good Parts&lt;/a&gt;, one of the best programming books I&amp;rsquo;ve read. The ending is fantastic:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;We see a lot of feature-driven product design in which the cost of features is not properly accounted. Features can have a negative value to consumers because they make the products more difficult to understand and use. We are finding that people like products that just work. It turns out that designs that just work are much harder to produce than designs that assemble long lists of features.&lt;/p&gt;</description></item><item><title>Renaming a single-label domain to a FQDN</title><link>https://evan.wtf/2011/04/07/renaming-a-single-label-domain-to-a-fqdn/</link><pubDate>Thu, 07 Apr 2011 17:56:54 +0000</pubDate><guid>https://evan.wtf/2011/04/07/renaming-a-single-label-domain-to-a-fqdn/</guid><description>&lt;p&gt;Long ago &amp;ndash; eons, perhaps &amp;ndash; before I had anything to do with the Windows environment here, someone created the AD domain in my company as a single-label domain (e.g. instead of &amp;ldquo;example.com&amp;rdquo; our domain is just &amp;ldquo;example&amp;rdquo;). Over the years this has led to lots of &amp;ldquo;fun&amp;rdquo; on the part of Windows admins who&amp;rsquo;ve worked here as the implications of this choice became more apparent.&lt;/p&gt;&#10;&lt;p&gt;Since I inherited this system about a year ago, I haven&amp;rsquo;t really bumped up against any problems stemming from the single-label domain issue&amp;hellip; until now. I recently attempted to add a new Windows 2008r2 file server to our DFS replication group/namespace. This totally failed for some mysterious reason. Well, I shouldn&amp;rsquo;t say &amp;ldquo;totally&amp;rdquo; failed, as I was able to add it to the DFS replication group, but unable to add it to the DFS namespace. In my attempt to debug the namespace issue, I deleted the namespace and attempted to recreate it, but just kept getting this error: &lt;strong&gt;The namespace cannot be queried. The specified domain either does not exist or could not be contacted.&lt;/strong&gt;. I couldn&amp;rsquo;t do anything with the namespace - even clicking on it in the DFS Management console brought up an error. After some searching I found that this was likely due to having a single-label domain. I wasn&amp;rsquo;t sure why the error was happening even on Windows 2003 machines though, maybe joining a 2008r2 box to the domain made some schema changes? I tried a few suggestions like editing the hosts file but nothing seemed to resolve this.&lt;/p&gt;</description></item><item><title>More fun parsing BIND query logs</title><link>https://evan.wtf/2010/12/13/more-fun-parsing-bind-query-logs/</link><pubDate>Mon, 13 Dec 2010 18:21:59 +0000</pubDate><guid>https://evan.wtf/2010/12/13/more-fun-parsing-bind-query-logs/</guid><description>&lt;p&gt;&amp;ldquo;But wouldn&amp;rsquo;t it be cool if it also&amp;hellip;&amp;rdquo; That phrase usually triggers a lot of wasted cycles in my brain, though it sometimes comes up with something neat. I added a super lame graph to the DNS QPS parser. Makes it really easy to see peaks &amp;amp; troughs in usage:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;2010-12-12 00:00 to 00:59 =&amp;gt; 3237, rate 0.899 queries/sec&#9;***********&#10;2010-12-12 01:00 to 01:59 =&amp;gt; 2709, rate 0.752 queries/sec&#9;**********&#10;2010-12-12 02:00 to 02:59 =&amp;gt; 2473, rate 0.687 queries/sec&#9;*********&#10;2010-12-12 03:00 to 03:59 =&amp;gt; 2171, rate 0.603 queries/sec&#9;********&#10;2010-12-12 04:00 to 04:59 =&amp;gt; 2048, rate 0.569 queries/sec&#9;*******&#10;2010-12-12 05:00 to 05:59 =&amp;gt; 1918, rate 0.533 queries/sec&#9;*******&#10;2010-12-12 06:00 to 06:59 =&amp;gt; 2120, rate 0.589 queries/sec&#9;********&#10;2010-12-12 07:00 to 07:59 =&amp;gt; 2477, rate 0.688 queries/sec&#9;*********&#10;2010-12-12 08:00 to 08:59 =&amp;gt; 2994, rate 0.832 queries/sec&#9;**********&#10;2010-12-12 09:00 to 09:59 =&amp;gt; 3704, rate 1.029 queries/sec&#9;*************&#10;2010-12-12 10:00 to 10:59 =&amp;gt; 4297, rate 1.194 queries/sec&#9;***************&#10;2010-12-12 11:00 to 11:59 =&amp;gt; 4744, rate 1.318 queries/sec&#9;****************&#10;2010-12-12 12:00 to 12:59 =&amp;gt; 5106, rate 1.418 queries/sec&#9;******************&#10;2010-12-12 13:00 to 13:59 =&amp;gt; 5311, rate 1.475 queries/sec&#9;******************&#10;2010-12-12 14:00 to 14:59 =&amp;gt; 5083, rate 1.412 queries/sec&#9;*****************&#10;2010-12-12 15:00 to 15:59 =&amp;gt; 4855, rate 1.349 queries/sec&#9;*****************&#10;2010-12-12 16:00 to 16:59 =&amp;gt; 5179, rate 1.439 queries/sec&#9;******************&#10;2010-12-12 17:00 to 17:59 =&amp;gt; 4959, rate 1.377 queries/sec&#9;*****************&#10;2010-12-12 18:00 to 18:59 =&amp;gt; 4693, rate 1.304 queries/sec&#9;****************&#10;2010-12-12 19:00 to 19:59 =&amp;gt; 4792, rate 1.331 queries/sec&#9;****************&#10;2010-12-12 20:00 to 20:59 =&amp;gt; 4799, rate 1.333 queries/sec&#9;****************&#10;2010-12-12 21:00 to 21:59 =&amp;gt; 5068, rate 1.408 queries/sec&#9;*****************&#10;2010-12-12 22:00 to 22:59 =&amp;gt; 4672, rate 1.298 queries/sec&#9;****************&#10;2010-12-12 23:00 to 23:59 =&amp;gt; 4514, rate 1.254 queries/sec&#9;****************&#10;2010-12-13 00:00 to 00:59 =&amp;gt; 3917, rate 1.088 queries/sec&#9;**************&#10;2010-12-13 01:00 to 01:59 =&amp;gt; 3458, rate 0.961 queries/sec&#9;************&#10;2010-12-13 02:00 to 02:59 =&amp;gt; 2874, rate 0.798 queries/sec&#9;**********&#10;2010-12-13 03:00 to 03:59 =&amp;gt; 2715, rate 0.754 queries/sec&#9;**********&#10;2010-12-13 04:00 to 04:59 =&amp;gt; 2690, rate 0.747 queries/sec&#9;*********&#10;2010-12-13 05:00 to 05:59 =&amp;gt; 2719, rate 0.755 queries/sec&#9;**********&#10;2010-12-13 06:00 to 06:59 =&amp;gt; 2831, rate 0.786 queries/sec&#9;**********&#10;2010-12-13 07:00 to 07:59 =&amp;gt; 3416, rate 0.949 queries/sec&#9;************&#10;2010-12-13 08:00 to 08:59 =&amp;gt; 4962, rate 1.378 queries/sec&#9;*****************&#10;2010-12-13 09:00 to 09:59 =&amp;gt; 6943, rate 1.929 queries/sec&#9;************************&#10;2010-12-13 10:00 to 10:59 =&amp;gt; 8296, rate 2.304 queries/sec&#9;****************************&#10;2010-12-13 11:00 to 11:59 =&amp;gt; 8938, rate 2.483 queries/sec&#9;******************************&#10;2010-12-13 12:00 to 12:59 =&amp;gt; 8926, rate 2.479 queries/sec&#9;******************************&#10;2010-12-13 13:00 to 13:59 =&amp;gt; 8950, rate 2.486 queries/sec&#9;******************************&#10;2010-12-13 14:00 to 14:59 =&amp;gt; 2173, rate 0.604 queries/sec&#9;********&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can see pretty quickly that 4-5 AM (Eastern) is the period of lowest activity, as you&amp;rsquo;d probably expect for a US-based US-centric site. Modified perl script below.&lt;/p&gt;</description></item><item><title>Perl script to calculate DNS queries per second in BIND (named)</title><link>https://evan.wtf/2010/12/07/perl-script-to-calculate-dns-queries-per-second-in-bind-named/</link><pubDate>Tue, 07 Dec 2010 18:53:43 +0000</pubDate><guid>https://evan.wtf/2010/12/07/perl-script-to-calculate-dns-queries-per-second-in-bind-named/</guid><description>&lt;p&gt;I&amp;rsquo;m pricing out DNS providers and was asked what our current queries-per-second currently are. Sadly I had no idea. After lots of Googling I decided there was really no good way to get this information so I decided to parse the logfile myself.&#10;First, I turned on logging with timestamp in named.conf:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;logging&#10;{&#10;...&#10; # Query logging 2010-12-07&#10; channel query-log {&#10; file &amp;#34;data/queries.log&amp;#34; versions 3 size 10m;&#10; print-time yes;&#10; };&#10; category queries { query-log; };&#10;};&#10;options&#10;{&#10;...&#10; # Query logging 2010-12-07&#10; querylog yes;&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;};&lt;/p&gt;</description></item><item><title>Wasted time with Exchange 2010, SquirrelMail, and IMAP-SSL</title><link>https://evan.wtf/2010/11/30/wasted-time-with-exchange-2010-squirrelmail-and-imap-ssl/</link><pubDate>Tue, 30 Nov 2010 17:32:11 +0000</pubDate><guid>https://evan.wtf/2010/11/30/wasted-time-with-exchange-2010-squirrelmail-and-imap-ssl/</guid><description>&lt;p&gt;I&amp;rsquo;m setting up SquirrelMail to point to my Exchange 2010 server via IMAP (don&amp;rsquo;t ask) and couldn&amp;rsquo;t get SM to talk to Exchange on port 993 (imaps). Even though the servers on the same subnet, any time passwords are being sent over the network I like to opt for SSL. I found a couple of sites suggesting that the problem was that there was no SSL certificate installed, but I knew for a fact there was a valid certificate because I could get to &lt;a href="https://webmail.example.com/"&gt;https://webmail.example.com/&lt;/a&gt; for OWA.&lt;/p&gt;</description></item><item><title>Do I still need swap space?</title><link>https://evan.wtf/2010/11/11/do-i-still-need-swap-space/</link><pubDate>Thu, 11 Nov 2010 14:36:49 +0000</pubDate><guid>https://evan.wtf/2010/11/11/do-i-still-need-swap-space/</guid><description>&lt;p&gt;About three years ago I replaced our primary database. For years we&amp;rsquo;d been plagued by awful performance in the database and we were never able to diagnose the problem. The original server was a real beast at the time: 8 Opterons (single core), 32 gigs ram, and a fibre channel RAID connected via a QLogic HBA. This was back in 2005, so those specs don&amp;rsquo;t probably sound that impressive today, but this was a crazy configuration (with a crazy price tag to match). On paper it looked like this server should be basically invincible but the performance was awful, slowing down every process within the company. We contacted a few different companies (including &lt;a href="http://commandprompt.com/"&gt;CommandPrompt&lt;/a&gt;, which employs several of the core Pg devs) to see if they could assist us in diagnosing the problems but tuning only helped to a point. There was just something wrong with the box, maybe having to do with the FC HBA itself (which nobody knew much about).&lt;/p&gt;</description></item><item><title>Using Zabbix for SNMP monitoring disk usage percent for Windows hosts</title><link>https://evan.wtf/2010/11/05/using-zabbix-for-snmp-monitoring-disk-usage-percent-for-windows-hosts/</link><pubDate>Fri, 05 Nov 2010 09:44:22 +0000</pubDate><guid>https://evan.wtf/2010/11/05/using-zabbix-for-snmp-monitoring-disk-usage-percent-for-windows-hosts/</guid><description>&lt;p&gt;A few years ago we moved from Nagios to Zabbix for our server monitoring needs. I wasn&amp;rsquo;t a big fan of Nagios, finding it a pain to manage with its myriad configuration files. It&amp;rsquo;s probably gotten better since I last toyed with it but since we moved to Zabbix I haven&amp;rsquo;t had much reason to look at Nagios again.&lt;/p&gt;&#10;&lt;p&gt;I also try to use SNMP monitoring for everything. SNMP is widely supported - all sorts of hardware has SNMP support, and with the net-snmp package you can pretty easily create your own SNMP-monitorable stuff on Linux. Since almost all of our stuff runs on Linux this has worked out pretty well, but our Exchange server is &lt;em&gt;probably&lt;/em&gt; going to be running on Windows for the foreseeable future. Windows has SNMP support, it&amp;rsquo;s just not on by default. However, even when it&amp;rsquo;s enabled it doesn&amp;rsquo;t have the simple &amp;ldquo;dskPercent&amp;rdquo; monitoring I&amp;rsquo;ve come to know and love with net-snmp on Linux, which simply tells you how full a given disk is as a percent. This makes it easy to set alerts when a disk reaches 80% full.&lt;/p&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></channel></rss>