-
Notifications
You must be signed in to change notification settings - Fork 40
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
timescaledb-tune uses the wrong values when executed in a resource-constrained container #58
Comments
So by default our Docker image already runs That being said, there's a couple of things going on here, and I'm not sure exactly what the right solution should be. First, when we run Using the same setup you gave, and adding
So when its run inside the container, it is coming up with the correct amount of memory (1GB), so any of those settings should be correct. Now, the CPU number is seemingly incorrect, but really I think its just a quirk of how Docker works here. While we are specifying CPU of 1, that doesn't mean it gets exactly 1 CPU to use, but rather it gets the equivalent of 1 CPU potentially split across all CPUs. I don't think we have any good way to detect what are CPU equivalent of is here, or even if we want to. The number of CPUs mostly determine the parallelization that is available, and we do have 2 CPUs to use, they will just run at about half speed. You could actually use the The one thing we might consider doing in our Docker images is aliasing Hope this helps! |
That would work, but perhaps a cleaner solution would be to incorporate the docker-related hacks into the timescaledb-tune utility itself instead of relying on the entrypoint script to provide the correct values. That way, the right values will be used regardless of how the utility is executed. |
Hi Guys
The title is self-explanatory, but here's a reproduction anyway:
docker run --rm -d --name temp --cpus 1 --memory 1g timescale/timescaledb:1.5.1-pg11
The text was updated successfully, but these errors were encountered: