Saturday, March 3, 2012

Odo on Material Wealth


I'll never understand this obsession with accumulating material wealth.  You spend your entire life plotting and scheming to acquire more and more possessions until your living areas are bursting with useless junk.  Then you die.  Your relatives sell everything and start the cycle all over again.
-- Odo, Star Trek: Deep Space Nine Season 1, Ep. 6.

Thursday, February 23, 2012

TomatoUSB as Internal DNS Server


I just found out TomatoUSB can be used to manage internal DNS.
On the Dnsmasq custom configuration add:
local-ttl=1
address=/hostname/ipaddress



That should have been in the documentation somewhere...

Wednesday, February 22, 2012

Installing CrashPlan on OpenIndiana


CrashPlan is a great way to backup your ZFS server, here's a quick install recipe for OpenIndiana:

Download the Solaris CrashPlan client from here:  http://www.crashplan.com/consumer/download.html?os=SunOS

Move the file to /var/spook/pkg then run...


# sudo pkgadd

(follow the prompts, do what's obvious).

Setup Crashplan service:
# svccfg import /opt/sfw/crashplan/bin/crashplan.xml
# svcadm enable crashplan


Obviously you'll want to move the backupArchive folder to your ZFS storage pool.  I like to move the entire crashplan folder to the pool and create a symbolic link to it so I've got a backup of the CP config files... 


# svcadm disable crashplan
# mv crashplan /tank/crashplan/opt/sfw/
# ln -s /tank/crashplan/opt/sfw/crashplan .
# svcadm enable crashplan

Sunday, February 19, 2012

Fat Head

Just finished watching Fat Head (watch for free below, via Hulu).




A few takeaways:

  • The food pyramids are based on a congressional committee, not scientific research.
  • Eating according to the food pyramid (low fat, high grains) will kill you.
  • Whole grain bread will cause your blood sugar to spike more than eating raw sugar.
  • Eating a lot of grains will increase your insulin resistance making you fat and giving you diabetes.
  • Cancer rates have increased after stuff that was supposed to replace saturated fat (e.g. margarine, canola oil, etc. became a part of our diets).
  • Eating high fat goods is good for you.
  • Skim milk could be making kids dumb in school.
  • School buses and long days at school are making kids fat, not McDonalds.
  • Chain fast food restaurants are targeted because they can be sued for money.
  • There is no indication that high cholesterol is related to heart disease.
  • Obesity death statistics included all deaths of obese people (not just deaths caused by obesity).
  • Scientists that challenge the current recommendations lose their research funding.

Why does your computer slow down as it gets older?

One reason I don't see addressed very often is your drive is too full...

Hard drives have a head that is like a needle for records, or a laser for CDs.  It has to position itself on a track then wait for the sector with the data you're after to spin into position.  The nature of circles is that the inside track is shorter than the outside so fewer sectors are available and it travels slower than the outer portion even though both make the same number of revolutions per minute.  More data can be accessed on the outer track than on the inner track in the same period of time.  Drive manufacturers and operating systems know this so data gets written from the outside in (and during defragmentation some operating systems try to move frequently used data on the outer tracks).  Also if all your data is on the outer tracks that head doesn't have to travel to the inner tracks which means you'll get faster seek times.


The good news is the fix is easy, just buy a new drive.  And while you're at it make sure you're getting a higher RPM drive than you had previously (the faster consumer drives are around 7200RPM).  Or you can avoid this problem entirely with a Solid State Drive (and get a different set of problems).




Who's locking up those tables?

Here's a simple query that reports SQL Server locks along with the program name, host, sql process id, and the user that went off to lunch in the middle of their transaction... 


select * from sys.dm_tran_locks l
join sys.dm_exec_sessions s on l.request_session_id = s.session_id
join sys.sysobjects o on l.resource_associated_entity_id = o.id