You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by Pavel Ilyashenko <re...@gmail.com> on 2007/12/19 13:01:43 UTC
Buffer size configuration in BinFileInputStream::readBytes
Hi,
In our application we use Xerces's API SAXParser::*parse* (const InputSource
&source).
During enforcement after its work we have seen that the function
XMLReader::*refreshCharBuffer*() calls to
BinFileInputStream::*readBytes*(XMLByte
*const toFill, const unsigned int maxToRead) function.
One of *readBytes* function's parameters defines the max amount bytes which
will be read.
So my question is: How we can control this value? Does it some environment
variable or something else?
Thanks a lot.
*Best Regards***
*Pavel Ilyashenko***
*2-978-40173*
*Amdocs Company.*
** <http://spot/>
RE: Buffer size configuration in BinFileInputStream::readBytes
Posted by Pavel Ilyashenko <pa...@amdocs.com>.
Hi,
There are two questions:
1. In run-time we see that the process spends ~20% in system call - read.
Also we see that the reading of verified XML files is performed with buffer size 508b.
turss command output:
open("/spotuser/nft/aimsys/nftwrk83/var/m3g/projs/dd/temp/Dec/23/dd.ABL_Statement_XML0000032373A00412007020000000003.200712230712231130.temp.xml", O_RDONLY|0x800, 0666) = 51
read(51, "< s t a t e m e n t > \n< b i l ".., 512) = 512
read(51, "a n c e - c e n t e r > < r e m ".., 508) = 508
read(51, "t e m e n t - a d d r e s s - p ".., 508) = 508
read(51, "m i d d l e - n a m e > S E E D ".., 508) = 508
Actually, we harden to understand how is the buffer size defined?
Do you have any idea what may be a cause?
2. Do you have any recommendation/reference list of performance issue which we can use in order to improve your API usage?
Thanks.
Best Regards
Pavel Ilyshenko
+297-8-62-40173
AMDOCS > INTEGRATED CUSTOMER MANAGEMENT
-----Original Message-----
From: David Bertoni [mailto:dbertoni@apache.org]
Sent: December 19, 2007 19:40
To: c-users@xerces.apache.org
Subject: Re: Buffer size configuration in BinFileInputStream::readBytes
Pavel Ilyashenko wrote:
> Hi,
>
> In our application we use Xerces's API SAXParser::*parse* (const InputSource
> &source).
>
>
>
> During enforcement after its work we have seen that the function
>
> XMLReader::*refreshCharBuffer*() calls to
> BinFileInputStream::*readBytes*(XMLByte
> *const toFill, const unsigned int maxToRead) function.
>
> One of *readBytes* function's parameters defines the max amount bytes which
> will be read.
>
> So my question is: How we can control this value? Does it some environment
> variable or something else?
It's a compile-time constant defined in xercesc/internal/XMLReader.hpp:
enum Constants
{
kCharBufSize = 16 * 1024
, kRawBufSize = 48 * 1024
};
Dave
This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement,
you may review at http://www.amdocs.com/email_disclaimer.asp
Re: Buffer size configuration in BinFileInputStream::readBytes
Posted by David Bertoni <db...@apache.org>.
Pavel Ilyashenko wrote:
> Hi,
> There are two questions:
> 1. In run-time we see that the process spends ~20% in system call - read.
> Also we see that the reading of verified XML files is performed with buffer size 508b.
>
> turss command output:
> open("/spotuser/nft/aimsys/nftwrk83/var/m3g/projs/dd/temp/Dec/23/dd.ABL_Statement_XML0000032373A00412007020000000003.200712230712231130.temp.xml", O_RDONLY|0x800, 0666) = 51
> read(51, "< s t a t e m e n t > \n< b i l ".., 512) = 512
> read(51, "a n c e - c e n t e r > < r e m ".., 508) = 508
> read(51, "t e m e n t - a d d r e s s - p ".., 508) = 508
> read(51, "m i d d l e - n a m e > S E E D ".., 508) = 508
>
> Actually, we harden to understand how is the buffer size defined?
> Do you have any idea what may be a cause?
Perhaps this is the default buffer size for the open() system call on your OS.
>
> 2. Do you have any recommendation/reference list of performance issue which we can use in order to improve your API usage?
Not that I know of. Perhaps you can call some system-specific API to
increase or decrease the buffer size to see how that affects performance.
Dave
RE: Buffer size configuration in BinFileInputStream::readBytes
Posted by Pavel Ilyashenko <pa...@amdocs.com>.
Hi,
There are two questions:
1. In run-time we see that the process spends ~20% in system call - read.
Also we see that the reading of verified XML files is performed with buffer size 508b.
turss command output:
open("/spotuser/nft/aimsys/nftwrk83/var/m3g/projs/dd/temp/Dec/23/dd.ABL_Statement_XML0000032373A00412007020000000003.200712230712231130.temp.xml", O_RDONLY|0x800, 0666) = 51
read(51, "< s t a t e m e n t > \n< b i l ".., 512) = 512
read(51, "a n c e - c e n t e r > < r e m ".., 508) = 508
read(51, "t e m e n t - a d d r e s s - p ".., 508) = 508
read(51, "m i d d l e - n a m e > S E E D ".., 508) = 508
Actually, we harden to understand how is the buffer size defined?
Do you have any idea what may be a cause?
2. Do you have any recommendation/reference list of performance issue which we can use in order to improve your API usage?
Thanks.
Best Regards
Pavel Ilyshenko
+297-8-62-40173
AMDOCS > INTEGRATED CUSTOMER MANAGEMENT
-----Original Message-----
From: David Bertoni [mailto:dbertoni@apache.org]
Sent: December 19, 2007 19:40
To: c-users@xerces.apache.org
Subject: Re: Buffer size configuration in BinFileInputStream::readBytes
Pavel Ilyashenko wrote:
> Hi,
>
> In our application we use Xerces's API SAXParser::*parse* (const InputSource
> &source).
>
>
>
> During enforcement after its work we have seen that the function
>
> XMLReader::*refreshCharBuffer*() calls to
> BinFileInputStream::*readBytes*(XMLByte
> *const toFill, const unsigned int maxToRead) function.
>
> One of *readBytes* function's parameters defines the max amount bytes which
> will be read.
>
> So my question is: How we can control this value? Does it some environment
> variable or something else?
It's a compile-time constant defined in xercesc/internal/XMLReader.hpp:
enum Constants
{
kCharBufSize = 16 * 1024
, kRawBufSize = 48 * 1024
};
Dave
This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement,
you may review at http://www.amdocs.com/email_disclaimer.asp
Re: Buffer size configuration in BinFileInputStream::readBytes
Posted by David Bertoni <db...@apache.org>.
Pavel Ilyashenko wrote:
> Hi,
>
> In our application we use Xerces's API SAXParser::*parse* (const InputSource
> &source).
>
>
>
> During enforcement after its work we have seen that the function
>
> XMLReader::*refreshCharBuffer*() calls to
> BinFileInputStream::*readBytes*(XMLByte
> *const toFill, const unsigned int maxToRead) function.
>
> One of *readBytes* function's parameters defines the max amount bytes which
> will be read.
>
> So my question is: How we can control this value? Does it some environment
> variable or something else?
It's a compile-time constant defined in xercesc/internal/XMLReader.hpp:
enum Constants
{
kCharBufSize = 16 * 1024
, kRawBufSize = 48 * 1024
};
Dave