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

feat(server): Pool lua interpreters #765

Merged
merged 2 commits into from
Feb 8, 2023
Merged

feat(server): Pool lua interpreters #765

merged 2 commits into from
Feb 8, 2023

Conversation

dranikpg
Copy link
Contributor

@dranikpg dranikpg commented Feb 8, 2023

Fixes #741

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
@dranikpg dranikpg requested a review from romange February 8, 2023 10:14
Comment on lines 30 to 31
ABSL_FLAG(uint32_t, interpreter_per_thread, 5, "Lua interpreters per thread");

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its strange common.cc is responsible for initializing server state 🤨

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. pull it out in another pr

Copy link
Contributor Author

@dranikpg dranikpg Feb 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also increase it to about 10-15, above it usually delivers only small gains (given that most scripts are most likely a few ops), but I'm not sure why to keep the values low, if the interpreter overhead is likely super small

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets make it 10

romange
romange previously approved these changes Feb 8, 2023
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
@dranikpg dranikpg merged commit b2958b5 into main Feb 8, 2023
@romange romange deleted the pool-interpreter branch February 15, 2023 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pool interpreters to reduce lock contention
2 participants