mirror of
https://github.com/clonos/control-pane.git
synced 2026-04-27 05:35:55 +03:00
[GH-ISSUE #8] Web interface slow due to repeated calling off 'get_bhyve_profiles' #4
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/control-pane#4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gizahNL on GitHub (Jan 26, 2018).
Original GitHub issue: https://github.com/clonos/control-pane/issues/8
Originally assigned to: @olevole on GitHub.
Currently the site calls get_bhyve_profiles for every page load, most likely every tiny thing as well as I see many instances running in paralel.
This slows down incredibly, ideally output should be cached and refreshed when needed (if output is static once an hour via cronjob might be ideal)
@gizahNL commented on GitHub (Jan 27, 2018):
Simple dirty hack to work arround:
create the following script:
call it from cron every 5 minutes
place in /usr/jails/modules following scripts:
/usr/jails/modules/profile_vm
/usr/jails/modules/profile_template
then modify php/config.php and replace get_bhyve_profiles with the corrospondending scripts.
@gizahNL commented on GitHub (Jan 27, 2018):
without it page loading of clonos site is at least 40+ seconds, with the workaround using flat file ("cached response") responsiveness is in the milliseconds
@olevole commented on GitHub (Jan 28, 2018):
the cache for profiles sounds reasonable. Nevertheless, 40+ seconds is very strange. I'll check it out soon.
@gizahNL commented on GitHub (Jan 28, 2018):
13 seconds for
and again 13 seconds for
The problem is also that they both get called more often than needed, my guess is perhaps even for every element, I've seen a couple of those processes run in paralel while I'm only opening 1 new page.
@olevole commented on GitHub (Jan 29, 2018):
The implementation of the cache is currently blocked by the task of implementing the internal cron-service. I'm thinking about setting like :
[x] Update VM profiles periodically
in fact, it will perform
git pullfrom https://github.com/cbsd/cbsd-vmprofiles ( source for profile list/settings ).In CBSD this happens through ~cbsd/etc/Makefile file: https://github.com/cbsd/cbsd/blob/master/etc/Makefile:
make -C ~cbsd/etc profiles-updatefor this operation (or also as periodic), we can hang a cache creation
@olevole commented on GitHub (Nov 29, 2018):
Fixed in BETA1, thanks!