Skip to content

MemoryBlobStore limits the delegate store to a single thread #1275

Open
@brettniven

Description

The MemoryBlobStore limits the delegate store to a single thread, which can degrade performance. It effectively forces all 'put', 'get' and other operations to be bound to a single queue.

I've written a sample test and a one-liner change to highlight the problem. This is here: brettniven@b7f08e2. By increasing the executor threads, it obviously has much better performance.

I can assist on a fix - I'm just not sure on the best approach as I can't figure out why it would have the '1 thread' limit in the first place. Some links to explain what is happening:

... but I can't work out a reason for it needing to be limited to 1 thread. Each delegate store should have it's own locking code, where applicable.

For reference, our setup is:

  • GWC embedded in GeoServer, 1.24.x, using Kartoza docker image
  • We're hosting in Azure, using an Azure File Share (which unfortunately for us, is 'slow' for a few potential reasons, which exacerbates this issue - we're in the process of trialling the Azure Blob Store plugin)
  • We're using a MemoryBlobStore as a 2-layer cache, fronting a FileBlobStore. i.e. innerCachingEnabled=true.
  • We investigated performance and found that we get substantially better performance when we turn the MemoryBlobStore off, which is a very simple workaround for this issue. However... we believe we've also found a thread deadlock issue in the FileBlobStore code (which I'll raise in another issue when time permits)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions