Wednesday Mar 18, 2009

The Developers Edge


Darryl Gove just announced the availability of a a new book, The Developers Edge over on his blog. The book is a collection of various entries on sites such as blogs.sun.com, and I have the privilege of having one of my past entries, STREAM and the performance impact of compiler optimization included.

The book is available via Safari, and if your looking for tips tricks and insights to get that little extra edge I'd highly recommend dipping in.

Monday Mar 09, 2009

DTrace, Fortran & Sun Studio


Just read a really, really cool article on a newly evolving feature of the Sun Studio Fortran Compiler, a -dtrace option, which will allow you to automatically generate dtrace probes in your Fortran code. Must go play when I get an opportunity... this is wickedly cool.

Friday Dec 21, 2007

DTrace ip Network Provider

I see that Brendan Gregg has posted a draft PSARC case for the first part of the DTrace Network Provider over on DTrace-discuss. I can't even begin to describe how useful this will be.
Technorati Tag(s) : ,

Wednesday Dec 05, 2007

DTrace and the case of the slow login...

An interesting little problem came my way earlier on today which yet again let me show just how useful DTrace is. Way back when I did a bit of work with a customer around a small webapp they migrated to Solaris from Linux. Anyway I got a mail from them earlier today, they split out the webserver onto a seperate box a while back, and recently the initial connections to the database tier have gotten very slow, for no obvious reasons.

They were looking into things like large logs and slow writes etc, but nothing obvious was popping up. So we went through a couple of initial steps to see if anything obvious jumped out - the various \*stat tools showed everything running normally so time to reach for DTrace. A quick oneliner showed up exactly where the problem was, and while its a simple fix I thought I'd share it as an example here. The key point here is that this isn't a resource starvation issue, which is when people generally reach for DTrace, rather its a nasty side effect of a simple change that doesn't manifest itself in an obvious manner. Right, enough typing, the oneliner was...

dtrace -n 'syscall:::entry { @sc[ustack()] = count(); } tick-5sec { printa(@sc); }'

Looking at the output the first thing that I spotted were some stacks similar to

			  libc.so.1`_so_send+0x7
              libresolv.so.2`send_dg+0xe5
              libresolv.so.2`res_nsend+0x45b
              libresolv.so.2`res_nquery+0xc9
              libresolv.so.2`ho_byaddr+0x379
              libresolv.so.2`ho_byaddr+0x80
              libresolv.so.2`gethostbyaddr_p+0x8e
              libresolv.so.2`res_gethostbyaddr+0x26
              nss_dns.so.1`_gethostbyaddr+0x21
              nss_dns.so.1`__nss_dns_getbyaddr+0x91
              nss_dns.so.1`getbyaddr+0x1b
              libc.so.1`nss_search+0x17d
              libnsl.so.1`_switch_gethostbyaddr_r+0x71
              libnsl.so.1`_uncached_gethostbyaddr_r+0x2a
              nscd`gethost_lookup+0x3dc
              nscd`0x80541da
and
              libc.so.1`stat64+0x7
              nss_files.so.1`getbygid+0x2e
              libc.so.1`nss_search+0x17d
              libc.so.1`_uncached_getgrgid_r+0x63
              nscd`getgr_lookup+0x3b2
              nscd`0x8054852
              libc.so.1`_thr_setup+0x4e
              libc.so.1`_lwp_start
Hmmm, so nscd is busy. The next question was "have there been any network changes?", they weren't aware of any but on some digging there was some reconfiguration work done recently on the DNS server they use. Anyway the temporary solution that they have put in place until the DNS issues are resolved is to add the new webserver machine directly to /etc/hosts.

Without DTrace the root cause would have been a lot more painful to find, instead this exchange was a couple of e-mails in the background while I got on with the day job. Gotta love DTrace ;).

Technorati Tag(s) : ,

Tuesday Aug 14, 2007

DTrace for #!/bin/sh


Now this is seriously handy - Alan Hargreaves has released a DTrace provider for sh over on opensolaris.org. No more hiding under the excuse "its the shell" - bad shell scripts will now be exposed :).

Tuesday Jun 26, 2007

Five DTrace Oneliners in Five Minutes


The 11th Irish Opensolaris Users Group meeting is taking place tonight, and I have offered to give one of the lightning talks. So, without further ado, the slides for my lightning presentation this evening

Now if you have clicked on the slides you will have noticed that its not quite five oneliners, but seeing as the DTrace consumers I'm using fit on one line I think they qualify :).

Technorati Tag(s) : ,

Monday Jun 18, 2007

11th Irish OpenSolaris Users Group Meeting


As organised once again by Timf, the 11th Irish OpenSolaris Users Group meeting has been scheduled.

Lightning Talks & Installfest
Tue June 26th frm 7 PM onwards @ DIT Kevin St, Lecture Theatre KE: G-007

Despite my previous utterances, and in light of the rather cute idea of five minute lightning talks, I'm going to give a brief talk, on (drum roll please)....

fintanr's top 5 DTrace oneliner's
  (otherwise known as where I start looking once \*stat tools reach their limitations)

So one minute a one liner - I might need to talk fast ;). Thanks to the folks at DIT for hosting us.

Technorati Tag(s) : ,
About

fintanr

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today