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

Tsz Wo Nicholas Sze updated HDFS-7276:
--------------------------------------
    Attachment: h7276_20141027.patch

h7276_20141027.patch:
- Renames the conf key DFS_CLIENT_WRITE_MAX_PACKETS_KEY; see HDFS-7260.
- Adds a performance test for comparing
-# new byte[] without any limit,
-# new byte[] with synchronization and a count for imposing a limit; and
-# using ByteArrayManager.

It turns out that ByteArrayManager is slighter better.
- nAllocations=16384
{noformat}
arrayLength=65536, nThreads=256, nAllocations=16384, maxArrays=1024
  NewByteArrayWithoutLimit: 3306
  NewByteArrayWithLimit: 3314
  UsingByteArrayManager: 3278
arrayLength=65536, nThreads=256, nAllocations=16384, maxArrays=4096
  NewByteArrayWithoutLimit: 3320
  NewByteArrayWithLimit: 3313
  UsingByteArrayManager: 3284
arrayLength=65536, nThreads=256, nAllocations=16384, maxArrays=16384
  NewByteArrayWithoutLimit: 3342
  NewByteArrayWithLimit: 3339
  UsingByteArrayManager: 3306
arrayLength=65536, nThreads=256, nAllocations=16384, maxArrays=65536
  NewByteArrayWithoutLimit: 3324
  NewByteArrayWithLimit: 3320
  UsingByteArrayManager: 3297
arrayLength=65536, nThreads=256, nAllocations=16384, maxArrays=262144
  NewByteArrayWithoutLimit: 3322
  NewByteArrayWithLimit: 3323
  UsingByteArrayManager: 3284
{noformat}
- nAllocations=32768
{noformat}
arrayLength=65536, nThreads=256, nAllocations=32768, maxArrays=1024
  NewByteArrayWithoutLimit: 6608
  NewByteArrayWithLimit: 6648
  UsingByteArrayManager: 6580
arrayLength=65536, nThreads=256, nAllocations=32768, maxArrays=4096
  NewByteArrayWithoutLimit: 6572
  NewByteArrayWithLimit: 6538
  UsingByteArrayManager: 6451
arrayLength=65536, nThreads=256, nAllocations=32768, maxArrays=16384
  NewByteArrayWithoutLimit: 6623
  NewByteArrayWithLimit: 6613
  UsingByteArrayManager: 6485
arrayLength=65536, nThreads=256, nAllocations=32768, maxArrays=65536
  NewByteArrayWithoutLimit: 6564
  NewByteArrayWithLimit: 6610
  UsingByteArrayManager: 6488
arrayLength=65536, nThreads=256, nAllocations=32768, maxArrays=262144
  NewByteArrayWithoutLimit: 6547
  NewByteArrayWithLimit: 6556
  UsingByteArrayManager: 6464
{noformat}

> Limit the number of byte arrays used by DFSOutputStream
> -------------------------------------------------------
>
>                 Key: HDFS-7276
>                 URL: https://issues.apache.org/jira/browse/HDFS-7276
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: hdfs-client
>            Reporter: Tsz Wo Nicholas Sze
>            Assignee: Tsz Wo Nicholas Sze
>         Attachments: h7276_20141021.patch, h7276_20141022.patch, 
> h7276_20141023.patch, h7276_20141024.patch, h7276_20141027.patch
>
>
> When there are a lot of DFSOutputStream's writing concurrently, the number of 
> outstanding packets could be large.  The byte arrays created by those packets 
> could occupy a lot of memory.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to