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

Add configuration to Server to limit number of open databases. #27

Closed
ecton opened this issue Apr 2, 2021 · 1 comment
Closed

Add configuration to Server to limit number of open databases. #27

ecton opened this issue Apr 2, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@ecton
Copy link
Member

ecton commented Apr 2, 2021

With the initial implementation of the server (#19), a choice was made to delay this work.

The problems this setting is aiming to solve:

  • Working within limits of the number of open files
  • Sled will be keeping an in-memory cache for each open database. We may want to expose this cache size for configuration, but regardless: each open database will eat memory for cache.

The logic implemented should keep track of the last time a database was accessed, and when a database needs to be unloaded, the oldest database should be evicted first.

One question that needs to be answered is, under high load, if a server is configured to only have, let's say 20 databases open, should we allow temporary bursting if a queue of requests comes in that exceeds that? Or should requests block until the limit is exceeded? Maybe two settings -- a target and a maximum?

@ecton ecton added server enhancement New feature or request labels Apr 5, 2021
@ecton
Copy link
Member Author

ecton commented Apr 26, 2021

This is no longer relevant after #49 is merged. By using one sled instance, the only configuration needed is to expose whatever options we want to allow from sled's configuration.

@ecton ecton closed this as completed Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant