You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2023/09/08 11:06:00 UTC
[jira] [Commented] (AVRO-3802) Memory leak on decompressing deflate codec avro files
[ https://issues.apache.org/jira/browse/AVRO-3802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17763021#comment-17763021 ]
ASF subversion and git services commented on AVRO-3802:
-------------------------------------------------------
Commit 8eab8f14b522d8a99df81217fc94a6d17f5c6595 in avro's branch refs/heads/dependabot/maven/lang/java/org.mockito-mockito-core-5.5.0 from CamilAbraham
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=8eab8f14b ]
AVRO-3802: [Csharp] Fix memory leak on deflate codec decompression (#2439)
* AVRO-3802: [Csharp] Fix memory leak on avro deflate codec decompression
* AVRO-3802: [Csharp] Address PR comments
* AVRO-3802: [Csharp] Revert IDisposable change in Encoder and Decoder
* AVRO-3802: [Csharp] Remove implicit filtering of target sequence
---------
Co-authored-by: Camil Abraham <ca...@trayport.com>
> Memory leak on decompressing deflate codec avro files
> -----------------------------------------------------
>
> Key: AVRO-3802
> URL: https://issues.apache.org/jira/browse/AVRO-3802
> Project: Apache Avro
> Issue Type: Bug
> Components: csharp
> Affects Versions: 1.11.1, 1.12.0, 1.11.2, 1.11.3
> Reporter: amy myo
> Priority: Major
> Labels: pull-request-available
> Attachments: call tree.PNG, deflate decompression memory profiler.png
>
> Time Spent: 5.5h
> Remaining Estimate: 0h
>
> Hi,
> We are using apache.avro C# library for compression and decompression of large avro files. Each file is 2-3MB and decompression of 20 files is using 2.1GB memory and memory keep increasing around 200-300MB for follow up calls.
> Attached is the memory profiler of three calls. Each call decompress the same 20 files. First call uses 2.1GB , increase to 2.37GB and then 2.68GB.
> Call tree is showing most of the memory are used by `DeflatCodec.CopyTo` method.
> # `CopyTo` method is not using Array pool. Default Microsoft's stream `copyTo` method is much more efficient.
> # `inStream` and `outStream` memory streams are not in using statement.
> # On `outstream` object creation, object can be initialized with defined length/stream capacity.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)