camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "metatech (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-4686) Messages larger than 64KB can be processed very slowly due to file read buffer of 1 byte
Date Wed, 16 Nov 2011 11:04:51 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-4686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

metatech updated CAMEL-4686:
----------------------------

    Attachment: FileInputStreamCache_buffered.patch
    
> Messages larger than 64KB can be processed very slowly due to file read buffer of 1 byte
> ----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4686
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4686
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.6.0
>         Environment: ServiceMix 4.3, Solaris 10
>            Reporter: metatech
>         Attachments: FileInputStreamCache_buffered.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> When the message body is larger than 64KB, the message is stored on the disk by CachedOutputStream
and read back later by FileInputStreamCache.
> A thread dump during a load test shows that the execution is most of the time waiting
in the "InputStream.read()" method calls.
> The "truss" output shows that the file is read back 1 byte at a time, which makes the
calls very slow.
> A first workaround (setting property "CamelCachedOutputStreamThreshold" to 10000000 on
the CamelContext's properties) helped in some case.  
> The cause is that the FileInputStreamCache does not use a BufferInputStream to read on
the disk, although the CachedOutputStream does properly use a BufferOutputStream.
> A trivial patch is attached, which provides a fix.
> Reference :
> http://servicemix.396122.n5.nabble.com/DefaultTraceFormatter-is-very-slow-for-messages-gt-64KB-td4902840.html
> This problem was first noticed when the trace was enabled on the CamelContext, but it
occurs also in other scenarios.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message