On Tue, 9 Jan 2001, Alan Bailey wrote:
> Thanks, but no thanks. I barely know java, so it wouldn't be much help.
> I will try writing a tool with multiple processes.
Beware, libpcp is not thread safe (static globals in assorted
important places). However, multiple threads could easily
fork/exec pminfo or pmprobe in parallel as an easy way of
implementing non-blocking (aka asynchronous) fetch. In general,
you'll get better latency with pmprobe compared to pminfo, and
the output is designed to be easier to parse.
Regarding the original question - yes we invested a lot of
effort making the PCP protocols efficient. We tuned the
client<->pmcd IPC layers with sockopts such as TCP_NODELAY,
and profiled and tuned the critical paths thru the libpcp call
stack, eliminated unnecessary system calls, etc. We also used a
a binary protocol - more compact and efficient cmp'd to ascii.
-- Mark
|