Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-2382

Consider reducing number of file::exists() calls during write operation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • Ozone Datanode

    Description

      When writing 100-200 MB files with multiple threads, observed lots of file::exists() checks.

      For every 16 MB chunk, it ends up checking whether chunksLoc directory exists or not. (ref: https://github.com/apache/hadoop-ozone/blob/master/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/helpers/ChunkUtils.java#L239)

      Also, this check (ChunkUtils.getChunkFile) happens from 2 places.

      1.org.apache.hadoop.ozone.container.common.transport.server.ratis.ContainerStateMachine.lambda$handleWriteChunk

      2.org.apache.hadoop.ozone.container.common.transport.server.ratis.ContainerStateMachine.lambda$applyTransaction

      Note that these are folders and not actual chunk filenames. It would be helpful to reduce this check, if we track create/delete of these folders.

      Attachments

        Issue Links

          Activity

            People

              adoroszlai Attila Doroszlai
              rajesh.balamohan Rajesh Balamohan
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: