Prefetch Technologies // Keeping your cache lines cozy

Archive

Posts from 2008

Figuring out which package a Solaris utility belongs to

solarisFeb 4, 2008 1 min read

While reading through some old notes this weekend, I came across a page I created eons ago about managing Solaris packages. If you want to find out the file modes, the user and group ownership and the package a file belongs to, you can run the pkgchk utility with the "-l" and "-p" options and the name of a file to check: Pkgchk is a nifty utility!

$ read more →

Profiling Java methods with the heap profiling agent

javaFeb 2, 2008 2 min

The Java SDK comes with a number of tools and JVM options that can be used to analyze the performance of the Java runtime. One extremely useful tool is the heap profiler agent, which provides facilities to profile memory usage, CPU utilization and lock contention. To load the profiler agent to profile CPU utilization, you can add the "-agentlib:hprof=cpu=times" option to your java command line: Once loaded, the agent will use byte code injection (BCI) to instrument each method's entry and return points. This allows the agent to measure the number of times each method was called, the time spent in each method, and the call chain that led to the method being invoked…

$ read more →

Getting alerts when Java processes crash

javaJan 29, 2008 1 min

When bugs occur in the Java runtime environment, most administrators want to get notified so they can take corrective action. These actions can range from restarting a Java process, collecting postmortem data or calling in application support personnel to debug the situation further. The Java runtime has a number of useful options that can be used for this purpose. The first option is "-XX:OnOutOfMemoryError", which allows a command to be run when the runtime environment incurs an out of memory condition…

$ read more →

Monitoring Java garbage collection with jstat

javaJan 16, 2008 4 min

Java memory management revolves around the garbage collector, which is the entity responsible for traversing the heap and freeing space that is being taken up by unreferenced objects. Garbage collection makes life easier for Java programmers, since it frees them from having to explicitly manage memory resources (this isn't 100% true, but close enough). In the Java runtime environment, there are two types of collections that can occur. The first type of collection is referred to as minor collection…

$ read more →