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

option for memory use limits or limits for number of keys #2393

Closed
grimnight opened this issue Feb 27, 2015 · 10 comments
Closed

option for memory use limits or limits for number of keys #2393

grimnight opened this issue Feb 27, 2015 · 10 comments

Comments

@grimnight
Copy link

Can you add option for memory use limits or limits for number of keys?

@yichengq
Copy link
Contributor

Is this related to #2371 ?

@grimnight
Copy link
Author

This is not related to #2371 . I would just like to be able to limit memory use.

@kelseyhightower
Copy link
Contributor

@grimnight Yes this is not related.

A couple of questions come to mind for a feature like this. When memory usage limits are reached how should etcd handle new writes? Expiring TTLs -- should we let them expire and risk losing data?

@xiang90 xiang90 added this to the v3.0.0-alpha.1 milestone Mar 9, 2015
@bprashanth
Copy link
Contributor

+9000 to main memory limits, it's a common concept in most databases and I was puzzled that it wasn't configurable in etcd. I'd prefer having etcd swap to disk when it hits the limit, if that's not possible, flip to read-only and spam the logs with memory limit reached for each write. Just my 2c.

@klausenbusk
Copy link

Any update on this? Currently etcd2 use 90M or 18% of my memory (512MB Digital Ocean node)

@xiang90
Copy link
Contributor

xiang90 commented Feb 2, 2016

@klausenbusk What is the problem with 90M memory usage?

@klausenbusk
Copy link

@xiang90 It a large portion of the memory, when the nodes is only 512MB. Before I restarted etcd it was 136MB, I was testing something.

@xiang90
Copy link
Contributor

xiang90 commented Feb 2, 2016

@klausenbusk If you want to limit the memory usage, you can always limit the number of keys yourself; we can set a hard limit too to avoid you adding more keys into etcd. However etcd will keep ALL data in memory.

@klausenbusk
Copy link

I only have < 30 keys, but I refresh some of them very often. The 3 db nodes alone do around ~ 140 "refresh" every minute, then I also have some other node, but around ~ 200 "refresh" per minute.

@xiang90
Copy link
Contributor

xiang90 commented Feb 2, 2016

@kalabiyau etcd keeps internal history events for watch/replication etc.. Also etcd2 is not memory efficient and it is improved with our new v3 backend.

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

No branches or pull requests

6 participants