Installing Puppet on OpenSolaris

December 26th, 2009

While looking at the Reductive Labs’  Puppet on Solaris page I saw there was a repository which hosts Puppet in a pkg format.  This makes installing a Puppet server on OpenSolaris pretty easy.

pkg set-publisher -O http://pkg.codenursery.com/ codenursery.com
pkg install puppet

groupadd puppet
useradd -g puppet puppet
mkdir /etc/puppet /var/puppet

/usr/ruby/1.8/sbin/puppetd  --genconfig > /etc/puppet/puppet.conf

svcadm enable puppet/master

2009 LISA Conference

November 8th, 2009

I spent last week at the LISA Conference in Baltimore MD.  if you aren’t familiar with LISA, it is a conference focused on system administration.  This is the 4th  LISA I’ve attended in the last 12 years.

On Monday I attended a tutorial by Richard Elling on ZFS: A Filesystem for Modern Hardware.

On Tuesday I attended two tutorials.  The first was Jacob Farmer’s Disk-to-Disk Backup and Eliminating Backup System Bottlenecks.  The second was Tom Limoncelli’s Design Patterns for System Administrators.

Unfortunately on both Monday and Tuesday I had to spend a significant amount of time on conference calls helping to troubleshoot some work related issues, but the time I spent in all 3 sessions and viewing their materials was helpful.  I would definitely recommend attending tutorials by any of the 3 people above if they are teaching a topic of interest to you.

On Tuesday night I attended some (Open)Solaris birds-of-a-feather sessions.  There were a few times that people in the crowd were being belligerent towards a speaker (mostly complaining about the difficulty of finding information of various types), even though the speaker certainly had no sway over what the person in the crowd was upset about.  I don’t care how much money your company spends with a vendor, there is never a reason to be rude.   David Miner gave a talk about whats coming in Solaris.next and Ben Rockwood gave an entertaining and informative presentation on ZFS in the Trenches.

I was lucky enough to get a chance to talk with David Miner over a quick lunch later in the week and talk about the new opportunities and challenges with the OpenSolaris installation technologies.

On Wednesday through Friday I attended a mix of presentations, met with a bunch of vendors, and also sat in some of the ‘Guru is in’ sessions and talked with a number of conference attendees.  The highlights for me were:

  • Werner Vogel (CTO of Amazon) gave a fascinating talk on the history of Amazon’s IT philosophy and infrastructure and how they evolved from a humble internal IT shop to adding a business which is the dominant  cloud computing provider.
  • Elizabeth Zwicky’s talk on “Searching for Truth, or at Least Data: How to Be an Empiricist Skeptic”
  • Bryan Cantrill’s talk on “Visualizing DTrace: Sun Storage 7000 Analytics”
  • Talking with the folks from Splunk (awesome log searching analysis tool)

Creating a slow operation log for OpenDS

November 2nd, 2009

For anyone that has spent much time looking at MySQL performance, you will be familiar with the ’slow query log’.  This basically is a log where queries that took over some amount of time would get recorded.   For kicks, I tried implementing a similar hook for OpenDS.  My current version is in pretty rough shape (not very efficient or configurable), but seems to work.  I started from a copy of the TextAccessLogPublisher.java file and created a new one called TextSlowAccessLogPublisher.java.  My logic is basically:

  • create a hash table
  • emptied out all the log XYZIntermediateMessage and connect/disconnect methods
  • when a request comes in, store the text to log in the hash table (keyed off connectionID and opNumber) instead of outputting it (changed the logSearchRequest, logModifyRequest, … methods)
  • when a request is finished processing, we check the elapsed time (etime)
    • if the elapsed time greater  than our or equal to our threshold
      • print the request info we stashed in the hash table and delete it
      • print the response info
    • if the elapsed time is less than our threshold
      • delete the request info from the hash table, don’t print anything

There are a few more things I want to do:

  • Make the ’slow operation threshold time’ dynamically changeable (looks like I will need to mess with configuration objects since I want to add an additional parameter not in the standard access log type)
  • Add extra information to the output format such as authorization DN (and potentially client connection info if not too hard to retrieve)
  • Instead of all the text formatting for every request, just put the Operation object into the hash table, since the majority of operations won’t ever get printed we shouldn’t burn CPU formatting them.  The operations would only be formatted to text if the operations end up being slow and printed.

Files

Central PA Open Source Conference

October 17th, 2009

I had a good time attending the CPOSC event  today, which was held at Harrisburg University.  Got to see lots of old friends and acquaintances and enjoyed the speakers.  At only $35 (which included a t-shirt and food), it was an awesome bargain.  Thanks to John and Eric for doing such a great job organizing the event and all the presenters for sharing their knowledge.

Effect of multi-byte locales on GNU grep speed in OpenSolaris

September 25th, 2009

