You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Shilun Fan (Jira)" <ji...@apache.org> on 2024/02/11 09:05:00 UTC

[jira] [Updated] (HDFS-16074) Remove an expensive debug string concatenation

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

Shilun Fan updated HDFS-16074:
------------------------------
         Component/s: hdfs-client
        Hadoop Flags: Reviewed
    Target Version/s: 3.3.2, 3.2.3, 3.4.0

> Remove an expensive debug string concatenation
> ----------------------------------------------
>
>                 Key: HDFS-16074
>                 URL: https://issues.apache.org/jira/browse/HDFS-16074
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: hdfs-client
>    Affects Versions: 3.0.0-alpha1
>            Reporter: Wei-Chiu Chuang
>            Assignee: Wei-Chiu Chuang
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 3.4.0, 3.2.3, 3.3.2
>
>         Attachments: Screen Shot 2021-06-16 at 2.32.29 PM.png, Screen Shot 2021-06-17 at 10.32.21 AM.png
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Running a YCSB load query, found that we do an expensive string concatenation on the write path in DFSOutputStream.writeChunkPrepare(). 
> Nearly 25% of HDFS client write CPU time is spent here. It is not necessary because it's supposed to be a debug message. So let's remove it.
> {code}
>  if (currentPacket == null) {
>       currentPacket = createPacket(packetSize, chunksPerPacket, getStreamer()
>           .getBytesCurBlock(), getStreamer().getAndIncCurrentSeqno(), false);
>       DFSClient.LOG.debug("WriteChunk allocating new packet seqno={},"
>               + " src={}, packetSize={}, chunksPerPacket={}, bytesCurBlock={}",
>           currentPacket.getSeqno(), src, packetSize, chunksPerPacket,
>           getStreamer().getBytesCurBlock() + ", " + this); <---- here
>     }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org