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

Provide a new garbage-collection mechanism #40

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

paholg
Copy link

@paholg paholg commented Sep 21, 2023

We introduce the configuration min_available_memory which causes disconnected clients to be cleaned up when the available system memory drops below this amount.

While this is compatible with the instance_timeout setting, it provides an alternative; letting rust-analyzer processes live forever unless memory gets low.

We introduce the configuration `min_available_memory` which causes
disconnected clients to be cleaned up when the available system memory
drops below this amount.

While this is compatible with the `instance_timeout` setting, it
provides an alternative; letting `rust-analyzer` processes live forever
unless memory gets low.
@paholg paholg force-pushed the min_available_memory branch from 0a91981 to 1210085 Compare September 21, 2023 16:26
@@ -117,6 +121,7 @@ impl InstanceKey {

pub struct RaInstance {
pid: u32,
spawned_at: Instant,
Copy link
Owner

Choose a reason for hiding this comment

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

Could we use the time the last client has disconnected from the instance instead of when it was spawned? That seems like a better indicator which instance is the least useful to keep around.

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.

2 participants