..bits & bytes teleported

Sunday Mar 22, 2009

The DTrace community doesn't really need another blog post to introduce the technology to folks who are into this kind of a stuff. Why this blog post then ? Please read on. (Note that, this is strictly for newbies of various things)

Scenario #1: I had to explain DTrace to my friend who was going to talk about some JVM + DTrace stuff in a presentation in her college. I suggested her the topic. Now the hard part was to even explain the basic idea behind DTrace and convince her enough so that she in turn could convince her evaluators- both parties being almost completely ignorant about DTrace. 

Scenario #2: I have been exploring a bit about MySQL + DTrace and was going to talk on it at the Bangalore MySQL UG meet yesterday. As expected, the audience was completely ignorant about DTrace and perhaps, of more importance- all of they ran MySQL on Linux for their business. Ah now things gets interesting. I wanted to 'wow' them with DTrace

One common thing between these, is that the audience in both cases are DTrace newbie. Before delving right into what DTrace can give us with all the technical details of probes, providers, consumers, production systems, et cetra , its very useful to set the stage with some real life analogies is set for the audience to move on to the excellent technical manuals available out there.

The remaining part of this post has the text from which my words were derived in both cases:

To introduce DTrace, you will have to speak about the importance of run time observability of production systems. Perhaps, that sentence was not very informative, however, please stay with me. I shall explain it.

Production systems:  We call a production system as such, when it is used to provide any kind of consumable service to consumers. Consider a scenario: the billing system in a departmental store serves all the billing terminals- the ones at which you get your stuffs billed. The billing system is perhaps run off a single powerful computer or a network of many powerful computers housed somewhere in the store or more likely in a central location, not in the store. The billing system is an example of a production system. Its in use and you cannot
take it down. If you do or it decides to do so on its own, you will face the wrath of customers and bear losses in your business.


Observability: In simple words, observing a system means to learn to see the various ways your program- a 10 line program or a billing system- is behaving at run time. Now, what do we mean by 'behaving' ?
Let's say, our program is now using 10% of the total CPU and other point of time it is using 90% of the CPU. That's one behavior of the program. More simply, let's say, for input X, the program is in function, F and for input Y the program goes to function, G.


Observing a system during its run time is hence also called dynamic observation of the system, 'cause it happens in real time. Since we basically 'trace' the behavior of the system at various instants of time, we can also refer to it as 'Dynamic Tracing'.


Off Radioactive elements and DTrace

Tracing of a system is a lot similar to the way Radioactive elements are used as tracers in human body to identify various abnormal body processes. Our topic of interest here, DTrace works a lot like this.

Using the DTrace framework, we can implant probes (or tracing points, like 'radioactive tracers') in our programs and can subsequently monitor those points for activities of interest. What we are interested in here, is Live Analysis and not post mortem analysis

I would also like to suggest you to go through the slides that I used for the talk. The later slides are MySQL specific, but the first few give some general information. It also incorporates some information that I was suggested by Richard on the dtrace-discuss list. Thanks to Michael and James for their suggestions. James also suggested some basic DTrace scripts that I could use to wow the audience. However, I will save them for the getting started session. I have just aquainted them.

Now its time to read http://www.solarisinternals.com/wiki/index.php/DTrace_Topics_Intro

I hope you find this post useful, and appreciate your comments.

Tuesday Mar 17, 2009

The Bangalore MySQL User Group is having a meetup this Saturday- 21 March. Please RSVP if you are coming.

We have the following sessions planned:

  1. MySQL Query Analyzer -- How to optimize queries using query analyzer-  by Thava Alagu, Sun Microsystems
  2. Using MySQL + DTrace -- By Amit Saha, Sun Microsystems, this session will be derived mainly from my article.

See you there!

The following blog post and the opinions expresses there in and their effects is strictly limited to the IEC Open Source Mela. No ripples beyond the effect is intended.

The IEC Open Source Mela is just a week away. Apart from being one of the organising team members, I am also in charge of the business plan event- Swatantra Saudagar (two Hindi words, 'Swatantra' meaning 'Freedom' and 'Saudagar' meaning 'Businessman', or a 'Trader').

What is it all about?

Simple: Formulate a business plan using only Free and Open Source software. Your business should stand on Free Software.

Now, you get the idea behind the name ? Oh well, yeah agreed that none of us are Free (Read about मुक्ति or Moksha) but atleast we can use Free softwares to build world changing business models. Making a Business plan is one thing and making a profitable business plan is another. That is the challenge.

Why does Free Software make sense?

The answer is in the question itself. Essentially, almost as a rule, large sums of money can be saved by using legally Free (as in cost) software to start off a business- a product, a dot com or a teaching academy. At the beginning, all such ventures have more time than money. This time can be utilized to tinker around with the tools to fit the specific purpose.

More..

Please read The Business of Free Software

Thursday Mar 05, 2009

.. is up on MySQL Developer Zone at http://dev.mysql.com/tech-resources/articles/getting_started_dtrace_saha.html

Have a comment on the quality, or the clarity or the usefulness? Let me know!

Many thanks to Giuseppe, Lenz, Martin MC Brown and Aaron for helping in various ways.


Monday Mar 02, 2009

As part of Sun's university relations, seven Sun engineers- Vadiraj, Varun, Blessen, Lawrence, Nirmal, Gautham and yours truly went to Vellore Institute of Technology, Vellore during the past weekend for a multi-track technology talks on Java ME, GlassFish, MySQL, JavaFX, Open Solaris Virtualization technologies.

There were three parallel tracks:
  • J2ME, GlassFish, MySQL- which form a nice combination of Client, Middleware and Database technologies and our (Vadiraj, Varun and Me) idea was to give hints here and there to the students how to bring all the three technolgies to develop applications and how each fits into the holistic idea. My MySQL slides are available here.
  • JavaFX
  • Open Solaris Virtualization technologies

It was a hot Sunday, thought not enough keep the ever enhusiastic students in their dorm rooms, ofcourse. All the sessions were well attended and I am sure this Sun Tech Day at VIT will lead to more awareness and adoption of the technologies among Students :-)

It was great to meet folks like Rohit (whom I had 'met a day earlier via Twitter), Aditya Kochar, Ram and few others. These students ensured everything was set up for the day.

It was a nic trip, especially amusing being the fact that there is a functional public railway track which runs through the campus of VIT, Vellore.