-
Notifications
You must be signed in to change notification settings - Fork 164
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
Significant slow down when executed in quick succession #29
Comments
I tried both of those on two different machines (archlinux and ubuntu 16.10 x86_64) multiple times and I can't reproduce your result at all. Do you get similar differences in user time? Can you compute the average wall time of 1000 runs, for instance? |
User time is always 0.00. Wall time average is computed with this script,
On the first machine:
On the second machine:
|
Seems like kernel just spent that much time tearing down namespaces before the child can be reaped, as demostrated by timing the following code and toggling the comments.
A special "init" program in the namespace may serve as a workaround, because we need not to wait for the init to die. |
This is definitely a kernel issue. I do not think it matters much as average execution times in most contests are significantly higher than this delay, but if anybody feels it does matter, please reopen this issue and we shall investigate further. |
When I opened this issue, it did matter because I want to run 20 tasks concurrently on the 0.8s machine (with >20 cores), and it is observed that such overhead cannot be parallelized. Later I decided to roll my solution, which avoids destroying and recreating namespaces. As I no longer use isolate at all, it doesn't matter to me now. |
See further discussion and proposed workaround in issue #34. |
When
isolate --run
is executed in quick succession, the later commands take sigificantly longer than the first.To reproduce, save this as a shell script, run it, and check the real time (as output by
time
).It is expected that all executions take roughly the same. However, the first execution takes around 0.05s and the second takes around 0.1s on my machine. On another machine the first execution also takes around 0.05s but the second takes at least 0.8s!
Both machine are x86_64 and running latest Arch Linux and isolate built from commit 7f55e36. The first machine (the less severe one) is using usual Arch Linux kernel 4.10.5. The second machine is inside lxc with linux-userns kernel 4.10.1.
The text was updated successfully, but these errors were encountered: