<?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>Off you go... into the purple yonder! &#187; Sysadmin</title>
	<atom:link href="https://ward.vandewege.net/blog/category/sysadmin/feed/" rel="self" type="application/rss+xml" />
	<link>https://ward.vandewege.net/blog</link>
	<description></description>
	<lastBuildDate>Sun, 12 May 2024 20:57:05 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>shrinking Prometheus binaries</title>
		<link>https://ward.vandewege.net/blog/2019/02/shrinking-prometheus-binaries/</link>
		<comments>https://ward.vandewege.net/blog/2019/02/shrinking-prometheus-binaries/#comments</comments>
		<pubDate>Wed, 20 Feb 2019 14:17:40 +0000</pubDate>
		<dc:creator><![CDATA[ward]]></dc:creator>
				<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">https://ward.vandewege.net/blog/?p=1010</guid>
		<description><![CDATA[Out of the box, the Prometheus binaries in the latest release (v2.7.1) clock in rather large, at: -rwxr-xr-x 1 ward ward 60097588 Jan 31 06:18 prometheus -rwxr-xr-x 1 ward ward 38359349 Jan 31 06:19 promtool Fillippo Valsorda has a post &#8230; <a href="https://ward.vandewege.net/blog/2019/02/shrinking-prometheus-binaries/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Out of the box, the <a href="https://prometheus.io">Prometheus</a> binaries in the latest release (v2.7.1) clock in rather large, at:</p>
<pre>
-rwxr-xr-x 1 ward ward 60097588 Jan 31 06:18 prometheus
-rwxr-xr-x 1 ward ward 38359349 Jan 31 06:19 promtool
</pre>
<p>Fillippo Valsorda has <a href="https://blog.filippo.io/shrink-your-go-binaries-with-this-one-weird-trick/">a post</a> that describes shrinking golang binaries.</p>
<p>Prometheus uses the promu tool for building its binaries. Adding the necessary ld flags is done by editing <a href="https://github.com/prometheus/prometheus/raw/master/.promu.yml">.promu.yml</a> file like this:</p>
<pre>
--- .promu.yml.orig	2019-02-20 08:57:29.413554323 -0500
+++ .promu.yml	2019-02-19 17:44:33.451539440 -0500
@@ -17,6 +17,8 @@
         -X github.com/prometheus/common/version.Branch={{.Branch}}
         -X github.com/prometheus/common/version.BuildUser={{user}}@{{host}}
         -X github.com/prometheus/common/version.BuildDate={{date "20060102-15:04:05"}}
+        -s
+        -w
 tarball:
     files:
         - consoles
</pre>
<p>After building the prometheus binaries with the latest stable go (1.11.5) using <em>make build</em>, we end up with:</p>
<pre>
-rwxr-xr-x  1 ward ward 46379136 Feb 19 17:45 prometheus
-rwxr-xr-x  1 ward ward 29391136 Feb 19 17:46 promtool
</pre>
<p>The binaries are now reduced to about 77% of their original size. Better, but still not great.</p>
<p>We can confirm they are now indeed statically linked and stripped of debug info:</p>
<pre>
$ file prometheus
prometheus: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, stripped
$ file promtool
promtool: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, stripped
</pre>
<p>Applying upx takes a while but yields excellent results:</p>
<pre>
$ upx --brute prometheus 
                       Ultimate Packer for eXecutables
                          Copyright (C) 1996 - 2013
UPX 3.91        Markus Oberhumer, Laszlo Molnar &#038; John Reiser   Sep 30th 2013

        File size         Ratio      Format      Name
   --------------------   ------   -----------   -----------
  46379136 ->   9370100   20.20%  linux/ElfAMD   prometheus                    

Packed 1 file.

$ upx --brute promtool
                       Ultimate Packer for eXecutables
                          Copyright (C) 1996 - 2013
UPX 3.91        Markus Oberhumer, Laszlo Molnar &#038; John Reiser   Sep 30th 2013

        File size         Ratio      Format      Name
   --------------------   ------   -----------   -----------
  29391136 ->   6271396   21.34%  linux/ElfAMD   promtool                      

Packed 1 file.
</pre>
<p>And here are the resulting binaries:</p>
<pre>
-rwxr-xr-x  1 ward ward 9370100 Feb 19 17:45 prometheus
-rwxr-xr-x  1 ward ward 6271396 Feb 19 17:46 promtool
</pre>
<p>The binaries are now down to roughly 16% of their original size. There is a noticeable startup delay at runtime for the upx decompression, but for a long-running daemon like <em>prometheus</em> that doesn&#8217;t matter at all. </p>
<p>For <em>promtool</em>, which is used more interactively, you might find the startup delay annoying. This is the original binary:</p>
<pre>
$ time ./promtool.orig 
usage: promtool.orig [<flags>] <command /> [<args> ...]

Tooling for the Prometheus monitoring system.
...

real	0m0.055s
user	0m0.036s
sys	0m0.013s
</args></flags></pre>
<p>And here&#8217;s the UPX-compressed one:</p>
<pre>
$ time ./promtool
usage: promtool [<flags>] <command /> [<args> ...]

Tooling for the Prometheus monitoring system.
...

real	0m0.536s
user	0m0.521s
sys	0m0.016s
</args></flags></pre>
]]></content:encoded>
			<wfw:commentRss>https://ward.vandewege.net/blog/2019/02/shrinking-prometheus-binaries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian Jessie: TRIM on LVM on LUKS on SSD</title>
		<link>https://ward.vandewege.net/blog/2014/12/debian-jessie-trim-on-lvm-on-luks-on-ssd/</link>
		<comments>https://ward.vandewege.net/blog/2014/12/debian-jessie-trim-on-lvm-on-luks-on-ssd/#comments</comments>
		<pubDate>Mon, 29 Dec 2014 02:35:49 +0000</pubDate>
		<dc:creator><![CDATA[ward]]></dc:creator>
				<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://ward.vandewege.net/blog/?p=992</guid>
		<description><![CDATA[Even though I have been using SSDs for more than 5 years on my main machine, I&#8217;ve never bothered to set up TRIM properly. At first, that was because the drive didn&#8217;t support it &#8211; it was the first Intel &#8230; <a href="https://ward.vandewege.net/blog/2014/12/debian-jessie-trim-on-lvm-on-luks-on-ssd/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Even though I have been using SSDs for more than 5 years on my main machine, I&#8217;ve never bothered to set up TRIM properly. At first, that was because the drive didn&#8217;t support it &#8211; it was the first Intel X25M model, an 80GB drive. After that I moved on to an Intel X25M 120GB, and then an Intel 520 240GB. Both of those drives supported TRIM, but I didn&#8217;t configure my machine to use it.</p>
<p>I&#8217;m upgrading my laptop to SSD number four (an Intel 530, 480GB) and I decided it was time to set up TRIM properly. This is a fairly straightforward configuration with LUKS handling encryption for an LVM physical volume, inside of which the logical volumes live that I need to be able to run TRIM on. </p>
<p>Caveat emptor: because TRIM essentially makes it clear which blocks on the drive are in use and which are not, TRIM is disabled by default at the LUKS layer. Enabling TRIM will leak a bit of information (how many bytes are used by your encrypted partition), and should not be done in a &#8216;plausible deniability&#8217; scenario.</p>
<p>There&#8217;s a lot of information out there on this subject &#8211; the best docs appear to be for Arch &#8211; but it seems that Debian does things slightly differently from most other distributions. Here&#8217;s what I had to do to make TRIM work.</p>
<p>1. In /etc/default/grub, add to the GRUB_CMDLINE_LINUX_DEFAULT and GRUB_CMDLINE_LINUX lines:</p>
<pre>
  cryptdevice=/dev/sdaX:vg_name:discard
</pre>
<p>Replace /dev/sdaX with the path to the partition that contains your LUKS volume. Replace vg_name with the name of your LVM volume group.</p>
<p>2. Run update-grub:</p>
<pre>
  # update-grub
</pre>
<p>3. In /etc/lvm/lvm.conf, set</p>
<pre>
  issue_discards = 1
</pre>
<p>in the <i>devices</i> section.</p>
<p>4. update /etc/crypttab: add &#8216;,discard&#8217; to the fourth field for each encrypted partition:</p>
<pre>
sdaX_crypt UUID=abcdefgh-1234-5678-90ab-cdefghijklmn none luks,discard
</pre>
<p>5. update your initramfs:</p>
<pre>
  # mkinitramfs -o /boot/initrd.img-`uname -r`
</pre>
<p>6. it is sufficient to run lstrim weekly. So do not add it to the options in /etc/fstab, but rather install the following in /etc/cron.weekly/fstrim:</p>
<pre>
  #! /bin/sh
  for mount in / /boot /data; do
    fstrim -v $mount
  done
</pre>
<p>You should adjust the list of mount points to your situation. You&#8217;ll get a weekly e-mail with the amount of space that was trimmed; if you don&#8217;t like that, drop the -v argument to fstrim.</p>
<p>And that&#8217;s it. After a reboot, you can verify that TRIM is supported with:</p>
<pre>
# dmsetup table
sdaX_crypt: 0 929880064 crypt aes-xts-plain64 0...0 0 8:X 4096 1 allow_discards
</pre>
<p>If everything worked, you will see &#8216;allow_discards&#8217; at the end of the line for your LUKS-backed device. And fstrim will not complain with &#8216;discard operation not supported&#8217;.</p>
]]></content:encoded>
			<wfw:commentRss>https://ward.vandewege.net/blog/2014/12/debian-jessie-trim-on-lvm-on-luks-on-ssd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>when `scontrol show daemons` returns nothing&#8230;</title>
		<link>https://ward.vandewege.net/blog/2013/07/when-scontrol-show-daemons-returns-nothing/</link>
		<comments>https://ward.vandewege.net/blog/2013/07/when-scontrol-show-daemons-returns-nothing/#comments</comments>
		<pubDate>Fri, 05 Jul 2013 19:40:26 +0000</pubDate>
		<dc:creator><![CDATA[ward]]></dc:creator>
				<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://ward.vandewege.net/blog/?p=736</guid>
		<description><![CDATA[Slurm uses the scontrol show daemons command to figure out what it should run on the machine it is being invoked on. If you have a config file error, that command will return a blank line. And /etc/init.d/slurm-llnl will exit &#8230; <a href="https://ward.vandewege.net/blog/2013/07/when-scontrol-show-daemons-returns-nothing/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Slurm uses the</p>
<pre>
scontrol show daemons
</pre>
<p>command to figure out what it should run on the machine it is being invoked on. If you have a config file error, that command will return a blank line.</p>
<p>And /etc/init.d/slurm-llnl will exit without starting anything up.</p>
<p>scontrol will give you no indication of the nature of the configuration error. For that, use</p>
<pre>
slurmctld -Dvvvv
</pre>
<p>It&#8217;ll probably boil down to some dns/hostname related issue.</p>
]]></content:encoded>
			<wfw:commentRss>https://ward.vandewege.net/blog/2013/07/when-scontrol-show-daemons-returns-nothing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Selectively forcing PDF downloads for Firefox</title>
		<link>https://ward.vandewege.net/blog/2013/06/selectively-forcing-pdf-downloads-for-firefox/</link>
		<comments>https://ward.vandewege.net/blog/2013/06/selectively-forcing-pdf-downloads-for-firefox/#comments</comments>
		<pubDate>Sat, 15 Jun 2013 04:00:31 +0000</pubDate>
		<dc:creator><![CDATA[ward]]></dc:creator>
				<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://ward.vandewege.net/blog/?p=722</guid>
		<description><![CDATA[The built-in PDF.js viewer in Firefox is nice, but it still has quite a few bugs. Most of the rendering issues are caused by it not supporting certain PDF features yet. Sometimes one needs to make a PDF with fancy &#8230; <a href="https://ward.vandewege.net/blog/2013/06/selectively-forcing-pdf-downloads-for-firefox/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>The built-in <a href="https://mozillalabs.com/en-US/pdfjs/">PDF.js</a> viewer in Firefox is nice, but it still has <a href="https://bugzilla.mozilla.org/buglist.cgi?quicksearch=pdf+rendering">quite a few bugs</a>. Most of the rendering issues are caused by it not supporting certain PDF features yet.</p>
<p>Sometimes one needs to make a PDF with fancy features (e.g. color gradients) available for online viewing. In Firefox, a click on the link to the PDF will open it in PDF.js, which will warn you if it has features it can&#8217;t quite deal with. PDF.js will still try to render it. That can lead to visual artefacts and/or be very slow, neither of which are desirable and can be confusing for users.</p>
<p>There is a way to disable PDF.js server-side, and force Firefox to open a download popup box when user clicks on a PDF:</p>
<pre>
AddType application/octet-stream .pdf
</pre>
<p>Unfortunately, that makes Chrome (on Windows only, for some reason) really unhappy: it will open a blank new tab and not download the PDF file.</p>
<p>So, here&#8217;s how you tell Apache 2.2 to only change the Content-type header for PDF files when the User Agent says &#8216;Firefox&#8217;:</p>
<pre>
  &lt;IfModule mod_setenvif.c&gt;
    BrowserMatchNoCase firefox pdf=stream
  &lt;/IfModule&gt;

  &lt;IfModule mod_rewrite.c&gt;
    RewriteCond %{ENV:pdf} stream
    RewriteRule .pdf$ - [T=application/octet-stream]
  &lt;/IfModule&gt;
</pre>
<p>The BrowserMatchNoCase sets an environment variable called &#8216;pdf&#8217; to the value &#8216;stream&#8217; (which is an arbitrary choice). That environment variable is checked by the RewriteCond line; if it matches &#8216;stream&#8217;, the RewriteRule on the next line changes the Content-type header.</p>
<p>This can be done in a less convoluted way on <a href="http://httpd.apache.org/docs/2.4/">Apache 2.4</a> with the <a href="https://httpd.apache.org/docs/2.4/mod/core.html#if">&lt;If&gt;</a> directive.</p>
]]></content:encoded>
			<wfw:commentRss>https://ward.vandewege.net/blog/2013/06/selectively-forcing-pdf-downloads-for-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>more home server disk</title>
		<link>https://ward.vandewege.net/blog/2012/06/more-home-server-disk/</link>
		<comments>https://ward.vandewege.net/blog/2012/06/more-home-server-disk/#comments</comments>
		<pubDate>Tue, 12 Jun 2012 01:02:27 +0000</pubDate>
		<dc:creator><![CDATA[ward]]></dc:creator>
				<category><![CDATA[Everything else]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://ward.vandewege.net/blog/?p=708</guid>
		<description><![CDATA[I blogged almost 3 years ago about my home server upgrade. The thing has been running very reliably ever since, but I am running out of disk space again. So, time for another upgrade &#8211; disk only though this time. &#8230; <a href="https://ward.vandewege.net/blog/2012/06/more-home-server-disk/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I blogged <a href="http://ward.vandewege.net/blog/2009/09/a-new-home-server/">almost 3 years ago</a> about my home server upgrade. The thing has been running very reliably ever since, but I am running out of disk space again. So, time for another upgrade &#8211; disk only though this time. Notice the pattern?</p>
<p>  * October 2004 &#8211; purchase Shuttle home server with 2x 200GB disk (200GB useable)<br />
  * May 2007 &#8211; upgrade to 2x 500GB disk (500GB useable)<br />
  * September 2009 &#8211; upgrade to MSI Wind with 2x 1TB disk (1TB useable)<br />
  * June 2012 &#8211; upgrade to 2x 2TB disk (2TB useable)</p>
<p>Looks like my upgrades are roughly 2.5 years apart. Interesting!</p>
<p>I bought one Hitachi HDS723020BLA642 (that&#8217;s model &#8217;0f12115&#8242;, a 2TB SATA3 drive with 64MB of cache). Well, actually I ordered model &#8217;0S02861&#8242; which is SATA2 and only has 32MB of cache, but for some reason Amazon shipped me the faster one. Ah, well, I&#8217;m not complaining. The other drive is a Western Digital WD20EARX (that&#8217;s also 2TB SATA3 drive with 64MB of cache).</p>
<p>It&#8217;s worth noting that the two 1TB drives that are being replaced (WD10EADS-00L) have been rock solid over the past 2.75 years, despite a *lot* of data being written to them (nightly backups of more and more servers, which is also why I was running out of space&#8230;).</p>
<p>So now I have two SATA3 drives in a system that is SATA2 only. That&#8217;s too bad. On the other hand, this machine now has 10x the amount of disk space that its first incarnation had, back in 2004. Nice!</p>
]]></content:encoded>
			<wfw:commentRss>https://ward.vandewege.net/blog/2012/06/more-home-server-disk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrate MoinMoinWiki to Redmine</title>
		<link>https://ward.vandewege.net/blog/2011/11/migrate-moinmoinwiki-to-redmine/</link>
		<comments>https://ward.vandewege.net/blog/2011/11/migrate-moinmoinwiki-to-redmine/#comments</comments>
		<pubDate>Sun, 06 Nov 2011 19:39:23 +0000</pubDate>
		<dc:creator><![CDATA[ward]]></dc:creator>
				<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://ward.vandewege.net/blog/?p=654</guid>
		<description><![CDATA[I had a few old MoinMoin installs that were due for an upgrade, and I wanted to migrate them to Redmine. I found a migration script at norwinter.com, which I improved a bit. It will handle wiki pages with full &#8230; <a href="https://ward.vandewege.net/blog/2011/11/migrate-moinmoinwiki-to-redmine/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I had a few old <a href="http://moinmo.in">MoinMoin</a> installs that were due for an upgrade, and I wanted to migrate them to <a href="http://redmine.org">Redmine</a>.</p>
<p>I found a <a href="http://www.norwinter.com/2009/08/02/migrate-moinmoinwiki-to-redmine/">migration script</a> at norwinter.com, which I improved a bit. It will handle wiki pages with full history as well as attachments. It won&#8217;t preserve who committed revisions, however &#8211; that is hardcoded in the script. So, this is still a hack. </p>
<p>Usage instructions:</p>
<p>a) copy your MoinMoinWiki data/pages directory to the server that runs your redmine install<br />
b) put the migrate_from_moinmoin.rake script in lib/tasks/ in your Redmine install<br />
c) edit the migrate_from_moinmoin.rake script, replace both instances of YOUR@EMAIL.ADDRESS<br />
d) run <i>rake redmine:migrate_from_moinmoin RAILS_ENV=&#8221;production&#8221;</i><br />
e) provide a unique redmine project id and the path to your MoinMoinWiki data/pages directory</p>
<p>And here is my version of <a href="/blog/wp-content/uploads/2011/11/migrate_from_moinmoin.rake">migrate_from_moinmoin.rake</a>. </p>
<p>This script worked well enough for me to import MoinMoinWiki version 1.5.7 to Redmine 1.2.0.</p>
]]></content:encoded>
			<wfw:commentRss>https://ward.vandewege.net/blog/2011/11/migrate-moinmoinwiki-to-redmine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>grub rescue commands</title>
		<link>https://ward.vandewege.net/blog/2011/08/grub-rescue-commands/</link>
		<comments>https://ward.vandewege.net/blog/2011/08/grub-rescue-commands/#comments</comments>
		<pubDate>Sun, 28 Aug 2011 01:30:18 +0000</pubDate>
		<dc:creator><![CDATA[ward]]></dc:creator>
				<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://ward.vandewege.net/blog/?p=634</guid>
		<description><![CDATA[I wasted some time on Friday trying to get a machine with grub 2 installed to boot. The machine booted into Grub&#8217;s rescue mode. Grub 2&#8242;s rescue mode is nice, but not exactly intuitive (no &#8216;help&#8217; or &#8216;?&#8217; command), and &#8230; <a href="https://ward.vandewege.net/blog/2011/08/grub-rescue-commands/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I wasted some time on Friday trying to get a machine with grub 2 installed to boot. </p>
<p>The machine booted into Grub&#8217;s rescue mode. Grub 2&#8242;s rescue mode is nice, but not exactly intuitive (no &#8216;help&#8217; or &#8216;?&#8217; command), and documentation for it is apparently not easily found via Google.</p>
<p>This is what was eluding me for a while:</p>
<pre>
In rescue mode, only the insmod, ls, set, and unset commands are 
normally available. If you end up in rescue mode and do 
not know what to do, then see "GRUB only offers a rescue shell."
</pre>
<p>That&#8217;s from the Grub manual at <a href="http://www.gnu.org/software/grub/manual/grub.html#Commands">gnu.org</a>. </p>
<p>The steps involved in recovery are documented <a href="http://www.gnu.org/software/grub/manual/grub.html#GRUB-only-offers-a-rescue-shell">in the same manual</a>. Basically you need to set the prefix and root variables, and then insmod the &#8216;normal&#8217; module and run it.</p>
]]></content:encoded>
			<wfw:commentRss>https://ward.vandewege.net/blog/2011/08/grub-rescue-commands/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>disk, disk, disk</title>
		<link>https://ward.vandewege.net/blog/2011/07/disk-disk-disk/</link>
		<comments>https://ward.vandewege.net/blog/2011/07/disk-disk-disk/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 14:13:50 +0000</pubDate>
		<dc:creator><![CDATA[ward]]></dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://ward.vandewege.net/blog/?p=496</guid>
		<description><![CDATA[I started adding 165 TB of disk to one of our clusters today. This is what that looks like &#8211; 55 three TB disks: The packaging was not too great; while all disks were well packaged individually, the big boxes &#8230; <a href="https://ward.vandewege.net/blog/2011/07/disk-disk-disk/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I started adding 165 TB of disk to one of our clusters today. This is what that looks like &#8211; 55 three TB disks:</p>
<p><a href='/blog/wp-content/photos/img_3317.jpg' title='165 TB'><img src='/blog/wp-content/photos/thumb_img_3317.jpg' alt='165 TB' width='130' height='97' class='pp_empty' /></a></p>
<p>The packaging was not too great; while all disks were well packaged individually, the big boxes that contained the individual drive boxes were flimsy. As a consequence, one of the disks got rather damaged (the one on the right):</p>
<p><a href='/blog/wp-content/photos/img_3318.jpg' title='damaged disk'><img src='/blog/wp-content/photos/thumb_img_3318.jpg' alt='damaged disk' width='130' height='97' class='pp_empty' /></a></p>
<p>I don&#8217;t know what it got hit with, but it must have been a pretty serious blow. The aluminium enclosure of the drive is severely dented and even cracked; the white line in the image below is an actual crack in the metal:</p>
<p><a href='/blog/wp-content/photos/IMG_3327.JPG' title='cracked disk'><img src='/blog/wp-content/photos/thumb_IMG_3327.JPG' alt='cracked disk' width='130' height='97' class='pp_empty' /></a></p>
<p>Back in October 2009 I added 130 TB of disk to another cluster, which looked like this, prior to install:</p>
<p><a href='/blog/wp-content/photos/2009_10_09_10.07.22.jpg' title=130TB, big'><img src='/blog/wp-content/photos/thumb_2009_10_09_10.07.22.jpg' alt='130TB' width='97' height='130' class='pp_empty' /></a></p>
<p>That was 65 times <a href="http://www.wdc.com/en/products/products.asp?driveid=610">WD2002FYPS</a>. </p>
<p>So this time around &#8211; almost 18 months later &#8211; we get 27% more capacity using 15% fewer drives. Got to love the computer industry and the progress it makes.</p>
]]></content:encoded>
			<wfw:commentRss>https://ward.vandewege.net/blog/2011/07/disk-disk-disk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>idle power draw of modern Opteron CPUs</title>
		<link>https://ward.vandewege.net/blog/2011/04/idle-power-draw-of-modern-opteron-cpus/</link>
		<comments>https://ward.vandewege.net/blog/2011/04/idle-power-draw-of-modern-opteron-cpus/#comments</comments>
		<pubDate>Tue, 05 Apr 2011 22:05:30 +0000</pubDate>
		<dc:creator><![CDATA[ward]]></dc:creator>
				<category><![CDATA[Environment]]></category>
		<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://ward.vandewege.net/blog/?p=599</guid>
		<description><![CDATA[I&#8217;ve been curious for a while about how much power Opteron CPUs draw when idle, so I set aside a bit of time to do some measurements. I used a Supermicro 1U system with redundant power supply. The motherboard model &#8230; <a href="https://ward.vandewege.net/blog/2011/04/idle-power-draw-of-modern-opteron-cpus/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been curious for a while about how much power Opteron CPUs draw when idle, so I set aside a bit of time to do some measurements. I used a Supermicro 1U system with redundant power supply. The motherboard model is <a href="http://www.amazon.com/gp/search/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&#038;keywords=H8DGU-F&#038;tag=offyougointot-20&#038;index=aps&#038;linkCode=as2&#038;camp=1789&#038;creative=9325">H8DGU-F</a>. The system has 32GB of DDR3 ECC ram, and two <a href="http://www.amazon.com/gp/search/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&#038;keywords=x25-m&#038;tag=offyougointot-20&#038;index=aps&#038;linkCode=as2&#038;camp=1789&#038;creative=9325">Intel X25-M</a> 120GB SSDs. There are two <a href="http://www.amazon.com/gp/search/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&#038;keywords=opteron%206128&#038;tag=offyougointot-20&#038;index=aps&#038;linkCode=as2&#038;camp=1789&#038;creative=9325">Opteron 6128</a> CPUs installed. These Opterons have 8 cores each, and they run at 2.0GHz. These are the CPU power specs:</p>
<table>
<tr>
<td width="200">&nbsp;&nbsp;Average CPU Power</td>
<td align="right">80W</td>
</tr>
<tr>
<td>&nbsp;&nbsp;Thermal Design Power (TDP)</td>
<td align="right">115W</td>
</tr>
</table>
<p>The &#8216;Average CPU Power&#8217; is based on &#8216;average&#8217; use, which is explained <a href="http://en.wikipedia.org/wiki/Average_CPU_power">on Wikipedia</a>. </p>
<p>According to Wikipedia, the <a href="http://en.wikipedia.org/wiki/Thermal_design_power">Thermal Design Power</a> is the maximum power consumption for thermally significant periods running worst-case non-synthetic workloads (cf. <a href="http://en.wikipedia.org/wiki/CPU_power_dissipation">this article</a>). If we assume that the bulk of the electrical power consumed by a CPU is converted into waste heat, then the TDP can be a reasonable approximation for the amount of electrical power a CPU would consume under a worst-case, real-world load.</p>
<p>I used cpuburn to generate such a load. There was no IO load on the system during the tests. I measured power draw with an off-the-shelf <a href="http://www.amazon.com/gp/search/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&#038;keywords=opteron%206128&#038;tag=offyougointot-20&#038;index=aps&#038;linkCode=as2&#038;camp=1789&#038;creative=9325">Kill-a-watt</a>, so these results should be taken with a grain of salt.</p>
<table>
<tr>
<td align="right">&nbsp;&nbsp;16 cores</td>
<td>idle</td>
<td>145W (153VA)</td>
</tr>
<tr>
<td align="right">&nbsp;&nbsp;8 cores</td>
<td>loaded on 1 cpu</td>
<td>215W (221VA)</td>
</tr>
<tr>
<td align="right">&nbsp;&nbsp;8 cores</td>
<td width="200">loaded spread over 2 cpus</td>
<td>235W (243VA)</td>
</tr>
<tr>
<td align="right">&nbsp;&nbsp;14 cores</td>
<td>loaded</td>
<td>277W (285VA)</td>
</tr>
<tr>
<td align="right">&nbsp;&nbsp;16 cores</td>
<td>loaded</td>
<td>290W (297VA)</td>
</tr>
</table>
<p>The data indicates that the idle vs. full load power consumption difference for one CPU is 70 to 75W.</p>
<p>If we assume the power consumption under full load is 115W (the TDP for the processor), then idle power consumption would be 40 to 45W per CPU. That would put idle power consumption at 35-39% of its TDP for this particular CPU.</p>
]]></content:encoded>
			<wfw:commentRss>https://ward.vandewege.net/blog/2011/04/idle-power-draw-of-modern-opteron-cpus/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>compression</title>
		<link>https://ward.vandewege.net/blog/2010/11/compression/</link>
		<comments>https://ward.vandewege.net/blog/2010/11/compression/#comments</comments>
		<pubDate>Mon, 15 Nov 2010 15:12:15 +0000</pubDate>
		<dc:creator><![CDATA[ward]]></dc:creator>
				<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://ward.vandewege.net/blog/?p=591</guid>
		<description><![CDATA[Before: -rw-r--r-- 1 root root 1.1G 2010-10-31 20:19 10125-127-2010-10.error After: -rw-r--r-- 1 root root 11M 2010-10-31 20:19 10125-127-2010-10.error.bz2 Bzip2 reduced the file to 1% of its original size. Not bad!]]></description>
				<content:encoded><![CDATA[<p>Before:</p>
<pre>
-rw-r--r-- 1 root  root  1.1G 2010-10-31 20:19 10125-127-2010-10.error
</pre>
<p>After:</p>
<pre>
-rw-r--r-- 1 root  root   11M 2010-10-31 20:19 10125-127-2010-10.error.bz2
</pre>
<p>Bzip2 reduced the file to 1% of its original size. Not bad!</p>
]]></content:encoded>
			<wfw:commentRss>https://ward.vandewege.net/blog/2010/11/compression/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
