Thursday Aug 02, 2007

Outline of book for Solaris developers

It's probably useful to outline the contents of the book I'm working on. The book is meant as a resource for people coding for or on the Solaris platform, for either SPARC or x85/x64 processors. It falls into four main sections:

  • Hardware. Solaris is supported on both x86/x64 and SPARC. Both processor families have different features and different assembly languages. But there's also a lot of commonality in processors (e.g. Caches, TLBs etc.). The first section of the book outlines common features of processors, and also the differences between the two families. It also covers particular implementations of the families (e.g. UltraSPARC T1 etc.) All this material is useful context and definitions for the material that follows later.
  • Software. The software is Solaris and the tools that ship with it, the Sun Studio compilers, the performance profiling tools, and the debugging tools. In fact, there are tools for most questions that a developer could think of asking, the trick is to know that they exist and have some examples that demonstrate the use of the tools.
  • Source code. Inevitably much of what the developer deals with is source code, and this section demonstrates how to use the available tools to identify, tune, and improve source code. The section has coverage of the topic of using performance counters to determine what's causing performance bottlenecks, and also of deriving metrics using performance counters. The section also covers using compiler options and source code modifications to improve performance.
  • Multi-core. Almost all systems that are available today have more than one core. The challenge going forwards is to utilise these resources effectively and efficiently. This section focuses on the various approaches that can be used to leverage these resources, and the tools that can be used to diagnose and improve the code.

Wednesday Jul 25, 2007

List of Sun Studio redistributable libraries

List of libraries that are included with Sun Studio, and can be redistributed with applications compiled by Sun Studio.

All the documentation for Sun Studio 12.

List of all compiler flags

List of all the compiler options supported by Sun Studio 11 (Sun Studio 12 is similar).

Thursday Apr 05, 2007

Sun Studio Easter Egg

Well, there's always discussions about whether the film is faithful to the book or not. The question is now whether the game is a true representation of the IDE ;) It's an interesting mix of platform game and language questions. I'm striving not to waste the evening trying to complete The Temple of The Sun ;)

Friday Dec 15, 2006

Analyzer probe effects (part 2)

A while back I looked at the probe effect when running the Performance Analyzer on a multi-threaded code. The results showed that the probe effect, in terms of difference in runtime, was most pronounced when using multiple threads and recording the experiment to remote disk.

An alternative metric for probe effect was the amount of distortion in the results. To measure this I took the same code and observed the user time recorded by Analyzer when the experiments were recorded to remote disk or to /tmp. I also compared this to the user time reported by the command time. The results of this are shown in the following figure.

The results show that the runtime when recording the experiment to remote disk was more significantly increased than in my previous experiment. There is also one data point where the runtime was substantially perturbed.

The interesting part of the graph is the recorded user time. For both situations, the recorded user time is pretty much identical to that recorded by the time command. Possibly most critically, this is true even when the runtime is hugely disturbed. Anecdotally, this is what we've been assuming for a while, that the Analyzer data is largely correct even in the situation where there is some activity on the machine. (I'm sure that this would not be the case if the machine were placed under an extreme load, for example running two MT benchmarks.)

There is one rather odd observation, that when recording to the remote file system, the user time is slightly under estimated. But it is apparent from the graph that this is not a large effect.

The conclusion is that recording to a remote file system does not cause large distortion to the collected data, although it does cause the application to run more slowly.


Darryl Gove is a senior engineer in the Solaris Studio team, working on optimising applications and benchmarks for current and future processors. He is also the author of the books:
Multicore Application Programming
Solaris Application Programming
The Developer's Edge


« April 2014
The Developer's Edge
Solaris Application Programming
OpenSPARC Book
Multicore Application Programming