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

Feature request: Reduce Memory usage #2054

Open
josearodrigueze opened this issue Jan 19, 2024 · 3 comments
Open

Feature request: Reduce Memory usage #2054

josearodrigueze opened this issue Jan 19, 2024 · 3 comments

Comments

@josearodrigueze
Copy link

What's the feature 🧐

I don't know if I should classify it as a bug, but I want to understand why this process consumes so much memory?

Compared to other images that offer something similar, the amount of memory that gluetun consumes is 10x, for example, just by having the project running, approximately 400 MB is used, which cannot be explained if we use alpine.

In the image that I upload, of course I use my local computer but when using this in a cloud environment like Amazon, undoubtedly that amount of consumption makes it unfeasible to use this project.

image

Having said the above, how can I contribute to help reduce this excessive amount of consumption?

Likewise, thank you for receiving my comment.

Extra information and references

No response

@josearodrigueze josearodrigueze changed the title Feature request: Feature request: Reduce Memory usage Jan 19, 2024
@qdm12
Copy link
Owner

qdm12 commented Jan 19, 2024

It's the Unbound list of domains to block 😉 You can set BLOCK_MALICIOUS=off and it should drop by ~300MB 😉 Maybe worth considering changing to off by default, although it's a nice thing to have I guess.
Also soon ™️ we'll migrate to https://github.com/qdm12/dns/tree/v2.0.0-beta and leave Unbound, and its blocking consumes around ~100MB of memory instead of ~300 so that should help. Let's keep this opened.

@qdm12
Copy link
Owner

qdm12 commented Aug 25, 2024

Using BLOCK_MALICIOUS=on, memory usage went from 550MB on v3.39 to 195MB on the latest image, thanks for #137 being finally merged. I will eventually work on making this even better at a later time.

@josearodrigueze
Copy link
Author

Wow, that's a huge change considering a memory saving of around 60%. I'm going to try it. Thank you very much.

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

No branches or pull requests

2 participants