Skip to content

[Bug]: Significant performance hit due to excessive image store lock #2964

Open
@vanhtuan0409

Description

@vanhtuan0409

zot version

v2.1.2

Describe the bug

We've identified a significant performance bottleneck in the image store layer due to a global lock. This lock appears to be causing excessive contention and dramatically impacting overall system performance. Especially during GC period

To reproduce

  1. Enable GC and image retention
  2. Create a lot of ephemeral image
  3. Observe any request took 10s latency

Expected behavior

Single lock per repo

Screenshots

No response

Additional context

Code reference: https://github.com/project-zot/zot/blob/main/pkg/storage/imagestore/imagestore.go#L45

Image store use a single mutex object and it is called a lot

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingrm-externalRoadmap item submitted by non-maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions