Skip to content
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

New VMs cause exponential slowness /plugins/kimchi/vms AJAX request #1130

Closed
ss23 opened this issue Apr 14, 2017 · 8 comments · Fixed by #1231
Closed

New VMs cause exponential slowness /plugins/kimchi/vms AJAX request #1130

ss23 opened this issue Apr 14, 2017 · 8 comments · Fixed by #1231

Comments

@ss23
Copy link
Contributor

ss23 commented Apr 14, 2017

As we have added more VMs (currently at 13 VMs) the AJAX call to /plugins/kimchi/vms has slowed down exponentially. It currently takes approximately 30 seconds to complete.
The server has 10 cores, a load of <3, four SSDs in RAID10, and a dual gigabit ethernet connection, so I wouldn't expect it to be something to do with the server being overloaded.

There are some other unsually slow requests:
/plugins/kimchi/networks takes approximately 6 seconds when clicking "edit" on a VM, as does /plugins/kimchi/host/devices?_passthrough=true&_cap=pci&_available_only=true which takes approximately the same amount of time.
All other requests take sub 50ms.

I'm unsure if this is a bug, but is anyone else experiencing this, or know how to debug/fix?

@alinefm
Copy link
Member

alinefm commented Jun 6, 2017

Hi @ss23

The problem related to /plugins/kimchi/host/devices?_passthrough=true&_cap=pci&_available_only=true is a known issue and it is being tracked on #993

About the delay on /plugins/kimchi/networks, I am not sure what it is happening.
How many virtual networks you set on your server? Any considerable amount that can explain that delay?

@ss23
Copy link
Contributor Author

ss23 commented Jun 8, 2017

@alinefm Nothing I know of to explain it. It's a somewhat unsual situation perhaps, there 6 networks, using openvswitch.

@ss23
Copy link
Contributor Author

ss23 commented Jun 13, 2017

Not sure how much more useful this information is, but:

When I first start wokd, the relevant python processes are doing nothing. That is, they are using no measurable amount of CPU. An strace at this point shows a somewhat expected situation, select(0, NULL, NULL, NULL, {0, 100000}) = 0 (Timeout) repeated forever.
However, after loading the Kimchi interface, even after I close the browser window, the python process will now use 100% of the CPU forever. The strace output now looks something like:

select(0, NULL, NULL, NULL, {0, 100000}) = 0 (Timeout)
futex(0x14b4580, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, ffffffff) = -1 EAGAIN (Resource temporarily unavailable)
futex(0x14b4580, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x14b4580, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, ffffffff) = 0
futex(0x14b4580, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, ffffffff) = 0
futex(0x14b4580, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, ffffffff) = -1 EAGAIN (Resource temporarily unavailable)
futex(0x14b4580, FUTEX_WAKE_PRIVATE, 1) = 1
select(0, NULL, NULL, NULL, {0, 100000}) = 0 (Timeout)

Unfortunately I'm lacking the context to understand what's going on here.

In any case, using 100% of a core as soon as someone loads any page in Kimchi is not optimal.

@ss23
Copy link
Contributor Author

ss23 commented Jun 13, 2017

The above issue is fixed with the fix of kimchi-project/wok#217, which seems to have measurably sped up the networks and devices calls.

The remaining very slow call is to /plugins/kimchi/vms, taking approximately 20 seconds on average.

@overcookedTOFU
Copy link
Contributor

overcookedTOFU commented Jul 11, 2017

@alinefm Is there any testing I can do for you so that you can close this issue? This may also have resolved #993.

@alinefm
Copy link
Member

alinefm commented Jul 11, 2017

@overcookedTOFU no! Thanks for updating it. I am closing this issue by now.

@alinefm alinefm closed this as completed Jul 11, 2017
@ss23
Copy link
Contributor Author

ss23 commented Jul 13, 2017

@overcookedTOFU @alinefm I don't think this issue is resolved?

I've installed the latest version of wok/kimchi and if anything it seems to be slightly worse - currently at 10 seconds to load /plugins/kimchi/vms with no load.

Can the issue be reopened, or is it tracked somewhere else?

@alinefm
Copy link
Member

alinefm commented Jul 20, 2017

@ss23 Sure! I will reopen it and investigate better later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants