-
Notifications
You must be signed in to change notification settings - Fork 26
Conversation
7ac8032
to
a126e5c
Compare
Codecov Report
@@ Coverage Diff @@
## master #63 +/- ##
=======================================
Coverage 66.37% 66.37%
=======================================
Files 6 6
Lines 565 565
=======================================
Hits 375 375
Misses 165 165
Partials 25 25 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few issues here:
- I'm not clear on why this would work at all -- how much multiprocessing can the init broker even do, given its tiny quotas?
- Even the improved 25 second time is far too slow. If the init broker is regularly taking this long it suggests a far more fundamental problem somewhere along the line.
- How does the init broker compare against a bare
rm -rf /plugins/*
? - Where was the rough speed test conducted? Minishift or on a actual cluster? What storage is backing the
/plugins
volume?
brokers/init/cmd/main.go
Outdated
broker.PrintInfo("WARN: failed to remove '%s'. Error: %s", file, err) | ||
} | ||
} | ||
recursive(nil, broker, "/plugins", 5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A better name mind be cleanDirectory
, recursive
is too nondescript (says how it does something but not what it does).
At the first, Goroutines will work as a lightweight thread. Less related on multiprocessing. Almost all I/O systemcalls require long turn-around-time by physical device. So contemporary filesystems are run itself under multi-thread for their better throughput. This patch is for getting the benefit.
The benchmark test is run under Google Cloud Shell. Users share same CPUs and disks.
The test bed is on Google Cloud Shell. Probably GKE disk. I'll try to compare |
@amisevsk it might be off-topic but. I found an issue about os:RemoveAll filed in the Golang official. golang/go#29921 It might be the room for consideration we rely on that method. |
Err... I tried to test on the Azure VM instance. I got WARN log lines like this
when I call this script. the docker image is from the master branch. Not patched.
Guess related on the issue I introduced above. How can I send issues for che-plugin-broker? I cloudn't find the issue tab here. |
Signed-off-by: Masaki Muranaka <monaka@monami-ya.com>
a126e5c
to
f26efef
Compare
@amisevsk I run my rough benchmark on Azure VM. The result is https://gist.github.com/monaka/469820873b00362e5065e5893b07bc43 . The master branch is not too slow than BTW, I can't see why the original author didn't do the speed test |
@monaka We're currently placing plugin broker issues in the upstream eclipse/che repository. Thanks for your work, I'll take another look later today. |
The current
init-plugin-broker
container deletes/plugins/*
in serial.It is too slow to clean-up within the timeout when users installed more than 2 plugins.
I checked roughly by a simple script. The patched
init-plugin-broker
will be about 40% faster.https://gist.github.com/monaka/5871f3c37296dfe46aed5a9999083f8a
What does this PR do?
Clean-ups
/plugins
directory in parallel.What issues does this PR fix or reference?
No.