-
Notifications
You must be signed in to change notification settings - Fork 310
Cache docker info and version #209
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
Conversation
Also add version info on starting Signed-off-by: Xinfeng Liu <[email protected]>
@xinfengliu - what is the worst case scenario for undesirable things happening because somewhere we used an almost one minute old value for |
The FS information is wildly incorrect anyway, and has been for years (ever since storage was moved) i.e. That is, it only reports one subdirectory |
@vikramhh Changing docker root dir needs restarting docker daemon. On Linux, we configure the I don't know how other softwares use |
@xinfengliu - thanks for the details above, in light of which I am OK with the change as-is. |
Yeah, we should fix it. Do you know if there's any existing github tickets for it in either this repo or In addition, I'm not sure what's the best way to fix it. According to the definition of |
Most of CRI is only defined by the implementations, and those are not being tested. I don't know if there are any issues open, or even where those would be at... Anyhow, it is a separate topic from this info/version caching which sounds like a good idea. But I think that |
This is to reduce the load on docker daemon.
In some cases, frequent
docker info
calls could lead to the system failure (high CPU, out-of-memory) due to manyGetTotalUsedFds
goroutines stuck ingetdents64
syscall. In addition,docker version
callsexec
to run OS commands for getting other binaries' version, this can also become a bottleneck on a busy node due to many goroutines contending a lock for forking a new process.This PR caches
docker info
for 1 minute and tries best to getdocker version
from the cache.Also add version info in logs on starting.