You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Manjula Peiris <ma...@wso2.com> on 2008/02/18 13:24:48 UTC

Attachment memory optimization size as a parameter in axis2.xml

Hi devs,

Inside mime_parser when the stream is chunked the data is written in to
array of buffers. Currently the size of the buffer is hard coded and
using this size we can optimize the memory usage for larger attachments.
So I think we can put this size as a parameter in the axis2.xml.

For an example a server frequently processing 50 MB attachments 

<parameter name=attachmentSize" locked="false">50</parameter> 

Thoughts please .

Thanks,
-Manjula.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Re: Attachment memory optimization size as a parameter in axis2.xml

Posted by Dinesh Premalal <xy...@gmail.com>.
Hi,

>> I think MTOMMAXChunkBuffers is good.

+1 

thanks,
Dinesh
-- 
http://nethu.org

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Re: Attachment memory optimization size as a parameter in axis2.xml

Posted by Manjula Peiris <ma...@wso2.com>.
On Tue, 2008-02-19 at 16:19 +0530, Samisa Abeysinghe wrote:
> Manjula Peiris wrote:
> > On Tue, 2008-02-19 at 11:39 +0530, Manjula Peiris wrote:
> >   
> >> Hi All,
> >>
> >> So I will use MTOMChunkBufferSize .
> >>
> >> And we need to specify the number of buffers in this case. I like
> >>
> >> MTOMChunkBuffers as the parameter name.
> >>     
> >
> > I think MTOMMAXChunkBuffers is good.
> >   
> 
> MAX or Max?
Sorry it is Max.

> Samisa...
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Re: Attachment memory optimization size as a parameter in axis2.xml

Posted by Samisa Abeysinghe <sa...@wso2.com>.
Manjula Peiris wrote:
> On Tue, 2008-02-19 at 11:39 +0530, Manjula Peiris wrote:
>   
>> Hi All,
>>
>> So I will use MTOMChunkBufferSize .
>>
>> And we need to specify the number of buffers in this case. I like
>>
>> MTOMChunkBuffers as the parameter name.
>>     
>
> I think MTOMMAXChunkBuffers is good.
>   

MAX or Max?

Samisa...


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Re: Attachment memory optimization size as a parameter in axis2.xml

Posted by Manjula Peiris <ma...@wso2.com>.
On Tue, 2008-02-19 at 11:39 +0530, Manjula Peiris wrote:
> Hi All,
> 
> So I will use MTOMChunkBufferSize .
> 
> And we need to specify the number of buffers in this case. I like
> 
> MTOMChunkBuffers as the parameter name.

I think MTOMMAXChunkBuffers is good.

>  So in the chunking case the
> maximum size of the attachment the system can handle is,
> 
> MTOMChunkBufferSize * MTOMChunkBuffers.
> 
> Default for MTOMChunkBufferSize = 1
> Default for MTOMChunkBuffers = 1000
> 
> So in the default case it can handle 1000MB.
> 
> suggestions please...
> 
> Thanks,
> -Manjula.
> 
> 
> On Tue, 2008-02-19 at 11:23 +0530, Samisa Abeysinghe wrote:
> > Dumindu Pallewela wrote:
> > > On Feb 19, 2008 9:51 AM, Manjula Peiris <ma...@wso2.com> wrote:
> > >   
> > >> I also think chunkBufferSizeForMTOM makes more sense. Actually I first
> > >> thought about this but felt it is more complex for users. That's why
> > >> suggest attachmentSize. But with a comment meaning of this param can be
> > >> simplified.
> > >>     
> > >
> > > IMHO, a better way to express the same would be *MTOMChunkBufferSize*.
> > >   
> > 
> > Ok, it is shorter. I like it.
> > 
> > Samisa...
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-c-dev-help@ws.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Re: Attachment memory optimization size as a parameter in axis2.xml

Posted by Manjula Peiris <ma...@wso2.com>.
Hi All,

