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

Memory Usage documentation formula doubt #1423

Open
adriangibanelbtactic opened this issue Dec 15, 2022 · 0 comments
Open

Memory Usage documentation formula doubt #1423

adriangibanelbtactic opened this issue Dec 15, 2022 · 0 comments

Comments

@adriangibanelbtactic
Copy link

At SSDB Configuration documentation it says:

Memory Usage
A ssdb-server may temporarily(only last for short time) consume up to this many memory(in MB):

cache_size + write_buffer_size * 66 + 32
This is for compression is set to no, if compression is set to yes, it would be:

cache_size + 10 * write_buffer_size * 66 + 32
You can tune the configuration to limit the memory usage of a ssdb-server instance.

It also says:

Users reported that with default configuration, the memory usage is about 1GB, you can refer to this.

If you use standard maths, default settings (cache_size=500, write_buffer_size=64) and suggested units (MB) you get some huge results.

cache_size + 10 * write_buffer_size * 66 + 32 = 
cache_size + (10 * write_buffer_size * 66) + 32 = 
500 + (10 * 64 * 66) + 32 = 
500 + 42240 + 32 =
42772 MB =
42 GB

So... the formula says that you need 42 GB RAM as a maximum but the documentation says that default settings at tailored to a 1 GB RAM machine.

Could you please clarify on the formula?

I also recommend you to add parenthesis to the formula so that it's easier to understand.

Thank you for your feedback.

Annex: Calculations using the formula aimed at compression being turned off are also a bit off.

cache_size + write_buffer_size * 66 + 32 = 
cache_size + (write_buffer_size * 66) + 32 = 
500 + (4224) + 32 = 
500 + 4224 + 32 =
4756 MB =
4.7 GB
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

No branches or pull requests

1 participant