On Thu August 13 2009 6:26:06 pm Nepali, Sonam (GE Healthcare, consultant) 
wrote:
> Hello
>
> What is the difference in that CachedOutputStream.java writes the large
> messages to the file versus for smaller size messages that are less than
> (64 * 1024) bytes?  If I set a
> "org.apache.cxf.io.CachedOutputStream.Threshold" property to about 5
> MBs, will that potentially have any negatice impact on performance?

The two areas it impacts are:

1) By allocating larger objects and holding them in memory, it reduces the 
number of concurrent requests that can be processed.    For example, if you 
set your jvm max memory to -Mx256M or so, you obviously can have less than 50 
requests outstanding (actually much less due to overhead itself and such).   
With 64K max before going to disk, many more requests can be in flight.

2) Garbage collection - lots of small allocations are generally better for the 
garbage collector.   If the message takes a while to process, it may get moved 
from the short lived space to the middle aged space (or even the old gen 
space).   Each of those would require a copy.   Large allocations tend to 
force the gc to run more often as well.

Neither are really a huge deal though if you know what the characteristics of 
your interactions are.

Dan



> Basically, I want to get around the problem for the CachedOutputStream
> from creating temp files for large messages.
>
> thanks
>
>
> Sonam
>
> CXF user

-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to