So I will use MTOMChunkBufferSize .

And we need to specify the number of buffers in this case. I like

MTOMChunkBuffers as the parameter name. So in the chunking case the
maximum size of the attachment the system can handle is,

MTOMChunkBufferSize * MTOMChunkBuffers.

Default for MTOMChunkBufferSize = 1
Default for MTOMChunkBuffers = 1000

So in the default case it can handle 1000MB.

suggestions please...

Thanks,
-Manjula.


On Tue, 2008-02-19 at 11:23 +0530, Samisa Abeysinghe wrote:
> Dumindu Pallewela wrote:
> > On Feb 19, 2008 9:51 AM, Manjula Peiris <ma...@wso2.com> wrote:
> >   
> >> I also think chunkBufferSizeForMTOM makes more sense. Actually I first
> >> thought about this but felt it is more complex for users. That's why
> >> suggest attachmentSize. But with a comment meaning of this param can be
> >> simplified.
> >>     
> >
> > IMHO, a better way to express the same would be *MTOMChunkBufferSize*.
> >   
> 
> Ok, it is shorter. I like it.
> 
> Samisa...
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Re: Attachment memory optimization size as a parameter in axis2.xml

Posted by Samisa Abeysinghe <sa...@wso2.com>.
Dumindu Pallewela wrote:
> On Feb 19, 2008 9:51 AM, Manjula Peiris <ma...@wso2.com> wrote:
>   
>> I also think chunkBufferSizeForMTOM makes more sense. Actually I first
>> thought about this but felt it is more complex for users. That's why
>> suggest attachmentSize. But with a comment meaning of this param can be
>> simplified.
>>     
>
> IMHO, a better way to express the same would be *MTOMChunkBufferSize*.
>   

Ok, it is shorter. I like it.

Samisa...


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Re: Attachment memory optimization size as a parameter in axis2.xml

Posted by Dumindu Pallewela <pa...@gmail.com>.
On Feb 19, 2008 9:51 AM, Manjula Peiris <ma...@wso2.com> wrote:
> I also think chunkBufferSizeForMTOM makes more sense. Actually I first
> thought about this but felt it is more complex for users. That's why
> suggest attachmentSize. But with a comment meaning of this param can be
> simplified.

IMHO, a better way to express the same would be *MTOMChunkBufferSize*.

Regards,
Dumindu.


-- 
Dumindu Pallewela
http://blog.dumindu.com
GPG ID: 0x9E131672

WSO2 | "Oxygenating the Web Service Platform" | http://wso2.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Re: Attachment memory optimization size as a parameter in axis2.xml

Posted by Manjula Peiris <ma...@wso2.com>.
I also think chunkBufferSizeForMTOM makes more sense. Actually I first
thought about this but felt it is more complex for users. That's why
suggest attachmentSize. But with a comment meaning of this param can be
simplified.

Thanks,
-Manjula.

On Mon, 2008-02-18 at 20:24 +0530, Samisa Abeysinghe wrote:
> Senaka Fernando wrote:
> > Hi Samisa,
> >
> > chunkBufferSize4MTOM or chunkBufferSizeForMTOM ? 
> 
> I am OK for the second one.
> 
> Samisa...
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Re: Attachment memory optimization size as a parameter in axis2.xml

Posted by Samisa Abeysinghe <sa...@wso2.com>.
Senaka Fernando wrote:
> Hi Samisa,
>
> chunkBufferSize4MTOM or chunkBufferSizeForMTOM ? 

I am OK for the second one.

Samisa...

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Re: Attachment memory optimization size as a parameter in axis2.xml

Posted by Senaka Fernando <se...@wso2.com>.
Hi Samisa,

chunkBufferSize4MTOM or chunkBufferSizeForMTOM ? I think the second is
better. :) Btw, as you say we need to add a comment saying that the size
is in MB. That's what I emphasized in another reply to this mail.

Regards,
Senaka

