Prefetch Technologies // Keeping your cache lines cozy

Generating byte code from a Java class file

javaDec 16, 2007 1 min read

I have been reading through the Java virtual machine specification, which covers all the details needed to implement a JVM. Once thing the specification talks about in detail is Java bytecode, which is the machine independent code that is executed by the virtual machine implementation. At various places in the specification I wondered what the byte code would look like for a chunk of Java code. Fortunately for me, the Java SDK comes with the javap utility, which can be run with the "-c" option to translate a class file into byte code: In the output above, you can see the methods and constants the MyEnv class utilizes, and the byte code that makes up the main method in the MyEnv class…

$ read more →

Printing a set of lines after a pattern match

shellDec 3, 2007 1 min

I had to do some pattern matching last week, and needed a way to print the two lines that occurred after each line that matched a specific string. Since awk provides robust pattern matching, I came up with the following awk command line to grab the information I needed: I digs me some awk!

$ read more →

Is ZFS ready for primetime?

Nov 28, 2007 1 min

Over the course of the past four months, I have encountered a couple of ZFS bugs that led to corrupt pools. One of the bugs hit this weekend, and resulted in us having to recover the pool from a snapshot on our storage array (this experience has made me truly appreciate the 3par's snapshot capability). These bugs have led me to question whether or not ZFS is ready for prime time, and if companies should be deploying it in production. If you have bumped into any ZFS bugs that led to data corruption, please leave me a comment.

$ read more →

Getting patches to install on Solaris 10 systems

solarisNov 27, 2007 1 min

There have been a number of threads in zones-discuss relating to Solaris 10 patching. Most of the feedback came from folks who ran into issues related to delayed activation patching, or patching zones that run on ZFS file system. Running zones on ZFS file systems is not currently supported by Sun, but it appears installing the latest version of 119254 or 119255 will help address a number of issues related to running zones on ZFS file systems. I am posting this here for future reference, and in an effort to help others who may be stumbling into issues applying patches to their Solaris 10 hosts.

$ read more →

Monitoring system utilization on Linux hosts

Nov 26, 2007 1 min

I am always on the look out for tools to analyze system performance. One nifty tool I recently came across is atop, which is an advanced system performance monitor for Linux. When atop is run, it displays overall system utilization in the header, and per-process CPU, memory, network or disk utilization information in the body (you need to patch your kernel to get disk and network utilization). Here is a sample atop session that shows just how awesome this utility is: I really dig the headers, as well as the network and disk utilization menus…

$ read more →