Browse thread
gc overhead
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Peter Hawkins <hawkinsp@c...> |
| Subject: | Re: [Caml-list] gc overhead |
Hi... On Tue, Mar 2, 2010 at 12:11 PM, Warren Harris <warrensomebody@gmail.com> wrote: > > On Mar 1, 2010, at 12:54 AM, Richard Jones wrote: > >> On Sun, Feb 28, 2010 at 04:16:03PM -0800, Warren Harris wrote: >>> >>> I would like to determine what percentage of my application's cpu time >>> is spent in the garbage collector (for tuning purposes, but also just >>> to monitor the overhead). Is there any way to obtain this information >>> short of using gprof? Additional information provided by Gc.stat would >>> be ideal, or perhaps a Gc.alarm that was called at the beginning of >>> the gc cycle, but neither of these seem to exist. >> >> I would have to say what's wrong with using gprof? > > What's wrong with it is that it provides no way to monitor gc overhead in an > active service. I would have recommended using oprofile on linux, which I greatly prefer to GCC's built-in profiling support for profiling C programs. It has a low and tunable overhead, and because it's a sampling profiler it doesn't perturb the results anywhere near as much as standard profiling instrumentation. Unfortunately last time I checked it had poor OCaml support (no support for unwinding the OCaml call stack, so no context-sensitivity in the profiles). That said, you probably don't need context-sensitivity to determine the fraction of execution time spent in the GC. It might be worth a try... Peter