> Manjula Peiris wrote:
>> Hi devs,
>>
>> Inside mime_parser when the stream is chunked the data is written in to
>> array of buffers. Currently the size of the buffer is hard coded and
>> using this size we can optimize the memory usage for larger attachments.
>> So I think we can put this size as a parameter in the axis2.xml.
>>
>> For an example a server frequently processing 50 MB attachments
>>
>> <parameter name=attachmentSize" locked="false">50</parameter>
>>
>
> How about chunkBufferSize4MTOM as the param name? Using 'attachment' in
> the param name is inconsistent, as othe MTOM related params have MTOM in
> the name. e.g. enableMTOM
>
> Of course, a comment should mention that the given size is assumed to be
> in MB.
>
> Samisa...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Re: Attachment memory optimization size as a parameter in axis2.xml

Posted by Samisa Abeysinghe <sa...@wso2.com>.
Dinesh Premalal wrote:
> Hi,
> Samisa Abeysinghe <sa...@wso2.com> writes:
>   
>>> <parameter name=attachmentSize" locked="false">50</parameter>   
>>>       
>> How about chunkBufferSize4MTOM as the param name? Using 'attachment'
>> in the param name is inconsistent, as othe MTOM related params have
>> MTOM in the name. e.g. enableMTOM
>>     
> Though I'm +1 chunkBufferSize4MTOM feel little uncomfortable with
> number 4. Do we use numbers for parameter names in axis2.xml?
>   

We can use 'for', then it is 2 more chars long ;)

Samisa...


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Re: Attachment memory optimization size as a parameter in axis2.xml

Posted by Dinesh Premalal <xy...@gmail.com>.
Hi,
Samisa Abeysinghe <sa...@wso2.com> writes:
>> <parameter name=attachmentSize" locked="false">50</parameter>   
>
> How about chunkBufferSize4MTOM as the param name? Using 'attachment'
> in the param name is inconsistent, as othe MTOM related params have
> MTOM in the name. e.g. enableMTOM
Though I'm +1 chunkBufferSize4MTOM feel little uncomfortable with
number 4. Do we use numbers for parameter names in axis2.xml?

thanks,
Dinesh
-- 
http://nethu.org

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Re: Attachment memory optimization size as a parameter in axis2.xml

Posted by Samisa Abeysinghe <sa...@wso2.com>.
Manjula Peiris wrote:
> Hi devs,
>
> Inside mime_parser when the stream is chunked the data is written in to
> array of buffers. Currently the size of the buffer is hard coded and
> using this size we can optimize the memory usage for larger attachments.
> So I think we can put this size as a parameter in the axis2.xml.
>
> For an example a server frequently processing 50 MB attachments 
>
> <parameter name=attachmentSize" locked="false">50</parameter> 
>   

How about chunkBufferSize4MTOM as the param name? Using 'attachment' in 
the param name is inconsistent, as othe MTOM related params have MTOM in 
the name. e.g. enableMTOM

Of course, a comment should mention that the given size is assumed to be 
in MB.

Samisa...



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Re: Attachment memory optimization size as a parameter in axis2.xml

Posted by Senaka Fernando <se...@wso2.com>.
Wouldn't it be better to say

<!-- size of attachment buffer in MB -->
<parameter name="attachmentBufferSize" locked="false">50</parameter>

Otherwise won't it be sort of misleading? Because that seems like the
maximum attachment size rather than the buffer size. Am I missing
something here?

Regards,
Senaka

> Hi devs,
>
> Inside mime_parser when the stream is chunked the data is written in to
> array of buffers. Currently the size of the buffer is hard coded and
> using this size we can optimize the memory usage for larger attachments.
> So I think we can put this size as a parameter in the axis2.xml.
>
> For an example a server frequently processing 50 MB attachments
>
> <parameter name=attachmentSize" locked="false">50</parameter>
>
> Thoughts please .
>
> Thanks,
> -Manjula.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org