Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Table Service Performance #1331

Closed
edwin-huber opened this issue Feb 9, 2022 · 6 comments
Closed

Improve Table Service Performance #1331

edwin-huber opened this issue Feb 9, 2022 · 6 comments
Assignees
Labels
enhancement New feature or request table-storage Relating to Azurite table storage implementation

Comments

@edwin-huber
Copy link
Collaborator

edwin-huber commented Feb 9, 2022

I am actively looking at options to improve performance.
The best option I have found until we check in a change for this is to change the the constructor for LokiTableMetadataStore in src\table\persistence\LokiTableMetadataStore.ts

You have 2 options.

Turn off persistence:

  public constructor(public readonly lokiDBPath: string) {
       this.db = new Loki(lokiDBPath, {
    });
  }

Enable the lfsa adapter, which creates files per partition:

  public constructor(public readonly lokiDBPath: string) {
    const lfsa = require("../../../node_modules/lokijs/src/loki-fs-structured-adapter.js");
    const lfsaAdapter = new lfsa();
    this.db = new Loki(lokiDBPath, {
      autosave: true,
      adapter: lfsaAdapter
      autosaveInterval: 5000
    });
  }

Addresses #1198

@edwin-huber edwin-huber self-assigned this Feb 9, 2022
@edwin-huber edwin-huber added enhancement New feature or request table-storage Relating to Azurite table storage implementation labels Feb 9, 2022
@edwin-huber
Copy link
Collaborator Author

@XiaoningLiu - We need to agree on implementing control schema compatible with VS Code and Visual Studio 2022.

@edwin-huber
Copy link
Collaborator Author

Dependency on #1061

@joelverhagen
Copy link
Contributor

@edwin-huber, from my testing Table didn't get faster in-memory. The slow path for blob and queue was writing extents which is not done at all in tables. LokiJS does not persist immediately upon write so Loki + Table doesn't have disk in the request context, just in a background persist every 5 seconds. Perhaps I am misunderstanding the original issue however.

@joelverhagen
Copy link
Contributor

I wrote a blog about my change which describes the perf change: https://www.joelverhagen.com/blog/2023/11/azurite-in-memory

@edwin-huber
Copy link
Collaborator Author

a background persist every 5 seconds.

It was exactly this IO causing systems to hang, writing large amounts of table data to disk...

@joelverhagen
Copy link
Contributor

Makes sense, thanks for clarifying this for me !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request table-storage Relating to Azurite table storage implementation
Projects
None yet
Development

No branches or pull requests

2 participants