pcp
[Top] [All Lists]

Re: pmlogger -u questions

To: "Frank Ch. Eigler" <fche@xxxxxxxxxx>
Subject: Re: pmlogger -u questions
From: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Tue, 15 Apr 2014 09:39:46 +1000
Cc: Nathan Scott <nathans@xxxxxxxxxx>, pcp@xxxxxxxxxxx
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <20140414231820.GL14108@xxxxxxxxxx>
References: <01e901cf56df$4ce97de0$e6bc79a0$@internode.on.net> <1665962954.4723287.1397437104781.JavaMail.zimbra@xxxxxxxxxx> <534B4330.1060008@xxxxxxxxxxxxxxxx> <y0meh104nvl.fsf@xxxxxxxx> <534C4FF4.5000304@xxxxxxxxxxxxxxxx> <20140414212551.GK14108@xxxxxxxxxx> <534C6531.6050502@xxxxxxxxxxxxxxxx> <20140414231820.GL14108@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0
On 15/04/14 09:18, Frank Ch. Eigler wrote:
Hi -

On Tue, Apr 15, 2014 at 08:46:09AM +1000, Ken McDonell wrote:
[...]
Having actually made the change now, I like this even more ... in the
simplest implementation it is a one line change in __pmLogNewFile() to add
     setvbuf(f, NULL, _IONBF, 0);

We should do a round of analysis (strace or stap or whatever) to see
how the change would affect i/o syscall traffic, just to confirm that
we write records in nice big chunks.  (If not, another possibility
would be to adjust the stdio buffering dynamically, based on the
actual size of the logger data records.)

Yep, already doing that.

Before with default config on my workstation ... every 60 secs I see 2 writes of 4096 and/or 8192 bytes (can't explain why as yet)/

After with same config ... every 60 secs I see 2 writes of 11244 and 4 bytes (the latter is the trailer that I am confident I can force into the first write ... but this is more than a 1 line change as the semantics of __pmLogPutResult have to change in a subtle way).

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