Closed subzero79 closed 8 years ago
I thought I had fixed the $Driver warnings in 3.0.5, but I guess I'll have to give it another go. Regarding slow rendering performance I know there are huge issues when the docker service restarts (when you save the settings in the plugin). Then all containers start working at the same time and on my system they consume 100% of the CPU. If I wait until they have finishedtheir "startup work" and CPU load id back on normal levels, the container grid in the plugin loads in just a few seconds. Could you try this out on your end by just "refreshing" the container grid?
I always use the refresh button once the grid is loaded. The grid actually loads now in comparison to 2.0, but it takes around 30-40 seconds.
This is a screen video
https://dl.dropboxusercontent.com/u/54639/screen1.mp4
if i copy the full curl to terminal it also takes 30-40 seconds
That was slow indeed... Is any of the containers using a lot of network ports?
Nope. Most of them run with one exposed port. Plex and kodi-headless run in host mode.
This is the list of containers
I've just runned top and pressed refresh, docker goes 90-100%. That might be the issue
I'll do some more testing as soon as I can to try and eliminate this issue.
I've pushed some changes now. Could you try and build from source? I don't want to release a new version if it doesn't fix the issue...
I don't see any changes in the repo in the last 12 hours. Are you sure you push them?
Argh! The date/time on my VM was of by quite a lot. The latest push was made yesterday, even though it says 15 days ago here on github...
ok, i've built it anyway, i was on 3.0.5. The errors were silenced, but is still slow rendering
I am trying to setup mitmproxy to monitor the api calls by the plugin. I find it little bit excessive that cpu goes 100% after i press refresh
Ok, i think i found the issue. The plugin makes an api call to the image endpoint (the same call) for every container, is that suppose to be like that? Also every container gets an individual call, to get more info I guess?
Here is the video of the refresh action and on the side is the mitproxy registering all the calls
Nice! I'll do some rewrite of the container listing. It should fetch all images via api once and then use this data for further processing when building the list of containers.
I definately have to look at mitproxy...
Is explained here, https://lorinstechblog.wordpress.com/2015/01/13/using-mitmproxy-to-log-docker-api-calls/
If or boot2docker, but for us i have to, change /etc/default/docker to listen on 42004, without using the plugin, then restart docker. This way rpc still thinks he has to hit the default 42005 port.
configure mitmproxy to run listen on 42005 on this file ~/.mitmproxy/common.conf, then run the proxy as
mitmproxy -R http://0.0.0.0:42004
Looking more closely at the issue it requires quite some rewrite, but it is doable. Just can't promise how long it will take...
I am not a coder, but i am trying to understand a little bit more, I was reading through the function getContainers and I still don't know why do you need to call the images endpoint in the container grid. The name of the parent image for the container already comes out in /containers/json Can you clarify that?
The inspect every container endpoint call I assume is for the copy or modify button right?
Not a coder you say, BS I say :-)
You are absolutely correct regarding the api calls to the container endpoints, it's for populating the fields in the "copy container" window. The calls to the image endpoints is to populate the various drop downs with info only available in the images (exposed ports, bind mounts etc.). The way I'm gonna change the implementation is to only do one api call to list all containers (not one for every container) and then call the container/image endpoints when the user clicks the appropriate button. The reason I didn't do it this way from the start is laziness combined with that I didn't really think these api calls would be so degrading on performance.
Send me a PM on the forums when you are ready to do some coding on the project and I'll point you in the right direction (if needed) :-)
I just pushed a change to the container listing (the date for the commit is wrong again). It will break copy/modify functionality but could you test it out anyway to verify performance?
Yes, the grid loaded instantly, before even the image grid. There is an error in the webgui, you already know probably. I'll wait then, thanks for your time
An i am not a coder BTW :-), i am intermediate BASH and I struggle with PHP. For the plugins I try to adapt existing code from other plugins....of course with a little help from my friends.
Copy container should be working again plus some fixes to the container grid.
EDIT: what error were you thinking of in the gui?
Ok, so I think all functionality is back in the container grid area. If you give your approval I'll close this issue and start with the other one regarding what happens when you pull a new version of an image.
The image grid listing is also updated now to only do one api call.
EDIT: what error were you thinking of in the gui?
Before i pull this is it
`Error #0: exception 'OMVModuleDockerException' with message 'Error: "" - Code: 0' in /usr/share/omvdocker/Utils.php:63 Stack trace:
OK Hide details `
Updated to latest, is running good so far. We can close this I think. The autocomplete path feature is back also. There is a minor issue with copy/modify we can discuss it in another thread.
This is the log regarding the plugin in OMV 3.0
The panel still renders very slowly in comparison to the image one.
Here is the omv-engined debug log
https://gist.github.com/subzero79/ee18d411b5f000bfa224