I have a lab machine running OpenSolaris 2009.06 (updated to snv_117) and had created an LDIF file with about 100k small entries in it (file size was ~ 63 megs).  I wanted to get a count of the exact number of entries so I ran:

grep -c ^dn:

I expected it to take a second or two.  I was wrong.  It was painfully slow.

I used the time command to re-run the grep and saw it clocked in at just over a minute.

This was weird, so I though it was time to investigate further.  I used the DTrace Toolkit’s hotuser command to see what the hot functions were:

pfexec /opt/DTT/hotuser -c "grep -c ^dn: /var/tmp/search.out"
Sampling... Hit Ctrl-C to end.

FUNCTION                                                     COUNT   PCNT
...<snipped out smaller functions>...
ggrep`check_multibyte_string                                    5480   8.9%
methods_unicode.so.3`__mbrtowc_dense_utf8                      12328  20.1%
libc.so.1`mbrlen                                               13566  22.1%
libc.so.1`memset                                               23014  37.5%

Hmm, interesting to see the calls to mbrlen and methods_unicode among the hot functions.  Lets check my $LANG setting:

echo $LANG
en_US.UTF-8

Bingo!  Lets try it again with a non multi-byte LANG setting.

LANG=C time grep -c ^dn: /var/tmp/search.out
99987

real        0.1
user        0.0
sys         0.0

That looks normal.  Now lets try one more time with a multi-byte LANG to be sure:

LANG=en_US.UTF-8 time grep -c ^dn: /var/tmp/search.out
99987

real     1:01.4
user     1:01.3
sys         0.0

Yep, the problem is confirmed.

Notes

For those unfamiliar with OpenSolaris,  the default path has /usr/gnu/bin first.  The grep I was using was:

grep -V
grep (GNU grep) 2.5

Copyright 1988, 1992-1999, 2000, 2001 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If you use the non-GNU grep available at /usr/xpg4/bin/grep it doesn’t have the big slowdown regardless of the LANG.

I also tried the same test on the GNU wc command and saw about a 25x difference when using a multi-byte LANG.

For both grep and wc, I re-ran the tests multiple times to make sure that file system caching played no role in the results.

I think these performance differences are way higher than they should be, I’m going to dig further when I have a chance.

Photos from the 2009 Harrisburg Half Marathon

September 13th, 2009

I need to upload  more, but you can see the pics at Smugmug.

Pictures from Wildwood Lake

September 12th, 2009

I got a new camera this week and went up to  Wildwood Park near HACC to take some pictures today.   I really like the 20x zoom lense (the main reason I bought it), and the image stabilization seemed to work pretty well.   I think it is cool that I was able to see the details of the pollen on the bee.

Bee on a flower

Goose swimming in green alge

Goose swimming in green alge

We all live down stream

We all live downstream

Overrun lake

Overrun lake

Main trail

Main trail

Moving out west (in a bit)

September 8th, 2009

My wife and I have decided to move to the San Francisco/SiliconValley area.  We haven’t set a date yet,  but we are definitely moving sometime in 2010.

Testing – please ignore

September 6th, 2009

Just wanting google to start indexing my wiki.

Prius at 33,000 miles

September 6th, 2009

I’ve had my Prius for about 16 months now (got it in early May 2008).  So far I have been largely happy.  I’ve averaged about 44-47 MPG in the warmer months and 42-44MPG in the winter with a roughly  50% highway/50% city mix of driving.  I’ve only had a few  minor nits/issues:

  1. The gas tank is made of a (sort of) flexible membrane and it becomes stiff during colder months and won’t hold as much fuel.  During the winter I can often only get about 75% as much gas in the tank as I can during the spring/summer/fall months.   More info available in a hybrid cars forum.
  2. The default behavior is to beep inside the car when in reverse (versus trucks which beep outside to warn people behind it).  It turns out it is fairly easy to disable the beeping using these instructions.  I just followed the instructions this morning.
  3. It is difficult to jump start other cars.  The positive terminal is really small and when I tried to help a friend get his car started, the metal “jaw” on the jumper cables were too big to fit in the space near the positive terminal.
  4. I wish there was better iPod integration by default (I am currently just using the AUX jack).  A friend of mine purchased the factory unit for his Lexus and the interface is dissapointing.  I am considering getting a Vaistech unit.

Other notes:

  1. I’ve had no maintenance problems.
  2. The leg/headroom seem fine.  While I am not tall, I regular drive 3 other people to lunch, and the bigger guys in the office can fit comfortably (although the 6′6″ guy does always take shotgun).
  3. By folding down the back seats I can easily put my mountain bike in the trunk if I take off the front tire.

Copyright © 2010 williamhathaway.com. All Rights Reserved.
No computers were harmed in the 0.434 seconds it took to produce this page.

Designed/Developed by Lloyd Armbrust & hot, fresh, coffee.