pcp
[Top] [All Lists]

Re: speed

To: Alan Bailey <abailey@xxxxxxxxxxxxx>
Subject: Re: speed
From: Mark Goodwin <markgw@xxxxxxx>
Date: Wed, 10 Jan 2001 10:02:36 +1100 (EST)
Cc: Troy Dawson <dawson@xxxxxxxx>, pcp@xxxxxxxxxxx
In-reply-to: <Pine.LNX.4.10.10101091240120.12133-100000@osage.ncsa.uiuc.edu>
Sender: owner-pcp@xxxxxxxxxxx
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



<Prev in Thread] Current Thread [Next in Thread>