ozone icon indicating copy to clipboard operation
ozone copied to clipboard

HDDS-11413. PipelineManagerImpl lock optimization reduces AllocateBlock latency

Open guohao-rosicky opened this issue 5 months ago • 2 comments

What changes were proposed in this pull request?

PipelineManagerImpl lock optimization reduces AllocateBlock latency

The following are the issues discovered in our production environment: When applying for a block in the Ratis replica, there may be jitter in the P99 latency due to obtaining a read lock image

The main parts that hold write locks:

org.apache.hadoop.hdds.scm.pipeline.WritableECContainerProvider#allocateContainer

image

EC pipelines are frequently created and closed because there is only one container in each EC pipeline. When the container is full, the creation of new ones will be closed. When creating a pipeline, a write lock at the pipeline manager level will be held, while when applying for a Ratis block, a read lock at the pipeline manager level will be held.

The purpose of this optimization is to unlock. When creating and closing an EC pipeline, only the write lock at the EC pipeline manager level will be held, while when applying for a ratis replica block, only the read lock of the ratis pipeline manager will be held. The two locks will not affect each other.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-11413

guohao-rosicky avatar Sep 05 '24 06:09 guohao-rosicky