[Nagiosplug-devel] Check_Http Plugin BUG ?

Holger Weiss holger at CIS.FU-Berlin.DE
Thu Mar 22 18:55:13 CET 2007


* Ton Voon <ton.voon at altinity.com> [2007-03-22 15:02]:
> On 22 Mar 2007, at 14:42, Holger Weiss wrote:
> > * Stefan Meier <meier0001 at web.de> [2007-03-22 11:34]:
> >> They changed the Value "MAX_INPUT_BUFFER" from 1024 to 8196 on the
> >> Headerfile common.h.
> >
> > While I wouldn't classify this a "bug" ;-), I stumbled over the small
> > buffer size some time ago, too.  No idea why it was set that low in
> > the first place.  If nobody objects I'll increase it to 8192.
>
> I've got no objections either, although longer term we should be able
> to cater for arbitrary sizes.

I'm not aware of a place where we don't handle input data of arbitrary
length (that I'm not aware doesn't mean a lot, though).  My intention
for this change was to reduce the number of iterations of loops such as:

	while (fgets(buf, MAX_INPUT_BUFFER, stream))
		/* do something with buf */;

Of course, increasing MAX_INPUT_BUFFER increases memory usage and the
possible performance gain depends on the platform and the actual
operation for which the buffer is used.  However, using only 1k will
most likely slow things down in many cases.

> I think a new release is required, so we'll see what the Tinderbox
> tests say for this change before we take a new cut.

Okay, I committed the change.

Holger

-- 
PGP fingerprint:  F1F0 9071 8084 A426 DD59  9839 59D3 F3A1 B8B5 D3DE




More information about the Devel mailing list